HIGH Introduced in 5.3
dw-edma TerminateAll UAF
CVE-2026-93042
CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
KernelScan AI6.9MEDIUM
01Description
In the Linux kernel, the following vulnerability has been resolved: dmaengine: dw-edma: Terminate all descriptors without callbacks The DMA Engine client documentation says in the "Terminate APIs" section of Documentation/driver-api/dmaengine/client.rst: "No callback functions will be called for any incomplete transfers." dw-edma instead calls vchan_cookie_complete() when a deferred STOP reaches the interrupt handler. This schedules a callback for the active descriptor and leaves other issued or submitted descriptors queued. A late callback after dmaengine_terminate_sync() can dereference client state that has already been freed, while leftover descriptors may later restart into reused buffers or leak. Move all issued and submitted descriptors to the terminated list whenever termination completes. For a pending STOP, do this from both the DONE and ABORT paths. Complete their cookies in order without scheduling callbacks. A STOP can remain pending until the running transfer raises an interrupt. Make device_synchronize() wait for such a pending STOP to complete before releasing terminated descriptors. Reuse it from free_chan_resources(), then release the remaining virt-dma resources. Sleep instead of busy-polling while waiting, and warn if the existing timeout expires.
02KernelScan AI Analysis
Risk summary
A race condition in the Synopsys dw-edma DMA engine driver allows a late completion callback to fire after a client has already freed its state, resulting in a use-after-free. Leftover descriptors can also restart into reused buffers or leak resources. Any local user who can trigger DMA transfers through a subsystem using this driver is at risk of kernel memory corruption or denial of service.
Vulnerability analysis
When a DMA client requests channel termination while a transfer is in progress, the dw-edma driver defers the STOP until the next interrupt. Upon that interrupt, the driver incorrectly schedules a completion callback for the active descriptor and leaves other pending descriptors queued, violating the DMA engine contract that no callbacks fire after termination. If the client has already freed the state the callback references—as it is entitled to do after calling the terminate API—the late callback dereferences freed memory, and leftover descriptors may later restart into reused buffers or leak. The fix moves all issued and submitted descriptors to a terminated list without scheduling callbacks whenever termination completes, from both the done and abort interrupt paths. It also adds a device synchronize operation that waits for any pending deferred STOP to finish before releasing resources, replacing busy-polling with sleeping and warning on timeout. The vulnerable code path is reachable locally by any process that can trigger DMA operations through a client subsystem using the dw-edma driver, which requires the Synopsys PCIe eDMA hardware to be present.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 6.12 | 5.3 | 6.12.110 | 4793f9099a1c |
| mainline | 5.3 | 7.3-rc1 | 99109a51efd2 |
| 6.6 | 5.3 | 6.6.157 | 65e387b95d38 |
| 6.18 | 5.3 | 6.18.52 | be87d86537de |
| 7.2 | 5.3 | 7.2.6 | f3ec6702a1d2 |
| cip/6.12 | 5.3 | 6.12.111-cip32 | 4793f9099a1c |