diff options
Diffstat (limited to 'net/wireless/scan.c')
| -rw-r--r-- | net/wireless/scan.c | 6 | 
1 files changed, 5 insertions, 1 deletions
diff --git a/net/wireless/scan.c b/net/wireless/scan.c index a1382255fab3..c501db7bbdb3 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c @@ -5,7 +5,7 @@   * Copyright 2008 Johannes Berg <johannes@sipsolutions.net>   * Copyright 2013-2014  Intel Mobile Communications GmbH   * Copyright 2016	Intel Deutschland GmbH - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation   */  #include <linux/kernel.h>  #include <linux/slab.h> @@ -540,6 +540,10 @@ static int cfg80211_parse_ap_info(struct cfg80211_colocated_ap *entry,  	/* skip the TBTT offset */  	pos++; +	/* ignore entries with invalid BSSID */ +	if (!is_valid_ether_addr(pos)) +		return -EINVAL; +  	memcpy(entry->bssid, pos, ETH_ALEN);  	pos += ETH_ALEN;  | 
