CVE-2026-99035: mmc: mtk-sd: Cancel request timeout work on remove
In the Linux kernel, the following vulnerability has been resolved:
mmc: mtk-sd: Cancel request timeout work on remove
The driver queues reqtimeout while a request is active. msdcrequestdone() uses canceldelayedwork(), which does not wait for a timeout callback that has already started.
The timeout callback calls mmcrequestdone(), which wakes the request waiter, and then continues to use host->devcomp and check the SDIO IRQ. During unbind, msdcdrvremove() can return and the managed mmchost can be freed before the callback finishes.
KASAN reported use-after-free accesses in msdcrequestdone() and msdcrechecksdioirq() in each of three unbind tests. The same tests completed without a kernel diagnostic after this change.
Call canceldelayedworksync() after mmcremovehost() has stopped new requests and before the driver releases the host resources.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In msdc_drv_remove(), call cancel_delayed_work_sync() after mmc_remove_host() to cancel and wait for the request-timeout callback before releasing host resources.