Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

wifi: mac80211: fix list iteration in ieee80211_add_virtual_monitor()

Since 'mon_list' of 'struct ieee80211_local' is RCU-protected and
an instances of 'struct ieee80211_sub_if_data' are linked there
via 'u.mntr.list' member, adjust the corresponding list iteration
in 'ieee80211_add_virtual_monitor()' accordingly.

Reported-by: syzbot+bc1aabf52d0a31e91f96@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=bc1aabf52d0a31e91f96
Fixes: a5aa46f1ac4f ("wifi: mac80211: track MU-MIMO configuration on disabled interfaces")
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Link: https://patch.msgid.link/20251204130533.340069-1-dmantipov@yandex.ru
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Dmitry Antipov and committed by
Johannes Berg
cbf0dc37 7623cc42

+1 -1
+1 -1
net/mac80211/iface.c
··· 1251 1251 if (!creator_sdata) { 1252 1252 struct ieee80211_sub_if_data *other; 1253 1253 1254 - list_for_each_entry(other, &local->mon_list, list) { 1254 + list_for_each_entry_rcu(other, &local->mon_list, u.mntr.list) { 1255 1255 if (!other->vif.bss_conf.mu_mimo_owner) 1256 1256 continue; 1257 1257