Skip to content
Medium 4.7

spi: meson-spicc: fix invalid DMA unmap on mapping failure

CVE-2026-139394 First seen on SecPulse

Affected packages

PackageAffected → Fixed
LinuxLinux —
LinuxKernel
≥ 6.16.0, < 6.18.65→ 6.18.65
≥ 6.19.0, < 7.3.6→ 7.3.6

Fix status by distribution

Records published by each distribution for this CVE. Fixed versions differ by release; check each link.

Original description The description as published by the source.

In the Linux kernel, the following vulnerability has been resolved:

spi: meson-spicc: fix invalid DMA unmap on mapping failure

meson_spicc_dma_unmap() decided whether a buffer had to be unmapped by
testing its DMA address for non-zero. On a mapping failure
dma_map_single() returns DMA_MAPPING_ERROR (typically non-zero), so the
error path in meson_spicc_transfer_one() passed that error value to
dma_unmap_single(), unmapping an address which was never mapped. The
same happened for t->rx_dma on TX mapping failure, which is not written
at all.

Initialize both addresses to DMA_MAPPING_ERROR before mapping and use
dma_mapping_error() to decide, so only buffers which were actually
mapped are unmapped.

Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details