wifi: wcn36xx: Fix potential use-after-free in TX ack timer teardown
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ fdf21cc3714939dd4327f3d664fe5863d15ccb31 · < 2bddc5d088cf430ecd913020472f1def32a36a3d| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
wifi: wcn36xx: Fix potential use-after-free in TX ack timer teardown
wcn36xx_dxe_deinit() tears down the TX ack timer with timer_delete(), which only dequeues the timer and does not wait for a callback that is already executing; the preceding free_irq() calls synchronize the interrupt handlers only. The callback, wcn36xx_dxe_tx_timer(), can therefore be running past the teardown and use the wcn freed along with the ieee80211_hw in wcn36xx_remove(): it takes wcn->dxe_lock, reads wcn->tx_ack_skb and passes wcn->hw to ieee80211_tx_status_irqsafe().
Fix this by using timer_shutdown_sync(), which waits for a running callback and also prevents the timer from being rearmed again. The timer is set up again by wcn36xx_dxe_init() on the next start, so the start/stop cycle is unaffected.
This issue was found by an in-house static analysis tool.
From the CVE record · Linux
The Linux kernel's wcn36xx Wi-Fi driver may free data while its TX ack timer callback is still running, causing a potential use-after-free. The input does not describe an attacker path, authentication requirements, or user interaction conditions.
Engineers running Linux kernels with the wcn36xx Wi-Fi driver should check their kernel version; affected versions are not specified.