Skip to content

Commit 5afb39d

Browse files
ilanpeer2smb49
authored andcommitted
wifi: cfg80211: Drop entries with invalid BSSIDs in RNR
BugLink: https://bugs.launchpad.net/bugs/2028808 [ Upstream commit 1b6b4ed ] Ignore AP information for entries that include an invalid BSSID in the TBTT information field, e.g., all zeros BSSIDs. Fixes: c8cb5b8 ("nl80211/cfg80211: support 6 GHz scanning") Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230424103224.5e65d04d1448.Ic10c8577ae4a85272c407106c9d0a2ecb5372743@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Kamal Mostafa <kamal@canonical.com> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
1 parent 8559425 commit 5afb39d

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

net/wireless/scan.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Copyright 2008 Johannes Berg <johannes@sipsolutions.net>
66
* Copyright 2013-2014 Intel Mobile Communications GmbH
77
* Copyright 2016 Intel Deutschland GmbH
8-
* Copyright (C) 2018-2022 Intel Corporation
8+
* Copyright (C) 2018-2023 Intel Corporation
99
*/
1010
#include <linux/kernel.h>
1111
#include <linux/slab.h>
@@ -540,6 +540,10 @@ static int cfg80211_parse_ap_info(struct cfg80211_colocated_ap *entry,
540540
/* skip the TBTT offset */
541541
pos++;
542542

543+
/* ignore entries with invalid BSSID */
544+
if (!is_valid_ether_addr(pos))
545+
return -EINVAL;
546+
543547
memcpy(entry->bssid, pos, ETH_ALEN);
544548
pos += ETH_ALEN;
545549

0 commit comments

Comments
 (0)