{"id":"CVE-2026-139525","aliases":["CVE-2026-139525"],"related":[],"kind":"vulnerability","state":"published","title":"dmaengine: switchtec-dma: fix resource leak in alloc_chan_resources","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\ndmaengine: switchtec-dma: fix resource leak in alloc_chan_resources\n\nswitchtec_dma_alloc_chan_resources() returns directly on any later\nfailure, without ever freeing the descriptor rings and coherent DMA\nmemory it just allocated. The dmaengine core does not call\ndevice_free_chan_resources() when device_alloc_chan_resources() fails,\nso the driver has to unwind its own partial state.\n\nThe device-removed check also runs after ring_active and\ncomp_ring_active have already been set true, so a failure there left\nthe channel marked active despite alloc_chan_resources() reporting\nfailure.\n\nAdd an error-unwind path that disables the channel and frees the\ndescriptor rings on every failure after allocation. ring_active and\ncomp_ring_active are cleared under the same locks\nswitchtec_dma_free_chan_resources() already uses, since the completion\ntasklet checks comp_ring_active under complete_lock before touching\nthe completion ring, and a stale IRQ can still be in flight when this\nunwind path runs.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\ndmaengine: switchtec-dma: fix resource leak in alloc_chan_resources\n\nswitchtec_dma_alloc_chan_resources() returns directly on any later\nfailure, without ever freeing the descriptor rings and coherent DMA\nmemory it just allocated. The dmaengine core does not call\ndevice_free_chan_resources() when device_alloc_chan_resources() fails,\nso the driver has to unwind its own partial state.\n\nThe device-removed check also runs after ring_active and\ncomp_ring_active have already been set true, so a failure there left\nthe channel marked active despite alloc_chan_resources() reporting\nfailure.\n\nAdd an error-unwind path that disables the channel and frees the\ndescriptor rings on every failure after allocation. ring_active and\ncomp_ring_active are cleared under the same locks\nswitchtec_dma_free_chan_resources() already uses, since the completion\ntasklet checks comp_ring_active under complete_lock before touching\nthe completion ring, and a stale IRQ can still be in flight when this\nunwind path runs.","source":"cvelist"}],"published":"2026-11-30T13:35:33.539Z","modified":"2026-11-30T14:19:28.897Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"30eba9df76adf1294e88214dbf9cea402fa7af37","fixed":"40c59812a3193d01fc52be22f86eb485f37a27de","status":"affected"},{"type":"git","introduced":"30eba9df76adf1294e88214dbf9cea402fa7af37","fixed":"1188942d6160b9f799af297bdb5d7812cd7fde6d","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"7.1","status":"affected"},{"type":"semver","introduced":"0","fixed":"7.1","status":"unaffected"},{"type":"semver","introduced":"7.3.6","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/40c59812a3193d01fc52be22f86eb485f37a27de","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1188942d6160b9f799af297bdb5d7812cd7fde6d","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-139525","url":"https://www.cve.org/CVERecord?id=CVE-2026-139525","licence":"CVE Terms of Use","modified":"2026-11-30T13:35:33.539Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-139525","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139525","licence":"Public domain","modified":"2026-11-30T14:19:28.897Z"}],"updatedAt":"2026-11-30T14:33:27.242Z","epss":{"score":0.0019,"percentile":0.09063,"date":"2026-12-01T12:00:22.000Z"}}