WSL2-Linux-Kernel/net/mac80211
Johannes Berg 2af058a26c wifi: mac80211: fix BA session teardown race
[ Upstream commit 05f136220d17839eb7c155f015ace9152f603225 ]

As previously reported by Alexander, whose commit 69403bad97
("wifi: mac80211: sdata can be NULL during AMPDU start") I'm
reverting as part of this commit, there's a race between station
destruction and aggregation setup, where the aggregation setup
can happen while the station is being removed and queue the work
after ieee80211_sta_tear_down_BA_sessions() has already run in
__sta_info_destroy_part1(), and thus the worker will run with a
now freed station. In his case, this manifested in a NULL sdata
pointer, but really there's no guarantee whatsoever.

The real issue seems to be that it's possible at all to have a
situation where this occurs - we want to stop the BA sessions
when doing _part1, but we cannot be sure, and WLAN_STA_BLOCK_BA
isn't necessarily effective since we don't know that the setup
isn't concurrently running and already got past the check.

Simply call ieee80211_sta_tear_down_BA_sessions() again in the
second part of station destruction, since at that point really
nothing else can hold a reference to the station any more.

Also revert the sdata checks since those are just misleading at
this point.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-09-04 13:23:20 +02:00
..
Kconfig
Makefile
aead_api.c
aead_api.h
aes_ccm.h
aes_cmac.c
aes_cmac.h
aes_gcm.h
aes_gmac.c
aes_gmac.h
agg-rx.c mac80211: fix memory leaks with element parsing 2022-10-15 07:59:05 +02:00
agg-tx.c wifi: mac80211: fix BA session teardown race 2024-09-04 13:23:20 +02:00
airtime.c wifi: mac8021: fix possible oob access in ieee80211_get_rate_duration 2022-12-08 11:28:40 +01:00
cfg.c wifi: mac80211: check basic rates validity 2024-08-19 05:45:50 +02:00
chan.c wifi: mac80211: simplify chanctx allocation 2023-06-09 10:32:25 +02:00
debug.h
debugfs.c
debugfs.h
debugfs_key.c
debugfs_key.h
debugfs_netdev.c
debugfs_netdev.h
debugfs_sta.c
debugfs_sta.h
driver-ops.c wifi: mac80211: fix BA session teardown race 2024-09-04 13:23:20 +02:00
driver-ops.h mac80211: mark TX-during-stop for TX in in_reconfig 2021-12-22 09:32:34 +01:00
ethtool.c
fils_aead.c
fils_aead.h
he.c wifi: mac80211: correctly parse Spatial Reuse Parameter Set element 2024-07-05 09:14:05 +02:00
ht.c
ibss.c mac80211: fix memory leaks with element parsing 2022-10-15 07:59:05 +02:00
ieee80211_i.h wifi: mac80211: handle tasklet frames before stopping 2024-07-27 10:46:08 +02:00
iface.c Revert "wifi: mac80211: fix memory leak in ieee80211_if_add()" 2023-01-24 07:22:49 +01:00
key.c
key.h
led.c
led.h mac80211: fix throughput LED trigger 2021-12-08 09:04:38 +01:00
main.c wifi: mac80211: disable softirqs for queued frame handling 2024-07-27 10:46:15 +02:00
mesh.c wifi: mac80211: mesh: init nonpeer_pm to active by default in mesh sdata 2024-07-27 10:46:08 +02:00
mesh.h mac80211: mesh: embedd mesh_paths and mpp_paths into ieee80211_if_mesh 2022-01-11 15:35:13 +01:00
mesh_hwmp.c mac80211: always allocate struct ieee802_11_elems 2022-10-15 07:59:05 +02:00
mesh_pathtbl.c wifi: mac80211: mesh: Fix leak of mesh_preq_queue objects 2024-07-05 09:14:04 +02:00
mesh_plink.c wifi: mac80211: mesh_plink: fix matches_local logic 2024-01-05 15:13:28 +01:00
mesh_ps.c mac80211: mesh: fix potentially unaligned access 2021-09-23 13:25:09 +02:00
mesh_sync.c mac80211: mesh: clean up rx_bcn_presp API 2022-10-15 07:59:04 +02:00
michael.c
michael.h
mlme.c wifi: mac80211: adding missing drv_mgd_complete_tx() call 2024-03-01 13:21:47 +01:00
ocb.c
offchannel.c
pm.c
rate.c Revert "mac80211: do not use low data rates for data frames with no ack flag" 2021-09-23 12:59:29 +02:00
rate.h
rc80211_minstrel_ht.c mac80211: minstrel_ht: fix where rate stats are stored (fixes debugfs output) 2022-06-09 10:22:31 +02:00
rc80211_minstrel_ht.h
rc80211_minstrel_ht_debugfs.c
rx.c wifi: mac80211: check S1G action frame size 2023-09-23 11:09:56 +02:00
s1g.c wifi: mac80211: Set TWT Information Frame Disabled bit as 1 2022-11-16 09:58:14 +01:00
scan.c wifi: mac80211: fix UBSAN noise in ieee80211_prep_hw_scan() 2024-07-27 10:46:08 +02:00
spectmgmt.c
sta_info.c wifi: mac80211: fix BA session teardown race 2024-09-04 13:23:20 +02:00
sta_info.h mac80211: fix regression in SSN handling of addba tx 2021-12-22 09:32:34 +01:00
status.c
tdls.c mac80211: always allocate struct ieee802_11_elems 2022-10-15 07:59:05 +02:00
tkip.c
tkip.h
trace.c
trace.h wifi: mac80211: fix min center freq offset tracing 2023-05-24 17:36:51 +01:00
trace_msg.h
tx.c wifi: mac80211: fix race condition on enabling fast-xmit 2024-03-01 13:21:44 +01:00
util.c wifi: mac80211: disable softirqs for queued frame handling 2024-07-27 10:46:15 +02:00
vht.c
wep.c
wep.h
wme.c wifi: mac80211: fix qos on mesh interfaces 2023-03-30 12:47:58 +02:00
wme.h
wpa.c mac80211: fix use-after-free in CCMP/GCMP RX 2021-09-27 11:59:49 +02:00
wpa.h