CVE-2026-98196: wifi: brcmsmac: fix UAF in brcms_free_timer()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
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.
The Linux kernel CVE team has assigned CVE-2026-98196 to this issue.
Affected and fixed versions
===========================
Issue introduced in 3.2 with commit 5b435de0d786869c95d1962121af0d7df2542009 and fixed in 5.10.271 with commit 10eeb0b29fd7f52487c9ae573e8d79c210a0095d Issue introduced in 3.2 with commit 5b435de0d786869c95d1962121af0d7df2542009 and fixed in 5.15.222 with commit 74acccc928851f69184271832d690607877122af Issue introduced in 3.2 with commit 5b435de0d786869c95d1962121af0d7df2542009 and fixed in 6.1.189 with commit 050d2486e8ed2c0a23b87249ccd23e8072721391 Issue introduced in 3.2 with commit 5b435de0d786869c95d1962121af0d7df2542009 and fixed in 6.6.158 with commit 856dabd5f2617efb23c043be9e1b22a9e6e97c41 Issue introduced in 3.2 with commit 5b435de0d786869c95d1962121af0d7df2542009 and fixed in 6.12.112 with commit 2a4841ff0b74b495cddd31ae324e922217fc2f13 Issue introduced in 3.2 with commit 5b435de0d786869c95d1962121af0d7df2542009 and fixed in 6.18.54 with commit 1edb3ddd261e973a4d577c0547e63bfa25a8170d Issue introduced in 3.2 with commit 5b435de0d786869c95d1962121af0d7df2542009 and fixed in 7.2.8 with commit 777cb6bba59e875b16a1d8897a483a5fecfcd5d2 Issue introduced in 3.2 with commit 5b435de0d786869c95d1962121af0d7df2542009 and fixed in 7.3-rc4 with commit 1eeca1d5e0920fbdad6449768fd2d4364e714180
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-98196
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/10eeb0b29fd7f52487c9ae573e8d79c210a0095d https://git.kernel.org/stable/c/74acccc928851f69184271832d690607877122af https://git.kernel.org/stable/c/050d2486e8ed2c0a23b87249ccd23e8072721391 https://git.kernel.org/stable/c/856dabd5f2617efb23c043be9e1b22a9e6e97c41 https://git.kernel.org/stable/c/2a4841ff0b74b495cddd31ae324e922217fc2f13 https://git.kernel.org/stable/c/1edb3ddd261e973a4d577c0547e63bfa25a8170d https://git.kernel.org/stable/c/777cb6bba59e875b16a1d8897a483a5fecfcd5d2 https://git.kernel.org/stable/c/1eeca1d5e0920fbdad6449768fd2d4364e714180