KernelScan.io

HIGH

stmmac ScatterGather Fault

CVE-2026-98803

CVSS 7.5 / 10.0 KernelScan AI

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

01

In the Linux kernel, the following vulnerability has been resolved: net: stmmac: fix rx Scatter-Gather support When a received frame is larger than dma_buf_sz, the DMA scatters it across multiple RX descriptors (rx Scatter-Gather). The secondary RX buffer (sec_page) was only allocated and programmed when split-header (SPH) was active, so for regular frames buffer2 was neither allocated nor backed by a valid mapping. As soon as an incoming frame overflowed buffer1, the DMA wrote the overflow into the unmapped secondary-buffer address, triggering an SMMU translation fault on IOMMU-based platforms: arm-smmu 15000000.iommu: Unhandled context fault: fsr=0x402, iova=0x00000000, fsynr=0x7f0011, cbfrsynra=0x1c90, cb=11 arm-smmu 15000000.iommu: FSR = 00000402 [Format=2 TF], SID=0x1c90 arm-smmu 15000000.iommu: FSYNR0 = 007f0011 [S1CBNDX=127 WNR PLVL=1] Enable scatter-gather for non-SPH frames on cores that can program an independent secondary RX buffer (GMAC4/XGMAC): allocate and mark buffer2 as valid in stmmac_init_rx_buffers() and stmmac_rx_refill(), and account for it in the buffer length computation. Legacy cores have no set_sec_addr op, so they keep buffer2 disabled. Since buffer2 is handed to the DMA at page offset 0, the page pool sync window is widened to cover both buffers in every mode: offset is set to 0 and max_len to dma_buf_sz + stmmac_rx_offset(). The FCS can straddle the buffer1/buffer2 boundary and a descriptor boundary, so it is now stripped from the tail of the assembled frame with pskb_trim() instead of from a single buffer, avoiding an unsigned underflow for frames that overflow a buffer by 1..3 bytes. For single-buffer frames the XDP program must not see the FCS, so it is removed from the XDP buffer before the program runs. Native XDP currently only supports single-buffer (linear) frames. An oversized frame accepted by the MAC (jumbo enabled) is received via buffer2; the XDP program only sees buffer1, so on a TX/REDIRECT verdict the frame is forwarded truncated. XDP multi-buffer support to handle this case is planned as a follow-up. AF_XDP zero-copy RX is not covered by this change: a ZC queue still programs buffer2 at DMA address 0 (and XGMAC has no buffer2-valid bit), so an oversized frame overflowing buffer1 can still trigger the same SMMU translation fault. Handling is planned as a follow-up.

02

Engine v0.9.0

Risk summary

An attacker on the same Ethernet segment can send an oversized frame that exceeds the driver's DMA buffer size, causing the hardware to scatter the frame across multiple RX descriptors. Because the secondary RX buffer was not allocated for non-split-header frames, the DMA writes into an unmapped address (0x0), triggering an SMMU translation fault that crashes the kernel on IOMMU-enabled platforms. This is a remote denial-of-service vulnerability requiring no authentication or privileges.

Affecteddrivers/net/ethernet/stmicro/stmmac/stmmac_main.c (stmmac Ethernet driver)

Vulnerability analysis

The stmmac Ethernet driver's receive scatter-gather implementation only allocated and programmed a secondary RX buffer (buffer2) when split-header mode was active. For regular frames, buffer2 remained unallocated and unmapped. When an incoming frame larger than the configured DMA buffer size arrived, the hardware scattered the overflow into buffer2, but since buffer2 had no valid DMA mapping, the write landed at address 0x0. On systems with an active IOMMU/SMMU (such as ARM SMMU), this caused an unhandled context fault and kernel panic. The fix enables scatter-gather for non-split-header frames on capable hardware (GMAC4/XGMAC cores) by always allocating buffer2, marking it valid in the descriptor, and widening the page-pool sync window to cover both buffers. It also corrects FCS stripping to operate on the fully assembled frame, avoiding an integer underflow for frames that overflow buffer1 by only a few bytes. The vulnerability is reachable from any device on the same Layer 2 network segment; no local access, privileges, or user interaction are required.

03

BranchIntroducedFixed inPatch commit
5.45.4.2625.5358d5ac5a5d5
6.18—6.18.56a7cff44543f6
7.2—7.2.1088095728511e
mainline—7.3—