summaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2022-08-17 10:44:05 +0200
committerJohannes Berg <johannes.berg@intel.com>2022-08-25 10:41:00 +0200
commit40fb87129049ec5876dabf4a4d4aed6642b31f1a (patch)
tree9735b824f6eb4a7a2a75529a2944f33f6c6c2307 /net/mac80211
parentc88f1542ee72872a276115c868f580a391f04a7b (diff)
downloadlinux-stable-40fb87129049ec5876dabf4a4d4aed6642b31f1a.tar.gz
linux-stable-40fb87129049ec5876dabf4a4d4aed6642b31f1a.tar.bz2
linux-stable-40fb87129049ec5876dabf4a4d4aed6642b31f1a.zip
wifi: mac80211: fix use-after-free
We've already freed the assoc_data at this point, so need to use another copy of the AP (MLD) address instead. Fixes: 81151ce462e5 ("wifi: mac80211: support MLO authentication/association with one link") Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/mlme.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 3d4ab711f0d1..04d35cd39889 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -5124,7 +5124,7 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
resp.req_ies = ifmgd->assoc_req_ies;
resp.req_ies_len = ifmgd->assoc_req_ies_len;
if (sdata->vif.valid_links)
- resp.ap_mld_addr = assoc_data->ap_addr;
+ resp.ap_mld_addr = sdata->vif.cfg.ap_addr;
cfg80211_rx_assoc_resp(sdata->dev, &resp);
notify_driver:
drv_mgd_complete_tx(sdata->local, sdata, &info);