diff options
author | Johannes Berg <johannes.berg@intel.com> | 2023-06-04 12:11:18 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-06-14 11:15:18 +0200 |
commit | 8b6ab4bfba6f4391cb5581bc2df77daeb943b318 (patch) | |
tree | 8aed67aaae62cc8029b7d29b040bd3d9a1789eaa /net/wireless | |
parent | 434cf4fbee4e3c26f1305865307ae52097e1e342 (diff) | |
download | linux-stable-8b6ab4bfba6f4391cb5581bc2df77daeb943b318.tar.gz linux-stable-8b6ab4bfba6f4391cb5581bc2df77daeb943b318.tar.bz2 linux-stable-8b6ab4bfba6f4391cb5581bc2df77daeb943b318.zip |
wifi: cfg80211: reject bad AP MLD address
[ Upstream commit 727073ca5e55ab6a07df316250be8a12606e8677 ]
When trying to authenticate, if the AP MLD address isn't
a valid address, mac80211 can throw a warning. Avoid that
by rejecting such addresses.
Fixes: d648c23024bd ("wifi: nl80211: support MLO in auth/assoc")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230604120651.89188912bd1d.I8dbc6c8ee0cb766138803eec59508ef4ce477709@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/nl80211.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 7320d676ce3a..087c0c442e23 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -10542,6 +10542,8 @@ static int nl80211_authenticate(struct sk_buff *skb, struct genl_info *info) if (!info->attrs[NL80211_ATTR_MLD_ADDR]) return -EINVAL; req.ap_mld_addr = nla_data(info->attrs[NL80211_ATTR_MLD_ADDR]); + if (!is_valid_ether_addr(req.ap_mld_addr)) + return -EINVAL; } req.bss = cfg80211_get_bss(&rdev->wiphy, chan, bssid, ssid, ssid_len, |