CVE-2025-39863 json
wifi: brcmfmac: fix use-after-free when rescheduling brcmf_btcoex_info work
published 2025-09-19 13 mo ago modified 2026-10-19 20 d ago also EUVD-2025-30337
- cvss
- 7.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.2%
- EPSS 0.2% chance of exploitation in 30 days, percentile 5%
- public exploits
- 0
- none known
Summary
In the Linux kernel, the following vulnerability has been resolved:
wifi: brcmfmac: fix use-after-free when rescheduling brcmf_btcoex_info work
The brcmf_btcoex_detach() only shuts down the btcoex timer, if the flag timer_on is false. However, the brcmf_btcoex_timerfunc(), which runs as timer handler, sets timer_on to false. This creates critical race conditions:
1.If brcmf_btcoex_detach() is called while brcmf_btcoex_timerfunc() is executing, it may observe timer_on as false and skip the call to timer_shutdown_sync().
2.The brcmf_btcoex_timerfunc() may then reschedule the brcmf_btcoex_info worker after the cancel_work_sync() has been executed, resulting in use-after-free bugs.
The use-after-free bugs occur in two distinct scenarios, depending on the timing of when the brcmf_btcoex_info struct is freed relative to the execution of its worker thread.
Scenario 1: Freed before the worker is scheduled
The brcmf_btcoex_info is deallocated before the worker is scheduled. A race condition can occur when schedule_work(&bt_local->work) is called after the target memory has been freed. The sequence of events is detailed below:
CPU0 | CPU1 brcmf_btcoex_detach | brcmf_btcoex_timerfunc | bt_local->timer_on = false; if (cfg->btcoex->timer_on) | ... | cancel_work_sync(); | ... | kfree(cfg->btcoex); // FREE | | schedule_work(&bt_local->work); // USE
Scenario 2: Freed after the worker is scheduled
The brcmf_btcoex_info is freed after the worker has been scheduled but before or during its execution. In this case, statements within the brcmf_btcoex_handler() — such as the container_of macro and subsequent dereferences of the brcmf_btcoex_info object will cause a use-after-free access. The following timeline illustrates this scenario:
CPU0 | CPU1 brcmf_btcoex_detach | brcmf_btcoex_timerfunc | bt_local->timer_on = false; if (cfg->btcoex->timer_on) | ... | cancel_work_sync(); | ... | schedule_work(); // Reschedule | kfree(cfg->btcoex); // FREE | brcmf_btcoex_handler() // Worker /* | btci = container_of(....); // USE The kfree() above could | ... also occur at any point | btci-> // USE during the worker's execution| */ |
To resolve the race conditions, drop the conditional check and call timer_shutdown_sync() directly. It can deactivate the timer reliably, regardless of its current state. Once stopped, the timer_on state is then set to false.
Patch / fix
- Linux Linux 5.15.210, 6.1.167, 6.6.105, 6.12.46, 6.16.6, 6.17
- linux Debian 12 6.1.170-1
- linux Debian 13 6.12.48-1
- linux Debian 14 6.16.6-1
debian advisories DEBIAN-CVE-2025-39863
- linux Ubuntu 22.04 LTS 5.15.0-198.208
- linux Ubuntu 24.04 LTS 6.8.0-106.106
- linux-aws Ubuntu 22.04 LTS 5.15.0-1117.124
- linux-aws Ubuntu 24.04 LTS 6.8.0-1050.53
- linux-gcp Ubuntu 22.04 LTS 5.15.0-1118.128
- linux-gcp Ubuntu 24.04 LTS 6.8.0-1052.55
- linux-gke Ubuntu 22.04 LTS 5.15.0-1113.119
- linux-gke Ubuntu 24.04 LTS 6.8.0-1048.53
ubuntu advisories UBUNTU-CVE-2025-39863
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- kernel-rt Linux Micro 6.2 6.12.0-160000.6.1
- kernel-64kb SLES 16.0, Linux Micro 6.2, SLES for SAP applications 16.0 6.12.0-160000.6.1
- kernel-source SLES 16.0, Linux Micro 6.2, SLES for SAP applications 16.0 6.12.0-160000.6.1
- kernel-default SLES 16.0, SLE High Availability Extension 16.0, Linux Micro 6.2 +1 more 6.12.0-160000.6.1
- kernel-default-base SLES 16.0, Linux Micro 6.2, SLES for SAP applications 16.0 6.12.0-160000.6.1.160000.2.4
- kernel-syms SLES 16.0, Linux Micro Extras 6.2, SLES for SAP applications 16.0 6.12.0-160000.6.1
- kernel-obs-qa SLES for SAP applications 16.0, SLES 16.0 6.12.0-160000.6.1
- kernel-kvmsmall SLES for SAP applications 16.0, SLES 16.0 6.12.0-160000.6.1
suse advisories SUSE-SU-2025:21074-1SUSE-SU-2025:21139-1SUSE-SU-2026:20560-1SUSE-SU-2025:21179-1SUSE-SU-2025:4141-1SUSE-SU-2025:4132-1
- kernel-rt openSUSE Leap 16.0 6.12.0-160000.6.1
- dtb-aarch64 openSUSE Leap 16.0 6.12.0-160000.6.1
- kernel-64kb openSUSE Leap 16.0 6.12.0-160000.6.1
- kernel-syms openSUSE Leap 16.0 6.12.0-160000.6.1
- kernel-obs-qa openSUSE Leap 16.0 6.12.0-160000.6.1
- kernel-source openSUSE Leap 16.0 6.12.0-160000.6.1
- kernel-default openSUSE Leap 16.0 6.12.0-160000.6.1
- kernel-kvmsmall openSUSE Leap 16.0 6.12.0-160000.6.1
opensuse advisories openSUSE-SU-2025:20081-1
- git.kernel.org/stable/c/c75600e69e66a751cc046cd9c407b942f298d852 commit
- git.kernel.org/stable/c/ae58f70bde0433f27ef4b388ab50634736607bf6 commit
- git.kernel.org/stable/c/f1150153c4e5940fe49ab51136343c5b4fe49d63 commit
- git.kernel.org/stable/c/3e789f8475f6c857c88de5c5bf4b24b11a477dd7 commit
- git.kernel.org/stable/c/2f6fbc8e04ca1d1d5c560be694199f847229c625 commit
- git.kernel.org/stable/c/9cb83d4be0b9b697eae93d321e0da999f9cdfcfc commit
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2025-39863 updated cvss 4.7
kernel: wifi: brcmfmac: fix use-after-free when rescheduling brcmf_btcoex_info work
-
Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 more Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 more Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +83 more Red Hat Enterprise Linux 10 kernelaffected: workaround, no fix available “To mitigate this issue, prevent module brcmfmac from being loaded. Please see https://access.redhat.com/solutions/41278 for how to blacklist a kernel module to prevent it from loading automatically.”
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
cisa ICSA-26-295-16 updated cvss 7.8
Siemens SIMATIC S7-1500 TM MFP
-
Siemens SIMATIC S7-1500 TM MFP - GNU/Linux subsystemaffected: mitigation, no fix available
Facts from CISA's republication of the vendor's own advisory (CSAF); the linked advisory is the authoritative source. CISA notification · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- 9 mo ago
Exploit prediction
0.16% chance of exploitation in the next 30 days, higher than 5% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| CISA ADP | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Affected products
- Linux Linux
- Siemens SIMATIC S7-1500 TM MFP - GNU/Linux subsystem
Classification
- Weakness
-
- CWE-416 Use After Free
- Technology feeds
References
- git.kernel.org /stable/c/c75600e69e66a751cc046cd9c407b942f298d852
- git.kernel.org /stable/c/ae58f70bde0433f27ef4b388ab50634736607bf6
-
git.kernel.org
/stable/c/f1150153c4e5940fe49ab51136343c5b4fe49d63
patch
-
git.kernel.org
/stable/c/3e789f8475f6c857c88de5c5bf4b24b11a477dd7
patch
-
git.kernel.org
/stable/c/2f6fbc8e04ca1d1d5c560be694199f847229c625
patch
-
git.kernel.org
/stable/c/9cb83d4be0b9b697eae93d321e0da999f9cdfcfc
patch
- cert-portal.siemens.com /productcert/html/ssa-784472.html
Sources
- CVE List CVE-2025-39863
- NVD CVE-2025-39863
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.