{"id":"CVE-2026-143370","state":"PUBLISHED","title":"ALSA: memalloc: Free the new pages when WC DMA mapping fails","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nALSA: memalloc: Free the new pages when WC DMA mapping fails\n\nsnd_dma_wc_alloc() keeps the newly allocated pages in a local variable,\nand snd_dma_alloc_dir_pages() stores them in dmab->area only after\n->alloc() returns.  If dma_map_single() fails, the error path passes\ndmab->area to do_free_pages() instead, and that is still NULL at this\npoint for the usual callers.\n\nThe pages are then leaked with their write-combining attribute still\nset, set_memory_wb() warns about the zero address, and for buffers\nlarger than a page free_pages_exact() goes on to free the struct pages\nof the bogus addresses 4096, 8192 and so on.  With CONFIG_DEBUG_VM that\nhits the VM_BUG_ON() in free_pages():\n\n  kernel BUG at mm/page_alloc.c:5600!\n  RIP: 0010:free_pages_exact+0xcb/0xd0\n  Call Trace:\n   snd_dma_wc_alloc+0x14f/0x160 [snd_pcm]\n   snd_dma_alloc_dir_pages+0x4f/0x80 [snd_pcm]\n\nThis was reproduced on an x86 guest without swiotlb by allocating\nSNDRV_DMA_TYPE_DEV_WC buffers for a device with a 24-bit streaming DMA\nmask, so that dma_map_single() fails.\n\nFree the pages that were just allocated.","publishedAt":"2026-12-03T09:22:20.671Z","updatedAt":"2026-12-03T09:22:20.671Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"c880a5146642e9d35f88aaa353ae98ffd4fc3f99","status":"affected","lessThan":"21c0f420ded667ee644f78b901fc739fe0f12810","versionType":"git"},{"version":"c880a5146642e9d35f88aaa353ae98ffd4fc3f99","status":"affected","lessThan":"ca2477af20443184f685b747f38a05b27ccb0b68","versionType":"git"},{"version":"c880a5146642e9d35f88aaa353ae98ffd4fc3f99","status":"affected","lessThan":"f733176cb4c68ca03297f47f1a5acc7a9501b0b6","versionType":"git"},{"version":"c880a5146642e9d35f88aaa353ae98ffd4fc3f99","status":"affected","lessThan":"016fe9695e6dc1322ddfe8c7dbc7b973483b4a24","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["sound/core/memalloc.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.12","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.12","versionType":"semver"},{"version":"6.12.120","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.66","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["sound/core/memalloc.c"]}],"references":["https://git.kernel.org/stable/c/21c0f420ded667ee644f78b901fc739fe0f12810","https://git.kernel.org/stable/c/ca2477af20443184f685b747f38a05b27ccb0b68","https://git.kernel.org/stable/c/f733176cb4c68ca03297f47f1a5acc7a9501b0b6","https://git.kernel.org/stable/c/016fe9695e6dc1322ddfe8c7dbc7b973483b4a24"],"weaknesses":[],"ingestedAt":"2026-12-03T09:44:04.436Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/143xxx/CVE-2026-143370.json","commit":"9e309c7c0f08856e2558a1df33f75dca027fab70","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-143370","state":"PUBLISHED","datePublished":"2026-12-03T09:22:20.671Z","dateUpdated":"2026-12-03T09:22:20.671Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-12-03T03:10:28.371Z"},"containers":{"cna":{"title":"ALSA: memalloc: Free the new pages when WC DMA mapping fails","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nALSA: memalloc: Free the new pages when WC DMA mapping fails\n\nsnd_dma_wc_alloc() keeps the newly allocated pages in a local variable,\nand snd_dma_alloc_dir_pages() stores them in dmab->area only after\n->alloc() returns.  If dma_map_single() fails, the error path passes\ndmab->area to do_free_pages() instead, and that is still NULL at this\npoint for the usual callers.\n\nThe pages are then leaked with their write-combining attribute still\nset, set_memory_wb() warns about the zero address, and for buffers\nlarger than a page free_pages_exact() goes on to free the struct pages\nof the bogus addresses 4096, 8192 and so on.  With CONFIG_DEBUG_VM that\nhits the VM_BUG_ON() in free_pages():\n\n  kernel BUG at mm/page_alloc.c:5600!\n  RIP: 0010:free_pages_exact+0xcb/0xd0\n  Call Trace:\n   snd_dma_wc_alloc+0x14f/0x160 [snd_pcm]\n   snd_dma_alloc_dir_pages+0x4f/0x80 [snd_pcm]\n\nThis was reproduced on an x86 guest without swiotlb by allocating\nSNDRV_DMA_TYPE_DEV_WC buffers for a device with a 24-bit streaming DMA\nmask, so that dma_map_single() fails.\n\nFree the pages that were just allocated."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"c880a5146642e9d35f88aaa353ae98ffd4fc3f99","status":"affected","lessThan":"21c0f420ded667ee644f78b901fc739fe0f12810","versionType":"git"},{"version":"c880a5146642e9d35f88aaa353ae98ffd4fc3f99","status":"affected","lessThan":"ca2477af20443184f685b747f38a05b27ccb0b68","versionType":"git"},{"version":"c880a5146642e9d35f88aaa353ae98ffd4fc3f99","status":"affected","lessThan":"f733176cb4c68ca03297f47f1a5acc7a9501b0b6","versionType":"git"},{"version":"c880a5146642e9d35f88aaa353ae98ffd4fc3f99","status":"affected","lessThan":"016fe9695e6dc1322ddfe8c7dbc7b973483b4a24","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["sound/core/memalloc.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.12","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.12","versionType":"semver"},{"version":"6.12.120","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.66","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["sound/core/memalloc.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/21c0f420ded667ee644f78b901fc739fe0f12810"},{"url":"https://git.kernel.org/stable/c/ca2477af20443184f685b747f38a05b27ccb0b68"},{"url":"https://git.kernel.org/stable/c/f733176cb4c68ca03297f47f1a5acc7a9501b0b6"},{"url":"https://git.kernel.org/stable/c/016fe9695e6dc1322ddfe8c7dbc7b973483b4a24"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-12-03T09:22:20.671Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12","versionEndExcluding":"6.12.120"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12","versionEndExcluding":"6.18.66"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12","versionEndExcluding":"7.3.7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12","versionEndExcluding":"7.4-rc2"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}