CVE-2026-97507: media: dm1105: fix missing error check for dma_alloc_coherent
In the Linux kernel, the following vulnerability has been resolved:
media: dm1105: fix missing error check for dmaalloccoherent
The return value of dm1105dmamap(), which handles DMA memory allocation, is ignored in dm1105hwinit(). If dmaalloccoherent() fails, the driver will proceed using a NULL pointer for DMA transfers, leading to a kernel oops or invalid hardware access.
Fix this by checking the return value and propagating -ENOMEM on failure.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In dm1105_hw_init(), check the return value of dm1105_dma_map() and propagate -ENOMEM when dma_alloc_coherent() fails, preventing DMA transfers from using a NULL pointer.
Event History
Frequently Asked Questions
What conditions are required to trigger the failure?
The dm1105 driver must be initialized and its coherent DMA memory allocation must fail. The affected initialization path previously ignored the allocation failure and continued with a NULL DMA pointer.
What is the likely impact if the allocation fails on an unpatched kernel?
The driver may use a NULL pointer for DMA transfers, causing a kernel oops or invalid hardware access. The fix instead propagates -ENOMEM and stops initialization when DMA allocation fails.
How can administrators tell whether the fix is present?
Check whether the kernel includes the dm1105 change that verifies the return value of dm1105_dma_map() in dm1105_hw_init() and returns -ENOMEM on failure. The provided stable commit references identify versions containing the correction.