wifi: cfg80211: don't allow multi-BSSID in S1G
authorJohannes Berg <johannes.berg@intel.com>
Fri, 25 Nov 2022 11:36:58 +0000 (12:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Dec 2022 10:28:40 +0000 (11:28 +0100)
commitdc0853f8b502a7cea385335fb2625625d1a447cb
tree822d371d51d39a09cb60a7e1ee78869d9cb9ddaa
parent88a6fe3707888bd1893e9741157a7035c4159ab6
wifi: cfg80211: don't allow multi-BSSID in S1G

[ Upstream commit acd3c92acc7aaec50a94d0a7faf7ccd74e952493 ]

In S1G beacon frames there shouldn't be multi-BSSID elements
since that's not supported, remove that to avoid a potential
integer underflow and/or misparsing the frames due to the
different length of the fixed part of the frame.

While at it, initialize non_tx_data so we don't send garbage
values to the user (even if it doesn't seem to matter now.)

Reported-and-tested-by: Sönke Huster <shuster@seemoo.tu-darmstadt.de>
Fixes: 9eaffe5078ca ("cfg80211: convert S1G beacon to scan results")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/wireless/scan.c