CVE-2026-139461: dma-direct: Restore arch_dma_alloc() for the DMA_ATTR_NO_KERNEL_MAPPING case
In the Linux kernel, the following vulnerability has been resolved:
dma-direct: Restore archdmaalloc() for the DMAATTRNOKERNELMAPPING case
Commit 849facea92fa ("dma-direct: simplify the DMAATTRNOKERNELMAPPING handling") moved the DMAATTRNOKERNELMAPPING shortcut in dmadirectalloc() in front of the archdmaalloc() call. Architectures providing their own DMA coherent allocator (CONFIGARCHHASDMAALLOC) therefore no longer see such requests. ARM 32bit is one of such. Lack of the call to archdmaalloc() results in the lack of proper cache management on HighMem pages.
Take the dma-direct shortcut only for coherent devices or when the architecture doesn't provide archdmaalloc(). While touching this, move that check into separate function to avoid duplication in alloc and free paths.
Affected Software
Event History
Frequently Asked Questions
Which deployments are most likely to encounter this issue?
ARM 32-bit is explicitly identified as an architecture that provides its own DMA coherent allocator through CONFIG_ARCH_HAS_DMA_ALLOC. The issue is relevant when DMA_ATTR_NO_KERNEL_MAPPING allocations involve HighMem pages, where bypassing the architecture allocator omits proper cache management.
What condition causes the incorrect allocation path?
The problematic path occurs when the DMA_ATTR_NO_KERNEL_MAPPING shortcut is taken before arch_dma_alloc() on an architecture that provides arch_dma_alloc(). This prevents the architecture-specific allocator from handling the request.
How does the fix change DMA allocation behavior?
The direct dma-direct shortcut is now taken only for coherent devices or when the architecture does not provide arch_dma_alloc(). For architectures with their own allocator, DMA_ATTR_NO_KERNEL_MAPPING requests are again routed through arch_dma_alloc().