CVE-2026-139742
published high CVSS 3.1 · 7.0dmaengine: sun6i-dma: Fix use-after-free in error handling paths
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linux555859308723d8d5b828304f5eb9281143fd86b5 to < 33df8996d07f9cce03267b9a82b5fc6be639be24 · 555859308723d8d5b828304f5eb9281143fd86b5 to < 8f7cc77013a4081fa23f1f28cbfa5499d1f412c9 · 555859308723d8d5b828304f5eb9281143fd86b5 to < 8bd642fa60620eb9cfadb1325d97114cf0740ba9 · 555859308723d8d5b828304f5eb9281143fd86b5 to < 23225f80c21290a5c74ce668208d0e99074f70e4 · 555859308723d8d5b828304f5eb9281143fd86b5 to < a521cd3421e69c3c3fe69d24f393bd791c04b21d · 555859308723d8d5b828304f5eb9281143fd86b5 to < 8018040c732dbf5fa2af4b63d809b5a269b4d23c · 555859308723d8d5b828304f5eb9281143fd86b5 to < 67045b9cd61abc008223580e652f87d46239918f · 555859308723d8d5b828304f5eb9281143fd86b5 to < f472919f4c0650d7fb22bb230eacaada0c6ee951 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux3.17 (affected) · 0 to < 3.17 (unaffected · semver) · 5.10.275 through 5.10.* (unaffected · semver) · 5.15.226 through 5.15.* (unaffected · semver) · 6.1.193 through 6.1.* (unaffected · semver) · 6.6.163 through 6.6.* (unaffected · semver) · 6.12.119 through 6.12.* (unaffected · semver) · 6.18.65 through 6.18.* (unaffected · semver) · 7.3.6 through 7.3.* (unaffected · semver) · 7.4-rc1 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
Description
In the Linux kernel, the following vulnerability has been resolved: dmaengine: sun6i-dma: Fix use-after-free in error handling paths In error handling paths, the for loop frees v_lli in the loop body, then accesses v_lli->v_lli_next and v_lli->p_lli_next in the increment expression, which is use-after-free. Fix by refactoring the cleanup into a helper function sun6i_dma_free_desc() that saves both the next virtual and physical pointers before freeing the current node, preventing the use-after-free.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.0 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
- Scenarios
- en: AV:L - The faulty err_lli_free walk in sun6i_dma_prep_dma_cyclic()/prep_slave_sg() is reached through in-kernel DMA clients, e.g. SNDRV_PCM_IOCTL_START on an Allwinner codec/I2S PCM -> snd_dmaengine_pcm_trigger -> dmaengine_pcm_prepare_and_submit -> dmaengine_prep_dma_cyclic; no remote input is involved. AC:H - A user can force the GFP_NOWAIT dma_pool_alloc failure (64-byte periods, 512KB buffers drain the 256KB atomic pool), but the freed LLI keeps valid p_lli_next/v_lli_next at offsets 20/24 unless SLUB_DEBUG_ON poisons it, init_on_free zeroes it, or a concurrent prep on another channel wins a two-load IRQs-off window to reuse the block. PR:L - The ALSA PCM ioctl path to sun6i_dma_prep_dma_cyclic has no capability check; /dev/snd/pcm* is granted to the audio group or the logged-in seat user, so an ordinary unprivileged local account suffices. UI:N - The attacker opens the PCM streams, sizes the buffers and issues START themselves; no other user has to take any action. S:U - The corruption stays inside the kernel's sun6i-dma descriptor pool and the DMA transfers that the same kernel manages; no VM, IOMMU or sandbox boundary is crossed. C:H - If the freed LLI is reused before it is read, the walk follows into another channel's live descriptor chain and frees it. The controller then fetches recycled LLIs with foreign src/dst addresses and can DMA other buffers' contents out to a peripheral. I:H - The same walk causes a silent double free in the dma_pool (non-debug pool_block_err does no double-free check), so one LLI goes to two descriptors. The hardware then DMA-writes device data into memory that belongs to another transfer. A:H - With SLUB_DEBUG_ON the 0xa7 free poison in v_lli_next becomes a wild pointer that oopses the prep loop under the PCM stream lock. With init_on_free the zeroed link ends the walk early and permanently leaks thousands of LLIs, breaking DMA on that controller.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | 555859308723d8d5b828304f5eb9281143fd86b5 to < 33df8996d07f9cce03267b9a82b5fc6be639be24 (affected · git)555859308723d8d5b828304f5eb9281143fd86b5 to < 8f7cc77013a4081fa23f1f28cbfa5499d1f412c9 (affected · git)555859308723d8d5b828304f5eb9281143fd86b5 to < 8bd642fa60620eb9cfadb1325d97114cf0740ba9 (affected · git)555859308723d8d5b828304f5eb9281143fd86b5 to < 23225f80c21290a5c74ce668208d0e99074f70e4 (affected · git)555859308723d8d5b828304f5eb9281143fd86b5 to < a521cd3421e69c3c3fe69d24f393bd791c04b21d (affected · git)555859308723d8d5b828304f5eb9281143fd86b5 to < 8018040c732dbf5fa2af4b63d809b5a269b4d23c (affected · git)555859308723d8d5b828304f5eb9281143fd86b5 to < 67045b9cd61abc008223580e652f87d46239918f (affected · git)555859308723d8d5b828304f5eb9281143fd86b5 to < f472919f4c0650d7fb22bb230eacaada0c6ee951 (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 3.17 (affected)0 to < 3.17 (unaffected · semver)5.10.275 through 5.10.* (unaffected · semver)5.15.226 through 5.15.* (unaffected · semver)6.1.193 through 6.1.* (unaffected · semver)6.6.163 through 6.6.* (unaffected · semver)6.12.119 through 6.12.* (unaffected · semver)6.18.65 through 6.18.* (unaffected · semver)7.3.6 through 7.3.* (unaffected · semver)7.4-rc1 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
8- https://git.kernel.org/stable/c/23225f80c21290a5c74ce668208d0e99074f70e4
- https://git.kernel.org/stable/c/33df8996d07f9cce03267b9a82b5fc6be639be24
- https://git.kernel.org/stable/c/67045b9cd61abc008223580e652f87d46239918f
- https://git.kernel.org/stable/c/8018040c732dbf5fa2af4b63d809b5a269b4d23c
- https://git.kernel.org/stable/c/8bd642fa60620eb9cfadb1325d97114cf0740ba9
- https://git.kernel.org/stable/c/8f7cc77013a4081fa23f1f28cbfa5499d1f412c9
- https://git.kernel.org/stable/c/a521cd3421e69c3c3fe69d24f393bd791c04b21d
- https://git.kernel.org/stable/c/f472919f4c0650d7fb22bb230eacaada0c6ee951
Provider assertions
1Linux · cna
dmaengine: sun6i-dma: Fix use-after-free in error handling paths
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 4a503e058279796d9827a8554b7bace0e394677a39f1e0861c812cd5919ef6b0
- Ingested
- 01 Dec 2026, 05:47:22 UTC
- Source record
- Official CVE record