CVE-2026-139525: dmaengine: switchtec-dma: fix resource leak in alloc_chan_resources
dmaengine: switchtec-dma: fix resource leak in allocchanresources
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.6 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.6-1 - Compensating control
In switchtec_dma_alloc_chan_resources(), add an error-unwind path for failures after allocation: disable the channel, free the descriptor rings and coherent DMA memory, and clear ring_active and comp_ring_active under the same locks used by switchtec_dma_free_chan_resources() so the completion tasklet and any in-flight IRQ cannot access the completion ring.
Event History
Frequently Asked Questions
Which deployments are affected?
The issue applies to Linux kernel deployments using the switchtec-dma driver. It occurs when channel-resource allocation fails after descriptor rings and coherent DMA memory have been allocated, including when the device-removed check fails at that stage.
Why is normal dmaengine cleanup insufficient here?
The dmaengine core does not call device_free_chan_resources() when device_alloc_chan_resources() fails. The driver therefore must release its own partially allocated resources during the failure path.
What incorrect state can remain after a failed allocation?
Before the fix, descriptor rings and coherent DMA memory could remain allocated, and ring_active and comp_ring_active could remain set despite allocation reporting failure. A stale interrupt could still be in flight, so the active flags must be cleared using the locks used by normal channel-resource cleanup.