CVE-2026-53112: wifi: rtlwifi: pci: fix possible use-after-free caused by unfinished irq_prepare_bcn_tasklet
From: Greg Kroah-Hartman <[email protected]>
Description
===========
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.
The Linux kernel CVE team has assigned CVE-2026-53112 to this issue.
Affected and fixed versions
===========================
Issue introduced in 2.6.38 with commit 0c8173385e549f95cd80c3fff5aab87b4f881d8d and fixed in 5.10.258 with commit ae10d4a1ab6bcaa1336abb171908a9a365761d3e Issue introduced in 2.6.38 with commit 0c8173385e549f95cd80c3fff5aab87b4f881d8d and fixed in 5.15.209 with commit fac1079e0fdec6df6d7562c21941587236dc3def Issue introduced in 2.6.38 with commit 0c8173385e549f95cd80c3fff5aab87b4f881d8d and fixed in 6.1.175 with commit e40873820c9d245ce482faa7ad514ebdb3b8d23d Issue introduced in 2.6.38 with commit 0c8173385e549f95cd80c3fff5aab87b4f881d8d and fixed in 6.6.141 with commit 008c456b76e9070979bc0e763897a5d3b0fdd4dc Issue introduced in 2.6.38 with commit 0c8173385e549f95cd80c3fff5aab87b4f881d8d and fixed in 6.12.91 with commit 7731b67bd59d1284d150cbe40a47e95a10613234 Issue introduced in 2.6.38 with commit 0c8173385e549f95cd80c3fff5aab87b4f881d8d and fixed in 6.18.33 with commit aa10a452e34810987fb9f4a047995b30003fb53f Issue introduced in 2.6.38 with commit 0c8173385e549f95cd80c3fff5aab87b4f881d8d and fixed in 7.0.10 with commit 3c0e8a3179e6325a7dc6ce221aef0e03d854ab4b Issue introduced in 2.6.38 with commit 0c8173385e549f95cd80c3fff5aab87b4f881d8d and fixed in 7.1 with commit 039cd522dc70151da13329a5e3ae19b1736f468a
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-53112
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/realtek/rtlwifi/pci.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/ae10d4a1ab6bcaa1336abb171908a9a365761d3e https://git.kernel.org/stable/c/fac1079e0fdec6df6d7562c21941587236dc3def https://git.kernel.org/stable/c/e40873820c9d245ce482faa7ad514ebdb3b8d23d https://git.kernel.org/stable/c/008c456b76e9070979bc0e763897a5d3b0fdd4dc https://git.kernel.org/stable/c/7731b67bd59d1284d150cbe40a47e95a10613234 https://git.kernel.org/stable/c/aa10a452e34810987fb9f4a047995b30003fb53f https://git.kernel.org/stable/c/3c0e8a3179e6325a7dc6ce221aef0e03d854ab4b https://git.kernel.org/stable/c/039cd522dc70151da13329a5e3ae19b1736f468a