CVE-2026-139525

dmaengine: switchtec-dma: fix resource leak in alloc_chan_resources

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

dmaengine: switchtec-dma: fix resource leak in alloc_chan_resources

switchtec_dma_alloc_chan_resources() returns directly on any later
failure, without ever freeing the descriptor rings and coherent DMA
memory it just allocated. The dmaengine core does not call
device_free_chan_resources() when device_alloc_chan_resources() fails,
so the driver has to unwind its own partial state.

The device-removed check also runs after ring_active and
comp_ring_active have already been set true, so a failure there left
the channel marked active despite alloc_chan_resources() reporting
failure.

Add an error-unwind path that disables the channel and frees the
descriptor rings on every failure after allocation. ring_active and
comp_ring_active are cleared under the same locks
switchtec_dma_free_chan_resources() already uses, since the completion
tasklet checks comp_ring_active under complete_lock before touching
the completion ring, and a stale IRQ can still be in flight when this
unwind path runs.

Analysis

AI-generated

Technical impact

The Switchtec DMA driver in the Linux kernel fails to free descriptor rings and coherent DMA memory when channel allocation fails. This missing cleanup path leads to a memory and resource leak that can exhaust kernel memory and leave channel structures marked active after a failure. The consequence is potential system instability and denial of service due to depleted resources or corrupted driver state.

Affected Systems

All Linux kernel builds containing the switchtec-dma driver are affected, as vendor data lists Linux:Linux with no specific version limits. Any kernel version prior to the inclusion of the described commits can be vulnerable.

Risk and Exploitability

The CVSS score is not specified and EPSS is unavailable, but the vulnerability is not listed in CISA’s KEV catalog. The attack vector is likely local; a privileged user who can induce a DMA channel allocation failure could trigger the resource leak repeatedly, leading to exhaustion of kernel memory or sustained improper driver state. No public exploits are reported, yet the potential for denial of service warrants attention.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the kernel patch that incorporates commits 1188942d6160b9f799af297bdb5d7812cd7fde6d and 40c59812a3193d01fc52be22f86eb485f37a27de to free resources properly on allocation failure.
  • If a newer kernel release is available, upgrade to that version to eliminate the issue.
  • If immediate kernel upgrade is not possible, manually cherry‑pick the relevant commits into the running kernel and rebuild the module.
  • Disable or uninstall the Switchtec DMA driver until the patch is applied to prevent accidental activation of the vulnerable code.
  • Monitor system logs for messages related to DMA channel failures or stale interrupt handling to confirm remediation.

Generated by OpenCVE AI on November 30, 2026 at 23:11 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-401
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: dmaengine: switchtec-dma: fix resource leak in alloc_chan_resources switchtec_dma_alloc_chan_resources() returns directly on any later failure, without ever freeing the descriptor rings and coherent DMA memory it just allocated. The dmaengine core does not call device_free_chan_resources() when device_alloc_chan_resources() fails, so the driver has to unwind its own partial state. The device-removed check also runs after ring_active and comp_ring_active have already been set true, so a failure there left the channel marked active despite alloc_chan_resources() reporting failure. Add an error-unwind path that disables the channel and frees the descriptor rings on every failure after allocation. ring_active and comp_ring_active are cleared under the same locks switchtec_dma_free_chan_resources() already uses, since the completion tasklet checks comp_ring_active under complete_lock before touching the completion ring, and a stale IRQ can still be in flight when this unwind path runs.
Title dmaengine: switchtec-dma: fix resource leak in alloc_chan_resources
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-401

    Missing Release of Memory after Effective Lifetime

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:35 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:19 PM
Modified
Nov 30, 2026, 2:19 PM