Commit 40fb8712 authored by Johannes Berg's avatar Johannes Berg
Browse files

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: 81151ce4 ("wifi: mac80211: support MLO authentication/association with one link")
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent c88f1542
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);