linux/drivers/net/wireless/broadcom/brcm80211/brcmsmac
Jiangshan Yi 1eeca1d5e0 wifi: brcmsmac: fix UAF in brcms_free_timer()
brcms_free_timer() calls brcms_del_timer() which uses the non-synchronous
cancel_delayed_work() to cancel the timer's underlying delayed work.  If
the work callback (_brcms_timer) is already running, cancel_delayed_work()
returns false without waiting, and brcms_free_timer() proceeds to kfree(t)
while the callback still accesses t through container_of().

Add an explicit cancel_delayed_work_sync() after brcms_del_timer() to
guarantee that any in-flight callback has completed before the timer
structure is freed.

Fixes: 5b435de0d7 ("net: wireless: add brcm80211 drivers")
Cc: stable@vger.kernel.org
Signed-off-by: Jiangshan Yi <yijiangshan@kylinos.cn>
Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Link: https://patch.msgid.link/20260815121043.938414-1-yijiangshan@kylinos.cn
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2026-09-15 11:52:56 +02:00
..
phy wifi: brcmsmac: phy_lcn: Remove dead code in wlc_lcnphy_radio_2064_channel_tune_4313() 2026-04-28 10:43:27 +02:00
aiutils.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
aiutils.h wifi: brcmsmac: Spelling corrections 2025-04-23 15:35:27 +02:00
ampdu.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
ampdu.h
antsel.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
antsel.h
brcms_trace_brcmsmac_msg.h tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
brcms_trace_brcmsmac_tx.h tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
brcms_trace_brcmsmac.h tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
brcms_trace_events.c
brcms_trace_events.h
channel.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
channel.h
d11.h
debug.c wifi: brcmsmac: Remove unused brcms_debugfs_get_devdir() 2024-10-17 19:49:37 +03:00
debug.h wifi: brcmsmac: Remove unused brcms_debugfs_get_devdir() 2024-10-17 19:49:37 +03:00
dma.c wifi: brcmsmac: Fix dma_free_coherent() size 2026-04-07 12:34:03 +02:00
dma.h wifi: brcm80211: Remove unused dma_txflush() 2024-10-31 16:19:18 +02:00
led.c wifi: brcmsmac: Drop legacy header 2024-02-05 20:17:10 +02:00
led.h
mac80211_if.c wifi: brcmsmac: fix UAF in brcms_free_timer() 2026-09-15 11:52:56 +02:00
mac80211_if.h
main.c wifi: brcm80211: change current_bss to value 2026-06-10 08:34:08 +02:00
main.h wifi: brcm80211: change current_bss to value 2026-06-10 08:34:08 +02:00
Makefile kbuild: use $(src) instead of $(srctree)/$(src) for source directory 2024-05-10 04:34:52 +09:00
phy_shim.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
phy_shim.h wifi: brcmsmac: avoid function pointer casts 2024-02-16 17:48:59 +02:00
pmu.c wifi: brcmsmac: Spelling corrections 2025-04-23 15:35:27 +02:00
pmu.h
pub.h wifi: brcmsmac: cleanup SCB-related data types 2023-08-02 13:11:07 +03:00
rate.c
rate.h
scb.h wifi: brcmsmac: cleanup SCB-related data types 2023-08-02 13:11:07 +03:00
stf.c
stf.h
types.h wifi: brcmsmac: remove more unused data types 2023-08-02 13:11:07 +03:00
ucode_loader.c
ucode_loader.h