HIGH Introduced in 2.6.29
dmaengine DeviceRelease UAF
CVE-2026-98342
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
01Description
In the Linux kernel, the following vulnerability has been resolved: dmaengine: wait for RCU readers before releasing dma_device dma_issue_pending_all() walks the dma_device_list with list_for_each_entry_rcu() under rcu_read_lock(). dma_device_release() unlinks the device with list_del_rcu() and then calls device->device_release() (which in many drivers, such as plx_dma.c, directly calls kfree()). Because there is no grace period between unlinking the device and freeing it, concurrent RCU readers in dma_issue_pending_all() can access the device after it has been freed. The lockless walk originally relied on clients holding a dmaengine reference to pin the provider module, and therefore the device, for as long as they might traverse the list. Commit 8ad342a86359 ("dmaengine: Add reference counting to dma_device struct") decoupled the dma_device lifetime from the module reference, so the device can now be released while a reader is still walking the list. Add synchronize_rcu() before the device is freed, so RCU readers are guaranteed to have finished. Keep it unconditional: providers that do not implement device_release() free the device themselves once dma_async_device_unregister() returns. This call will delay for a grace period with dma_list_mutex held, which is safe and only teardown path is delayed.
02KernelScan AI Analysis
Risk summary
A use-after-free in the DMA engine core allows a local attacker to exploit a race between device teardown and concurrent RCU list traversal. If the race is won, the attacker can access freed kernel memory, potentially leading to privilege escalation or kernel panic. The vulnerability requires local access and winning a narrow race window.
Vulnerability analysis
A race condition in the DMA engine core allows a device structure to be freed while another code path is still traversing the global device list under RCU protection. When a DMA device is unregistered, it is unlinked from the list and immediately freed without waiting for in-flight RCU readers to finish. A concurrent caller walking the list can then dereference the freed memory. The fix inserts a grace-period wait between unlinking the device and releasing its memory, guaranteeing that all RCU readers have exited their critical sections before the object is freed. The vulnerable path is reachable locally: the reader side can be triggered by ordinary operations such as network traffic or asynchronous transactions, while the teardown side occurs when a DMA device is removed or its driver is unloaded.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 5.10 | 2.6.29 | 5.10.271 | ac8ce9f89638 |
| 5.15 | 2.6.29 | 5.15.222 | 14578c78405d |
| 6.1 | 2.6.29 | 6.1.189 | cbb3310a5167 |
| 6.12 | 2.6.29 | 6.12.112 | 4448a539a0c3 |
| 6.18 | 2.6.29 | 6.18.54 | fc1f4884f1d4 |
| 6.6 | 2.6.29 | 6.6.158 | 8577a5ec4f7e |
| 7.2 | 2.6.29 | 7.2.8 | 4aed7e47a10b |
| mainline | 2.6.29 | 7.3 | dc750422170a |
| cip/5.10 | 2.6.29 | 5.10.271-cip78 | ac8ce9f89638 |
| cip/5.10-rt | 2.6.29 | 5.10.272-cip79-rt35 | ac8ce9f89638 |
| cip/6.1 | 2.6.29 | 6.1.189-cip61 | cbb3310a5167 |
| cip/6.1-rt | 2.6.29 | 6.1.189-cip61-rt32 | cbb3310a5167 |
| cip/6.12 | 2.6.29 | 6.12.112-cip33 | 4448a539a0c3 |
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.112-cip33 |
| cip/6.1 | Fixed in 6.1.189-cip61 |
| cip/6.1-rt | Fixed in 6.1.189-cip61-rt32 |
| cip/5.10 | Fixed in 5.10.271-cip78 |
| cip/5.10-rt | Fixed in 5.10.272-cip79-rt35 |
| 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) |