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

CVE-2026-97940: Linux Kernel IPv6 Use-After-Free Vulnerability

CVE-2026-97940 is a use-after-free flaw in Linux kernel IPv6 routing that can cause freed memory to be accessed during route deletion. This post explains the technical details, affected versions, impact, 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-97940 Overview

CVE-2026-97940 is a use-after-free vulnerability in the Linux kernel IPv6 routing subsystem. The flaw resides in the FIB6 (Forwarding Information Base for IPv6) walker logic used by /proc/net/ipv6_route and the BPF ipv6_route iterator. A walker in the FWS_U state at the table root can be incorrectly treated as already unlinked, allowing ipv6_route_native_seq_stop() to skip fib6_walker_unlink(). The seq private object may then be freed while still linked on net->ipv6.fib6_walkers, and a later route deletion dereferences the dangling pointer.

Critical Impact

A local, low-privileged user can trigger kernel memory corruption through concurrent IPv6 route reads and deletions, enabling potential privilege escalation.

Affected Products

  • Linux kernel (IPv6 routing subsystem)
  • Distributions shipping affected kernel versions prior to the stable fix commits
  • Systems exposing /proc/net/ipv6_route or using the BPF ipv6_route iterator

Discovery Timeline

  • 2026-09-25 - CVE-2026-97940 published to NVD
  • 2026-09-25 - Last updated in NVD database

Technical Details for CVE-2026-97940

Vulnerability Analysis

The vulnerability is a use-after-free [CWE-416] in the IPv6 FIB6 walker lifecycle. The function ipv6_route_iter_active() returns false when a walker sits in state FWS_U at the table root, interpreting that condition as "already unlinked." However, fib6_del_route() can transition a still-linked walker into exactly that state when the current leaf is the last route at the root.

When the seq stop path runs ipv6_route_native_seq_stop() and consults ipv6_route_iter_active(), it skips the required call to fib6_walker_unlink(). The walker remains on the per-net list net->ipv6.fib6_walkers, but the enclosing seq_file private object is released. A subsequent route deletion traverses the stale list entry and operates on freed memory.

Root Cause

The root cause is incorrect state inference: ipv6_route_iter_active() conflated the semantic state (FWS_U at root) with list membership. The fix changes membership tracking so the list head itself represents membership state, and the list head is reinitialized when unlinking. The existing w->node check is retained to prevent a never-started iterator with a zeroed private object from being treated as linked.

Attack Vector

Exploitation requires local access and the ability to open /proc/net/ipv6_route or run the BPF ipv6_route iterator while concurrently inducing IPv6 route changes. The BPF show path widens the race window. Successful exploitation corrupts kernel memory, which can be shaped into privilege escalation under the right conditions.

No verified public proof-of-concept is available. Refer to the upstream commits for the authoritative patch details: Kernel Git Commit 4553cfa and Kernel Git Commit b89b691.

Detection Methods for CVE-2026-97940

Indicators of Compromise

  • Kernel oops or panic traces referencing fib6_walker_unlink, fib6_del_route, or ipv6_route_native_seq_stop.
  • KASAN use-after-free reports naming the fib6_walker structure or net->ipv6.fib6_walkers list.
  • Unexpected process crashes or kernel log entries following reads of /proc/net/ipv6_route under route churn.

Detection Strategies

  • Audit running kernel versions against the fixed stable commits and flag hosts without the patch applied.
  • Enable KASAN in test and staging kernels to catch use-after-free patterns on the FIB6 walker path.
  • Correlate /proc/net/ipv6_route access with concurrent IPv6 route deletions in process telemetry.

Monitoring Recommendations

  • Collect dmesg and /var/log/kern.log centrally and alert on oops traces referencing IPv6 FIB symbols.
  • Monitor unprivileged processes that read /proc/net/ipv6_route repeatedly or attach BPF iterators.
  • Track BPF program loads of type BPF_TRACE_ITER targeting ipv6_route on production hosts.

How to Mitigate CVE-2026-97940

Immediate Actions Required

  • Apply the upstream stable kernel patches referenced in the kernel.org commits and reboot affected hosts.
  • Inventory kernels across the fleet to identify systems running vulnerable builds.
  • Restrict unprivileged BPF usage where operationally feasible to reduce the race surface.

Patch Information

The fix is distributed across the following upstream commits: Kernel Git Commit 0eede16, Kernel Git Commit 19b4ed6, Kernel Git Commit 4553cfa, and Kernel Git Commit b89b691. The patch uses the list head as walker membership state and reinitializes it on unlink, closing the race described in ipv6_route_native_seq_stop().

Workarounds

  • Disable or restrict access to /proc/net/ipv6_route using mount options or AppArmor/SELinux policy where possible.
  • Set kernel.unprivileged_bpf_disabled=1 to prevent unprivileged users from loading BPF iterators.
  • Where IPv6 is not required, disable the IPv6 stack via sysctl net.ipv6.conf.all.disable_ipv6=1.
bash
# Configuration example
sysctl -w kernel.unprivileged_bpf_disabled=1
sysctl -w net.ipv6.conf.all.disable_ipv6=1
uname -r  # Verify kernel version includes the stable fix commits

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.