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.
Published: 2026-07-19
Score: 5.5 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

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 kernels running on ARM64 architectures with SPARSEMEM enabled. The CVE 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. All Linux kernel releases are affected; there is no vendor‑specific product list in the CNA data.

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, it is inferred that 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.

Generated by OpenCVE AI on August 4, 2026 at 18:01 UTC.

Remediation

No vendor fix or workaround currently provided.

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 4, 2026 at 18:01 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
History

Thu, 30 Jul 2026 20:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-20

Tue, 21 Jul 2026 22:00:00 +0000

Type Values Removed Values Added
Weaknesses CWE-20

Tue, 21 Jul 2026 12:15:00 +0000

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


Sun, 19 Jul 2026 16:15:00 +0000

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

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-07-19T15:40:39.423Z

Reserved: 2026-07-19T07:54:57.037Z

Link: CVE-2026-64149

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

Severity : Low

Publid Date: 2026-07-19T00:00:00Z

Links: CVE-2026-64149 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-04T18:15:03Z

Weaknesses
  • CWE-253

    Incorrect Check of Function Return Value