KernelScan.io

HIGH Introduced in 5.6

dmaengine DeviceRef Underflow

CVE-2026-98344

CVSS 7.8 / 10.0 KernelScan AI

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

01

In the Linux kernel, the following vulnerability has been resolved: dmaengine: Fix device kref underflow in dma_chan_put() dma_chan_get() takes chan->device->ref only on the slow path: /* no kref on fast path */ if (chan->client_count) { __module_get(owner); chan->client_count++; return 0; } if (!try_module_get(owner)) return -ENODEV; if (!dma_device_get(chan->device)) { // calls kref_get_unless_zero() dma_chan_put() drops the ref unconditionally, so every fast-path get/put pair drops one extra device reference. The bug fires when two conditions hold together: a non-private provider has a persistent client holding chan->client_count > 0 and another client cycles dmaengine_get()/dmaengine_put(). When the kref hits zero, the subsequent dma_find_channel() returns NULL even though the provider module is still loaded. Fix this by dropping device->ref only on the last put, matching the single slow-path get.

02

Engine v0.7.0

Risk summary

A reference counting asymmetry in the DMA engine subsystem causes a device kref to underflow when multiple clients cycle channel acquisitions. This can lead to premature device removal and use-after-free, potentially allowing a local attacker to escalate privileges or crash the kernel.

Affecteddrivers/dma/dmaengine.c (dmaengine subsystem)

Vulnerability analysis

The DMA engine subsystem acquires a device reference count only on the first channel allocation (the slow path), but releases it on every channel release. This asymmetry means each subsequent acquire/release cycle drops one extra device reference, causing the count to reach zero prematurely. When that happens, the device is removed from the internal channel list and its memory may be freed while a long-lived client still holds a channel reference, leading to a use-after-free. The fix changes the release path to only drop the device reference when the channel's client count reaches zero, matching the single acquisition on the slow path. The vulnerable code path is reachable from local userspace through normal I/O operations that utilize DMA channels, requiring no special privileges beyond a local account on a system with a non-private DMA provider and at least one persistent DMA client.

03

BranchIntroducedFixed inPatch commit
5.105.65.10.271036b527f9257
5.155.65.15.2225fb1797a8c94
6.15.66.1.18957f7f1c6827b
6.125.66.12.112de2677e57d31
6.185.66.18.541a0d9b406feb
6.65.66.6.1587c3f4ce651d4
7.25.67.2.877906ac448d2
mainline5.67.344dab659064e
cip/5.105.65.10.271-cip78036b527f9257
cip/5.10-rt5.65.10.272-cip79-rt35036b527f9257
cip/6.15.66.1.189-cip6157f7f1c6827b
cip/6.1-rt5.66.1.189-cip61-rt3257f7f1c6827b
cip/6.125.66.12.112-cip33de2677e57d31

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