CVE-2026-139695: wifi: wfx: fix use-after-free of the cooling work on device removal
In the Linux kernel, the following vulnerability has been resolved:
wifi: wfx: fix use-after-free of the cooling work on device removal
When the device reports that it is too hot, wfxsuspendhotdev() blocks the Tx queues and arms coolingtimeoutwork with a 10s delay. If the device recovers a normal temperature before the delay expires, the work is canceled. Else, the work declares the chip frozen and unblocks the Tx queues.
However, this work is never canceled when the device is removed. coolingtimeoutwork is queued on the system workqueue, while struct wfxdev is released by wfxfreecommon() (through ieee80211freehw()). So, if the device is unbound during this 10s window, the work fires after struct wfxdev has been freed and dereferences it.
Cancel the work during the teardown. It has to be done after wfxbhunregister(): the "device too hot" indication is processed by the bh, so canceling the work earlier would allow the bh to rearm it. On the other hand, the work calls wfxtxunlock(), which may in turn call wfxbhrequesttx(). So it has to be canceled before bhwq is destroyed.
Note that the Tx queues are intentionally left blocked: the device is going away, so there is nothing to unblock.
The issue was reported by the Sashiko review bot and the fix has been written by Copilot (including the commit log). The use-case is difficult to reproduce, so this code has not been tested. However, I don't believe this patch could cause any regression.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.1.193 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.6.163 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.119 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.65 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.6 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.6-1 - Compensating control
Cancel cooling_timeout_work during device teardown before bh_wq is destroyed.
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Systems using the Linux kernel's wfx Wi-Fi driver are affected when a WFX device reports an over-temperature condition and its delayed cooling timeout work is pending.
What sequence triggers the use-after-free?
The device must be removed or unbound during the 10-second cooling-work delay, after the device has reported being too hot. The delayed work can then run from the system workqueue after the wfx_dev structure has been freed.
What is the required teardown fix?
The cooling timeout work must be canceled after wfx_bh_unregister(), so the bottom-half handler cannot rearm it, and before bh_wq is destroyed because the work can request transmission through the bottom-half path.