CVE-2026-80556: mmc: atmel-mci: Fix use-after-free in atmci_remove due to race condition
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
mmc: atmel-mci: Fix use-after-free in atmci_remove due to race condition
In atmci_probe, &host->bh_work is bound with atmci_work_func, and atmci_interrupt, atmci_timeout_timer and atmci_dma_complete can all queue this work on system_bh_wq.
If we remove the module, atmci_remove makes cleanup and the memory allocated for host with devm_kzalloc() is released after the remove callback returns, while the work mentioned above may still be pending or running. The sequence of operations that may lead to a UAF bug is as follows:
CPU0 CPU1
| atmci_interrupt
| queue_work(system_bh_wq,
| &host->bh_work)
atmci_remove |
atmci_cleanup_slot(...) |
atmci_writel(host, ATMCI_IDR, ~0UL) |
timer_delete_sync(&host->timer) |
dma_release_channel(host->dma.chan) |
free_irq(platform_get_irq(pdev, 0), host) |
| atmci_work_func
| // use host
// devm resources released after |
// remove returns, host is freed |
| // use host (use-after-free)Fix it by canceling the work after all the sources that can schedule it (IRQ handler, timeout timer and DMA completion callback) have been stopped, and before proceeding with the remaining cleanup in atmci_remove.
The Linux kernel CVE team has assigned CVE-2026-80556 to this issue.
Affected and fixed versions
===========================
Issue introduced in 2.6.27 with commit 7d2be0749a59096a334c94dc48f43294193cb8ed and fixed in 6.12.105 with commit 22aecf6c4721727a2f724ca0438bc7d4b609bf3f Issue introduced in 2.6.27 with commit 7d2be0749a59096a334c94dc48f43294193cb8ed and fixed in 6.18.46 with commit b5060ff2f5460795a3e9f7cdf5052aa42f96ff81 Issue introduced in 2.6.27 with commit 7d2be0749a59096a334c94dc48f43294193cb8ed and fixed in 7.1.10 with commit 7599a73ff66d195a908f5d88b427933a9fb1c02a Issue introduced in 2.6.27 with commit 7d2be0749a59096a334c94dc48f43294193cb8ed and fixed in 7.2 with commit c125ee35a49a0518521b52b27631eef061b8719a
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-80556
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/mmc/host/atmel-mci.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/22aecf6c4721727a2f724ca0438bc7d4b609bf3f https://git.kernel.org/stable/c/b5060ff2f5460795a3e9f7cdf5052aa42f96ff81 https://git.kernel.org/stable/c/7599a73ff66d195a908f5d88b427933a9fb1c02a https://git.kernel.org/stable/c/c125ee35a49a0518521b52b27631eef061b8719a