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

CVE-2026-98571: Linux Kernel Use-After-Free Vulnerability

CVE-2026-98571 is a use-after-free vulnerability in the Linux kernel stmmac network driver that causes memory corruption through improper page recycling. This article covers technical details, impact, and mitigation.

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-98571 Overview

CVE-2026-98571 is a Linux kernel vulnerability in the stmmac network driver. The flaw lives in the stmmac_rx() receive path, where a failed napi_build_skb() call recycles the descriptor page back to the page pool but leaves buf->page pointing at the already-recycled page. The subsequent stmmac_rx_refill() then skips allocating a replacement and programs the recycled page back into the RX descriptor, breaking the buffer lifecycle expected by the page pool.

Critical Impact

The stale pointer causes a recycled page to be reused as an active RX buffer, which can lead to memory corruption, data integrity issues on received network traffic, or kernel instability on systems using STMicroelectronics MAC Ethernet controllers.

Affected Products

  • Linux kernel versions containing the stmmac driver prior to the fix commits
  • Platforms using STMicroelectronics stmmac Ethernet MAC (common on ARM SoCs)
  • Stable kernel branches referenced by commits 0a7822e, 2986733, and 501baae

Discovery Timeline

  • 2026-10-18 - CVE-2026-98571 published to NVD
  • 2026-10-19 - Last updated in NVD database

Technical Details for CVE-2026-98571

Vulnerability Analysis

The stmmac driver processes incoming packets inside stmmac_rx(). For each descriptor, the driver either hands the backing page to the networking stack via an skb or recycles the page back to the page pool. Every consumption site clears buf->page after transferring ownership, except the error path for napi_build_skb() failures.

When napi_build_skb() returns NULL, the driver calls page_pool_recycle_direct() to return the page but does not reset buf->page. The buffer descriptor therefore retains a pointer to a page that is no longer owned by the driver. On the next refill cycle, stmmac_rx_refill() checks buf->page, finds it non-NULL, and reuses the recycled page as if it were a freshly allocated receive buffer.

Root Cause

The root cause is inconsistent buffer lifecycle handling in a single error path. The missing buf->page = NULL assignment after page_pool_recycle_direct() creates a use-after-recycle condition analogous to a use-after-free, since the page pool is free to reissue the page to another consumer while the stmmac driver still treats it as its own.

Attack Vector

Triggering the bug requires driving napi_build_skb() to fail during RX processing, which generally correlates with memory pressure or allocation failures under heavy traffic. The vulnerability is local to the kernel and depends on the system running the stmmac driver. The resulting condition can corrupt received packet contents, cause page pool accounting errors, or destabilize the kernel. No public exploit is available and the issue is not listed in the CISA Known Exploited Vulnerabilities catalog.

The fix is small: clear buf->page on the napi_build_skb() failure path so the subsequent refill allocates a fresh page, matching the pattern used by every other consumption site in the function. See the upstream fixes in the Kernel Git Commit 0a7822e, Kernel Git Commit 2986733, and Kernel Git Commit 501baae.

Detection Methods for CVE-2026-98571

Indicators of Compromise

  • Unexplained kernel warnings or BUG splats referencing page_pool, stmmac_rx, or stmmac_rx_refill in dmesg.
  • Intermittent network data corruption or checksum errors on interfaces backed by the stmmac driver.
  • Page pool accounting warnings indicating pages consumed more than once.

Detection Strategies

  • Inventory Linux hosts and embedded devices using the stmmac driver by checking /sys/class/net/*/device/driver for stmmac or dwmac entries.
  • Compare running kernel versions against the fixed commits 0a7822e, 2986733, and 501baae on stable branches.
  • Monitor kernel logs for repeated RX-path errors coinciding with allocation failure conditions.

Monitoring Recommendations

  • Forward kernel ring buffer messages to a central logging pipeline and alert on stmmac or page_pool warnings.
  • Track NIC error counters via ethtool -S for anomalous RX drops, FIFO errors, or CRC errors on affected interfaces.
  • Correlate memory pressure events (OOM, slab allocation failures) with network interface anomalies on stmmac-based systems.

How to Mitigate CVE-2026-98571

Immediate Actions Required

  • Identify fleet systems using the stmmac driver, particularly ARM SoC platforms and embedded network appliances.
  • Schedule kernel updates to a stable release that includes the referenced fix commits.
  • Validate kernel builds for custom or vendor-maintained kernels to confirm the backport is present.

Patch Information

The upstream fix clears buf->page after page_pool_recycle_direct() on the napi_build_skb() failure path in stmmac_rx(). Fixes have been merged to stable branches in Kernel Git Commit 0a7822e, Kernel Git Commit 2986733, and Kernel Git Commit 501baae. Distribution vendors are expected to ship backports in their regular kernel update cadence.

Workarounds

  • No supported workaround exists; applying the kernel patch is the only durable remediation.
  • Where patching is delayed, reduce the likelihood of RX-path allocation failures by provisioning sufficient memory and avoiding sustained extreme packet rates on affected interfaces.
  • Restrict untrusted local access on affected hosts to limit any secondary impact from kernel instability.
bash
# Verify running kernel and stmmac driver presence
uname -r
for nic in /sys/class/net/*; do
  drv=$(readlink -f "$nic/device/driver" 2>/dev/null)
  case "$drv" in
    *stmmac*|*dwmac*) echo "stmmac interface: $(basename $nic) -> $drv" ;;
  esac
done

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.