HIGH Introduced in 2.6.27
atmel-mci BhWork UAF
CVE-2026-80556
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI6.3MEDIUM
01Description
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.
02KernelScan AI Analysis
Risk summary
A race condition in the Atmel MCI MMC host driver allows a use-after-free when the driver is removed while interrupt-driven work is still pending. A local attacker who can trigger module removal or device teardown while MMC activity is in progress could exploit this to corrupt kernel memory, potentially escalating privileges or causing a system crash. The vulnerability requires specific hardware (Atmel MCI MMC controller) and local access.
Vulnerability analysis
During driver teardown, the cleanup path stops the interrupt handler, timer, and DMA channel but does not wait for a pending work item that still references the host structure. After the remove callback returns, managed memory frees the host object, while the work function may still run and access it, resulting in a use-after-free. The fix ensures the pending work is canceled and finished after all sources that can schedule it have been stopped, but before the host memory is released. The vulnerable path is reachable locally by triggering module removal or device unbinding on a system with the Atmel MCI MMC controller present.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 6.12 | 2.6.27 | 6.12.105 | 22aecf6c4721 |
| 6.18 | 2.6.27 | 6.18.46 | b5060ff2f546 |
| 7.1 | 2.6.27 | 7.1.10 | 7599a73ff66d |
| mainline | 2.6.27 | 7.2 | c125ee35a49a |
| cip/6.12 | 2.6.27 | 6.12.108-cip31 | 22aecf6c4721 |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Fixed in 6.12.108-cip31 |
| cip/6.1 | Affected — no CIP fix yet (latest 6.1.189-cip61) |
| cip/6.1-rt | Affected — no CIP fix yet (latest 6.1.189-cip61-rt32) |
| cip/5.10 | Affected — no CIP fix yet (latest 5.10.271-cip78) |
| cip/5.10-rt | Affected — no CIP fix yet (latest 5.10.268-cip77-rt34) |
| cip/4.19 | Affected — no CIP fix yet (latest 4.19.325-cip136) |
| cip/4.19-rt | Affected — no CIP fix yet (latest 4.19.325-cip136-rt50) |
| cip/4.4 | Affected — no CIP fix yet (latest 4.4.302-cip115) |
| cip/4.4-rt | Affected — no CIP fix yet (latest 4.4.302-cip115-rt63) |