CVE-2026-64149

dma-mapping: move dma_map_resource() sanity check into debug code

Published Jul 19, 2026 CVSS 3.1 · 5.5 Medium EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

dma-mapping: move dma_map_resource() sanity check into debug code

dma_map_resource() uses pfn_valid() to ensure the range is not RAM.
However, pfn_valid() only checks for availability of the memory map for
a PFN but it does not ensure that the PFN is actually backed by RAM. On
ARM64 with SPARSEMEM (128MB section granularity), MMIO addresses that
share a section with RAM will falsely trigger the WARN_ON_ONCE and cause
dma_map_resource() to return DMA_MAPPING_ERROR.

This causes a WARNING on Raspberry Pi 4 during spi_bcm2835 probe because
the SPI FIFO register (0xfe204004) falls in the same sparsemem section
as the end of RAM (0xf8000000-0xfbffffff), both in section 31
(0xf8000000-0xffffffff).

Move the sanity check from dma_map_resource() into debug_dma_map_phys()
and replace the unreliable pfn_valid() with pfn_valid() &&
!PageReserved(), which correctly identifies actual usable RAM without
false positives for MMIO regions that happen to have struct pages.

Since dma_map_resource() is dma_map_phys(DMA_ATTR_MMIO), the check
applies equally to both APIs. Any non-reserved page represents kernel
memory to a sufficient degree that using DMA_ATTR_MMIO on it is almost
certainly wrong and risks breaking coherency on non-coherent platforms.
ZONE_DEVICE pages used for PCI P2P DMA (MEMORY_DEVICE_PCI_P2PDMA) have
PageReserved set, so they will not trigger a false positive.

The check no longer blocks the mapping and uses err_printk() to
integrate with dma-debug filtering.

Analysis

AI-generated

Technical impact

The vulnerability resides in the Linux kernel’s dma_map_resource() function, where it uses pfn_valid() to validate memory ranges. pfn_valid() merely confirms that a page frame number appears in the memory map but does not verify that it is backed by actual RAM. On ARM64 systems using SPARSEMEM with 128 MB section granularity, memory‑mapped I/O (MMIO) addresses that share a section with RAM incorrectly satisfy pfn_valid(). This causes WARN_ON_ONCE to trigger and dma_map_resource() to return DMA_MAPPING_ERROR, which prevents device drivers that rely on DMA_ATTR_MMIO mapping from initializing properly. The result is a warning in the kernel log and a failure of the affected device, as demonstrated by the spi_bcm2835 driver on a Raspberry Pi 4.

Affected Systems

The issue affects Linux kernel releases that include the patch for dma-mapping, primarily those running on ARM64 architectures with SPARSEMEM enabled. The vulnerability was observed on a Raspberry Pi 4 platform, but any system that uses dma_map_resource() or dma_map_phys(DMA_ATTR_MMIO) with MMIO addresses falling within a sparse memory section that overlaps RAM is susceptible. The affected products are all Linux kernel builds where the ARM64 SPARSEMEM configuration is in use; vendor products based on the kernel are included.

Risk and Exploitability

The CVSS score of 5.5 indicates moderate severity, and the EPSS score is below 1 %, with the vulnerability not listed in the CISA KEV catalog. Based on the description, an attacker would need local kernel‑mode or privileged access to trigger the fault during module initialization, as the issue arises while mapping DMA resources. The primary impact is a denial of service to the affected device, with no direct code execution or data exfiltration. Given the limited attack surface and low prevalence of vulnerable configurations, the overall risk for typical deployments remains low, but systems that rely on the affected drivers should consider patching immediately.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the operating system to a kernel version that includes the patch which moves the sanity check into debug_dma_map_phys() and uses pfn_valid() && !PageReserved() to correctly identify reserved pages.
  • If an updated kernel is not yet available, apply the upstream patch directly to your kernel source tree, rebuild the kernel, and load the patched module to eliminate the false positive.
  • As a temporary safeguard, avoid mapping MMIO regions that reside in sparse memory sections shared with RAM on ARM64 SPARSEMEM systems, or adjust the device tree / memory layout so that these sections do not overlap with MMIO addresses.

Generated by OpenCVE AI on August 17, 2026 at 20:53 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Ubuntu USN Ubuntu USN USN-8593-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8603-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-8618-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8663-1 Linux kernel (NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-8664-1 Linux kernel (NVIDIA BaseOS) vulnerabilities
Ubuntu USN Ubuntu USN USN-8728-1 Linux kernel (GCP) vulnerabilities
Ubuntu USN Ubuntu USN USN-8728-2 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-8728-3 Linux kernel (Oracle) vulnerabilities
History
Type Values Removed Values Added
Weaknesses NVD-CWE-noinfo
CPEs cpe:2.3:o:linux:linux_kernel:7.1:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.1:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.1:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.1:rc4:*:*:*:*:*:*
Type Values Removed Values Added
Weaknesses CWE-20
Type Values Removed Values Added
Weaknesses CWE-20
Type Values Removed Values Added
Weaknesses CWE-253
References
Metrics threat_severity

None

cvssV3_1

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

threat_severity

Low

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: dma-mapping: move dma_map_resource() sanity check into debug code dma_map_resource() uses pfn_valid() to ensure the range is not RAM. However, pfn_valid() only checks for availability of the memory map for a PFN but it does not ensure that the PFN is actually backed by RAM. On ARM64 with SPARSEMEM (128MB section granularity), MMIO addresses that share a section with RAM will falsely trigger the WARN_ON_ONCE and cause dma_map_resource() to return DMA_MAPPING_ERROR. This causes a WARNING on Raspberry Pi 4 during spi_bcm2835 probe because the SPI FIFO register (0xfe204004) falls in the same sparsemem section as the end of RAM (0xf8000000-0xfbffffff), both in section 31 (0xf8000000-0xffffffff). Move the sanity check from dma_map_resource() into debug_dma_map_phys() and replace the unreliable pfn_valid() with pfn_valid() && !PageReserved(), which correctly identifies actual usable RAM without false positives for MMIO regions that happen to have struct pages. Since dma_map_resource() is dma_map_phys(DMA_ATTR_MMIO), the check applies equally to both APIs. Any non-reserved page represents kernel memory to a sufficient degree that using DMA_ATTR_MMIO on it is almost certainly wrong and risks breaking coherency on non-coherent platforms. ZONE_DEVICE pages used for PCI P2P DMA (MEMORY_DEVICE_PCI_P2PDMA) have PageReserved set, so they will not trigger a false positive. The check no longer blocks the mapping and uses err_printk() to integrate with dma-debug filtering.
Title dma-mapping: move dma_map_resource() sanity check into debug code
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Jul 19, 2026, 3:40 PM
Reserved
Jul 19, 2026, 7:54 AM
Status
Analyzed
Published
Jul 19, 2026, 4:17 PM
Modified
Aug 17, 2026, 5:22 PM
Severity
Low
Public date
Jul 19, 2026, 12:00 AM