KernelScan.io

HIGH Introduced in 2.6.29

dmaengine DeviceRelease UAF

CVE-2026-98342

CVSS 7.0 / 10.0 KernelScan AI

CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

01

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.

02

Engine v0.7.0

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.

Affecteddrivers/dma/dmaengine.c (dmaengine core)

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.

03

BranchIntroducedFixed inPatch commit
5.102.6.295.10.271ac8ce9f89638
5.152.6.295.15.22214578c78405d
6.12.6.296.1.189cbb3310a5167
6.122.6.296.12.1124448a539a0c3
6.182.6.296.18.54fc1f4884f1d4
6.62.6.296.6.1588577a5ec4f7e
7.22.6.297.2.84aed7e47a10b
mainline2.6.297.3dc750422170a
cip/5.102.6.295.10.271-cip78ac8ce9f89638
cip/5.10-rt2.6.295.10.272-cip79-rt35ac8ce9f89638
cip/6.12.6.296.1.189-cip61cbb3310a5167
cip/6.1-rt2.6.296.1.189-cip61-rt32cbb3310a5167
cip/6.122.6.296.12.112-cip334448a539a0c3

04

State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.

CIP treeState
cip/6.12Fixed in 6.12.112-cip33
cip/6.1Fixed in 6.1.189-cip61
cip/6.1-rtFixed in 6.1.189-cip61-rt32
cip/5.10Fixed in 5.10.271-cip78
cip/5.10-rtFixed in 5.10.272-cip79-rt35
cip/4.19Affected — no CIP fix yet (latest 4.19.325-cip137)
cip/4.19-rtAffected — no CIP fix yet (latest 4.19.325-cip137-rt51)
cip/4.4Affected — no CIP fix yet (latest 4.4.302-cip116)
cip/4.4-rtAffected — no CIP fix yet (latest 4.4.302-cip115-rt63)