wifi: rtlwifi: pci: fix possible use-after-free caused by unfinished irq_prepare_bcn_tasklet
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 0c8173385e549f95cd80c3fff5aab87b4f881d8d · < aa10a452e34810987fb9f4a047995b30003fb53f| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
wifi: rtlwifi: pci: fix possible use-after-free caused by unfinished irq_prepare_bcn_tasklet
The irq_prepare_bcn_tasklet is initialized in rtl_pci_init() and scheduled when RTL_IMR_BCNINT interrupt is triggered by hardware. But it is never killed in rtl_pci_deinit(). When the rtlwifi card probe fails or is being detached, the ieee80211_hw is deallocated. However, irq_prepare_bcn_tasklet may still be running or pending, leading to use-after-free when the freed ieee80211_hw is accessed in _rtl_pci_prepare_bcn_tasklet().
Similar to irq_tasklet, add tasklet_kill() in rtl_pci_deinit() to ensure that irq_prepare_bcn_tasklet is properly terminated before the ieee80211_hw is released.
The issue was identified through static analysis.
From the CVE record · Linux
The Linux kernel’s rtlwifi PCI driver can access freed memory if a pending beacon tasklet runs after a card probe fails or the card is detached. The tasklet is scheduled by a hardware interrupt; the input does not establish an attacker path or authentication or user-interaction requirements. The issue was identified through static analysis.
Engineers running Linux systems with rtlwifi PCI cards should check their kernel versions; affected versions were not provided.