CVE-2026-139525

Source
https://cve.org/CVERecord?id=CVE-2026-139525
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139525.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-139525
Downstream
Published
2026-11-30T13:35:33Z
Modified
2026-11-30T15:02:28Z
Summary
dmaengine: switchtec-dma: fix resource leak in alloc_chan_resources
Details

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.

Database specific
{
    "cna_assigner":  "Linux",
    "osv_generated_from":  "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139525.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
30eba9df76adf1294e88214dbf9cea402fa7af37
Fixed
40c59812a3193d01fc52be22f86eb485f37a27de
Fixed
1188942d6160b9f799af297bdb5d7812cd7fde6d

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139525.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
7.1.0
Fixed
7.3.6

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139525.json"