Johannes Berg 78a6a43aaf wifi: mac80211: mlme: fix null-ptr deref on failed assoc
If association to an AP without a link 0 fails, then we crash in
tracing because it assumes that either ap_mld_addr or link 0 BSS
is valid, since we clear sdata->vif.valid_links and then don't
add the ap_mld_addr to the struct.

Since we clear also sdata->vif.cfg.ap_addr, keep a local copy of
it and assign it earlier, before clearing valid_links, to fix
this.

Fixes: 81151ce462e5 ("wifi: mac80211: support MLO authentication/association with one link")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2022-10-07 15:24:16 +02:00
..
2022-08-08 20:04:35 -07:00
2022-02-25 09:36:06 +01:00
2022-05-25 12:22:58 -07:00
2022-09-27 10:26:17 +02:00
2022-09-12 17:53:46 -04:00
2022-09-27 17:29:09 -07:00
2022-09-26 11:00:19 -07:00
2022-09-30 07:55:45 -07:00
2022-09-30 12:31:46 +01:00
2022-08-22 14:26:30 +01:00
2022-08-22 14:26:30 +01:00