summaryrefslogtreecommitdiff
path: root/net/wireless/scan.c
diff options
context:
space:
mode:
authorBenjamin Berg <benjamin.berg@intel.com>2023-06-16 09:54:02 +0300
committerJohannes Berg <johannes.berg@intel.com>2023-06-19 12:05:28 +0200
commit03e7e493f1a3697eba115f3f69e296f7e47500ee (patch)
tree5af70cc14267738c6e96d3d079537c001e896854 /net/wireless/scan.c
parent108d202298bf03ce8d7e28bb94d23555c8385582 (diff)
wifi: cfg80211: ignore invalid TBTT info field types
The TBTT information field type must be zero. This is only changed in the 802.11be draft specification where the value 1 is used to indicate that only the MLD parameters are included. Signed-off-by: Benjamin Berg <benjamin.berg@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230616094949.7865606ffe94.I7ff28afb875d1b4c39acd497df8490a7d3628e3f@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/scan.c')
-rw-r--r--net/wireless/scan.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index d9abbf123ad1..2212e6d24204 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -629,6 +629,13 @@ static int cfg80211_parse_colocated_ap(const struct cfg80211_bss_ies *ies,
if (end - pos < count * length)
break;
+ if (u8_get_bits(ap_info->tbtt_info_hdr,
+ IEEE80211_AP_INFO_TBTT_HDR_TYPE) !=
+ IEEE80211_TBTT_INFO_TYPE_TBTT) {
+ pos += count * length;
+ continue;
+ }
+
/*
* TBTT info must include bss param + BSSID +
* (short SSID or same_ssid bit to be set).