# CVE-2026-139394: spi: meson-spicc: fix invalid DMA unmap on mapping failure

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.21%, higher than 11% of CVEs (2026-12-01)
- Published: 2026-11-30T13:34:21.095Z
- Modified: 2026-11-30T14:19:07.523Z
- Assigned by: Linux

## Description

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.

(As written by CVE List.)

## Affected

- Linux Linux: from 18197e98353d931fc7bb2bb9ec671d3aa407831d before 6a8a2e45db5f556fa4d7a1613902ef6e7b69ec79; from 18197e98353d931fc7bb2bb9ec671d3aa407831d before 4978cf22bbce163a6209b60dc3c0955fb0c8db3b; from 18197e98353d931fc7bb2bb9ec671d3aa407831d before 9d71f9fe5b5de916bded51343138b09b1eb103ed; 6.16 (not affected: before 6.16; from 6.18.65 up to 6.18.*; from 7.3.6 up to 7.3.*; from 7.4-rc1 up to *)

## References

- <https://git.kernel.org/stable/c/6a8a2e45db5f556fa4d7a1613902ef6e7b69ec79>
- <https://git.kernel.org/stable/c/4978cf22bbce163a6209b60dc3c0955fb0c8db3b>
- <https://git.kernel.org/stable/c/9d71f9fe5b5de916bded51343138b09b1eb103ed>

## Sources

- CVE List: [CVE-2026-139394](https://www.cve.org/CVERecord?id=CVE-2026-139394), CVE Terms of Use, modified 2026-11-30
- NVD: [CVE-2026-139394](https://nvd.nist.gov/vuln/detail/CVE-2026-139394), Public domain, modified 2026-11-30

---

Page: https://cve.day/CVE-2026-139394 · Whole record: https://cve.day/CVE-2026-139394.json · Rebuilt by cve.day 2026-11-30T14:33:19.716Z
