CVE-2026-139394

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

Published Nov 30, 2026 CVSS 3.1 · 4.7 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

The Linux kernel meson‑spicc SPI driver contained a flaw where a DMA unmap operation was attempted on a buffer address that had never been mapped. The bug was triggered when dma_map_single returned an error marker that was mistakenly sent to dma_unmap_single, causing an invalid memory manipulation that in turn precipitated a kernel panic. The impact is a local denial of service as the system becomes unresponsive when the driver is exercised in this error condition.

Affected Systems

All Linux kernel releases that include the meson‑spicc driver without the fix are affected. The patch was merged into the mainline kernel and is reachable via the commit identified in the advisory. Operators should verify that the kernel version they run does not contain this commit and acknowledge that the issue applies to versions preceding the patch.

Risk and Exploitability

No CVSS score is provided, and EPSS is not available. The vulnerability is not listed in the CISA KEV catalog. The flaw is local in nature; an attacker must run code that triggers an SPI transaction through the affected driver to provoke the error path. There is no evidence of remote exploitation or privilege escalation. The risk is the potential for the kernel to crash when the driver processes a failing DMA mapping.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the running kernel to a version that contains the meson‑spicc DMA unmap fix, such as the mainline commit referenced in the advisory.
  • Reboot or reload the kernel after the update to ensure the patched driver is loaded into kernel space.
  • If a kernel update cannot be applied immediately, disable or blacklist the meson‑spicc driver module to prevent its operation until the patch is available.

Generated by OpenCVE AI on December 1, 2026 at 11:19 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Linux linux
Vendors & Products Linux linux
Type Values Removed Values Added
Weaknesses CWE-763
References
Metrics threat_severity

None

cvssV3_1

{'score': 4.7, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Moderate

Type Values Removed Values Added
Weaknesses CWE-674
CWE-795
Type Values Removed Values Added
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.
Title spi: meson-spicc: fix invalid DMA unmap on mapping failure
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-674

    Uncontrolled Recursion

  • CWE-763

    Release of Invalid Pointer or Reference

  • CWE-795

    Only Filtering Special Elements at a Specified Location

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:34 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:19 PM
Modified
Nov 30, 2026, 2:19 PM
Severity
Moderate
Public date
Nov 30, 2026, 1:34 PM