mmc: mtk-sd: Cancel request timeout work on remove
No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in Kernel f37e0367ad6f2147a0b37564b442b7a25bec0d23, Kernel 2cff6a2a912a3464ae1fefb7e0a82393682ccea6, Kernel 46e75703ca3f00fb8c935b3ce35b90836e34e8af and 12 more.
In the Linux kernel, the following vulnerability has been resolved: mmc: mtk-sd: Cancel request timeout work on remove The driver queues req_timeout while a request is active. msdc_request_done() uses cancel_delayed_work(), which does not wait for a timeout callback that has already started. The timeout callback calls mmc_request_done(), which wakes the request waiter, and then continues to use host->dev_comp and check the SDIO IRQ. During unbind, msdc_drv_remove() can return and the managed mmc_host can be freed before the callback finishes. KASAN reported use-after-free accesses in msdc_request_done() and msdc_recheck_sdio_irq() in each of three unbind tests. The same tests completed without a kernel diagnostic after this change. Call cancel_delayed_work_sync() after mmc_remove_host() has stopped new requests and before the driver releases the host resources.
Affected
Vendors, products and packages with version ranges
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| Linux | Kernel | >=208489032bdd8d4a7de50f3057c175058f271956 <f37e0367ad6f2147a0b37564b442b7a25bec0d23, >=208489032bdd8d4a7de50f3057c175058f271956 <2cff6a2a912a3464ae1fefb7e0a82393682ccea6, >=208489032bdd8d4a7de50f3057c175058f271956 <46e75703ca3f00fb8c935b3ce35b90836e34e8af, >=208489032bdd8d4a7de50f3057c175058f271956 <9e799f25c420e759641eb25102967ea091fc758f, >=208489032bdd8d4a7de50f3057c175058f271956 <b38af5386a74416e898955443f2e26547b358cb2, >=208489032bdd8d4a7de50f3057c175058f271956 <d8ce81006ee4e42ce2d0bd3a2ab87adc1e24ef11, >=208489032bdd8d4a7de50f3057c175058f271956 <e5d82695f2cabca3222b8f6a89ea0e18bafc4c0a, >=208489032bdd8d4a7de50f3057c175058f271956 <edef1355224c0799a502a46b71d3649fa0dd218e, =4.2 | f37e0367ad6f2147a0b37564b442b7a25bec0d23, 2cff6a2a912a3464ae1fefb7e0a82393682ccea6, 46e75703ca3f00fb8c935b3ce35b90836e34e8af, 9e799f25c420e759641eb25102967ea091fc758f, b38af5386a74416e898955443f2e26547b358cb2, d8ce81006ee4e42ce2d0bd3a2ab87adc1e24ef11, e5d82695f2cabca3222b8f6a89ea0e18bafc4c0a, edef1355224c0799a502a46b71d3649fa0dd218e |
| linux-kernel: Kernel | >=5.11.0 <5.15.224, >=5.16.0 <6.1.191, >=6.13.0 <6.18.57, >=6.19.0 <7.2.11, >=6.2.0 <6.6.160, >=6.7.0 <6.12.113, >=4.2.0 <5.10.273 | 5.15.224, 6.1.191, 6.18.57, 7.2.11, 6.6.160, 6.12.113, 5.10.273 |
Timeline
Every event on this vulnerability
Related
Other vulnerabilities in Kernel, strongest first
Embed
A live severity badge for an advisory, README or ticket