]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wifi: cfg80211: fix use-after-free in cmp_bss()
authorDmitry Antipov <dmantipov@yandex.ru>
Wed, 13 Aug 2025 13:52:36 +0000 (16:52 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 9 Sep 2025 16:56:21 +0000 (18:56 +0200)
commitb7d08929178c16398278613df07ad65cf63cce9d
treeee2e178567fdf250302baf2d78abfb98c9d6d5c7
parent4a05520d12a7ee958b38ebef7a25473df16a7c19
wifi: cfg80211: fix use-after-free in cmp_bss()

[ Upstream commit 26e84445f02ce6b2fe5f3e0e28ff7add77f35e08 ]

Following bss_free() quirk introduced in commit 776b3580178f
("cfg80211: track hidden SSID networks properly"), adjust
cfg80211_update_known_bss() to free the last beacon frame
elements only if they're not shared via the corresponding
'hidden_beacon_bss' pointer.

Reported-by: syzbot+30754ca335e6fb7e3092@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=30754ca335e6fb7e3092
Fixes: 3ab8227d3e7d ("cfg80211: refactor cfg80211_bss_update")
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Link: https://patch.msgid.link/20250813135236.799384-1-dmantipov@yandex.ru
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/wireless/scan.c