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
Unknown Object (File)
Sat, Dec 6, 10:23 PM
Unknown Object (File)
Wed, Dec 3, 9:00 PM
Unknown Object (File)
Sun, Nov 30, 9:48 AM
Unknown Object (File)
Tue, Nov 11, 12:31 AM
Unknown Object (File)
Sat, Nov 8, 5:26 PM
Unknown Object (File)
Nov 5 2025, 11:24 PM
Unknown Object (File)
Nov 3 2025, 5:05 AM
Unknown Object (File)
Oct 29 2025, 7:46 AM

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 Not Applicable
Unit
Tests Not Applicable