Skip to main content
Vulnerability Database/CVE-2026-98242

CVE-2026-98242: Linux Kernel Buffer Overflow Vulnerability

CVE-2026-98242 is a buffer overflow flaw in the Linux kernel DMA-buf subsystem affecting systems with MMIO sizes exceeding 4GB. This article covers the technical details, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-98242 Overview

CVE-2026-98242 is a Linux kernel vulnerability in the dma-buf subsystem. The flaw involves a silent integer overflow when converting a physical vector to a scatter-gather table (sgt). When Memory-Mapped I/O (MMIO) regions exceed 4 GB and peer-to-peer Direct Memory Access (DMA) traverses the host bridge, the kernel assigns a linked Input/Output Virtual Address (IOVA) length greater than 4 GB to a 32-bit variable. The resulting truncation produces incorrect lengths passed to downstream scatter-gather functions. The issue has been resolved upstream in the mainline Linux kernel.

Critical Impact

Silent 32-bit truncation of DMA mapping lengths can propagate incorrect sizes to fill_sg_entry(), producing undefined DMA behavior for peer-to-peer transfers larger than 4 GB.

Affected Products

  • Linux kernel versions containing the vulnerable dma-buf phys-vec-to-sgt code path
  • Systems using peer-to-peer DMA with MMIO regions larger than 4 GB routed through a host bridge
  • Workloads relying on calc_sg_nents and fill_sg_entry for large scatter-gather mapping

Discovery Timeline

  • 2026-10-06 - CVE-2026-98242 published to NVD
  • 2026-10-06 - Last updated in NVD database

Technical Details for CVE-2026-98242

Vulnerability Analysis

The vulnerability is an [Integer Overflow] in the Linux kernel dma-buf subsystem. The mapped_len variable was declared as a 32-bit unsigned int. During accumulation of size_t lengths from linked IOVA entries, values exceeding 0xFFFFFFFF silently wrap around. The truncated length is then passed to fill_sg_entry(), which constructs scatter-gather entries using the corrupted size. A related arithmetic pattern exists in calc_sg_nents, where unchecked addition of nents can also overflow. Loop iterator width in fill_sg_entry compounds the inconsistency between accumulated and used length values.

Root Cause

The root cause is a type width mismatch between size_t source values and the unsigned int accumulator mapped_len. On 64-bit systems, size_t is 64 bits, while unsigned int is 32 bits. Peer-to-peer DMA paths crossing the host bridge produce a single linked IOVA whose total length may exceed 4 GB, directly triggering the truncation. The upstream fix changes mapped_len to size_t, replaces unchecked arithmetic in calc_sg_nents with check_add_overflow(), and aligns the fill_sg_entry loop iterator type.

Attack Vector

The condition requires an MMIO region larger than 4 GB combined with peer-to-peer DMA routed through the host bridge. This is a local kernel code path reachable through drivers that build scatter-gather tables from physical vectors over dma-buf. Exploitation prerequisites include the ability to initiate large DMA mappings between devices. The practical impact is data corruption or malformed scatter-gather entries rather than a verified privilege escalation primitive.

No verified exploitation code is available for this issue. Refer to the upstream commits for the exact patch content: Kernel Git Commit 6b98fd7106d and Kernel Git Commit b344ca94e8cc.

Detection Methods for CVE-2026-98242

Indicators of Compromise

  • Kernel logs reporting unexpected DMA errors, I/O Memory Management Unit (IOMMU) faults, or scatter-gather mapping failures on hosts using peer-to-peer DMA.
  • Device driver warnings tied to dma-buf import or export paths involving MMIO regions larger than 4 GB.
  • Data integrity errors observed on GPU-to-GPU or NIC-to-GPU transfers routed through the host bridge.

Detection Strategies

  • Inventory kernel versions and confirm whether the dma-buf phys-vec-to-sgt commits have been backported.
  • Audit loaded drivers that use dma_buf_map_attachment() with peer-to-peer DMA for large MMIO BARs.
  • Correlate IOMMU fault telemetry with workloads that build scatter-gather tables greater than 4 GB.

Monitoring Recommendations

  • Collect dmesg and IOMMU event logs centrally and alert on repeated DMA mapping failures.
  • Monitor peer-to-peer DMA capable devices (GPUs, NVMe, RDMA NICs) for abnormal transfer completion patterns.
  • Track kernel package versions across the fleet and flag hosts running pre-patch builds.

How to Mitigate CVE-2026-98242

Immediate Actions Required

  • Apply the upstream kernel patches referenced in Kernel Git Commit 6b98fd7106d and Kernel Git Commit b344ca94e8cc.
  • Update to a distribution kernel that includes the mapped_len type fix and check_add_overflow() hardening.
  • Reboot affected hosts after patch installation to load the fixed kernel image.

Patch Information

The fix changes mapped_len from unsigned int to size_t, replaces unchecked nents arithmetic in calc_sg_nents with check_add_overflow(), and aligns the loop iterator type in fill_sg_entry. Backports are tracked under the two referenced stable commits. Deploy vendor kernels that incorporate both commits before re-enabling peer-to-peer DMA for large MMIO regions.

Workarounds

  • Disable peer-to-peer DMA for devices exposing MMIO Base Address Registers (BARs) larger than 4 GB until patched.
  • Constrain affected workloads to transfer sizes below the 4 GB boundary where application logic allows.
  • Route DMA through switch topologies that avoid the host bridge path when supported by the hardware.
bash
# Verify running kernel version and confirm patch inclusion
uname -r

# Inspect dma-buf and IOMMU related messages
dmesg | grep -iE 'dma-buf|iommu|p2pdma'

# List PCI devices advertising peer-to-peer DMA capability
lspci -vv | grep -iE 'Peer-to-Peer|AtomicOp'

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.