Page MenuHomeFreeBSD

net80211: fix a NULL deref in ieee80211_sta_join1()
ClosedPublic

Authored by bz on Jan 16 2024, 7:00 PM.
Tags
None
Referenced Files
F102664920: D43469.diff
Fri, Nov 15, 1:43 PM
Unknown Object (File)
Thu, Oct 31, 11:07 AM
Unknown Object (File)
Oct 13 2024, 6:02 AM
Unknown Object (File)
Oct 13 2024, 6:01 AM
Unknown Object (File)
Oct 13 2024, 6:00 AM
Unknown Object (File)
Oct 12 2024, 1:57 PM
Unknown Object (File)
Sep 30 2024, 7:25 AM
Unknown Object (File)
Sep 20 2024, 4:04 PM

Details

Summary

When ieee80211_sta_join1() gets an obss without ni_nt trying to lock
that will cause a NULL pointer deref. Check for the table to be
valid and deal with the obss node accordingly.

This can happen if sta_newstate() calls ieee80211_reset_bss() for
nstate == INIT and ostate != INIT. ieee80211_reset_bss() itself
calls ieee80211_node_table_reset() which calls node_reclaim()
which ends up in ieee80211_del_node_nt() which does remove the
node from the table and sets ni_table to NULL.
That node (former iv_bss) can then be returned as obss in the
(*iv_update_bss)() call in join1().

MFC after: 3 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 55458
Build 52347: arc lint + arc unit