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

CVE-2026-98570: Linux Kernel Buffer Overflow Vulnerability

CVE-2026-98570 is a buffer overflow flaw in Linux kernel IPv6 stack affecting MAC header handling in lwtunnels. Attackers can trigger memory corruption through VLAN devices. This article covers technical details, impact, and patches.

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

CVE-2026-98570 is a Linux kernel vulnerability in the IPv6 subsystem affecting the seg6, ioam6, and rpl lightweight tunnels (lwtunnels). The dst_dev_overhead() helper returns LL_RESERVED_SPACE() of the egress device (16 bytes for plain Ethernet) rather than reserving enough headroom for the full MAC header. When the MAC header exceeds that reservation, skb_mac_header_rebuild() computes a negative offset that is stored unchecked in the u16 skb->mac_header field. The subsequent memmove writes skb->mac_len bytes roughly 64 KB past skb->head, producing an out-of-bounds write in kernel memory.

Critical Impact

Forwarding plain ping6 traffic through an ingress VLAN device with reorder_hdr off triggers an out-of-bounds kernel write across all five seg6 encapsulation modes and on the rpl and ioam6 inline paths.

Affected Products

  • Linux kernel IPv6 networking stack (net/ipv6)
  • seg6, ioam6, and rpl lightweight tunnel implementations
  • Kernel versions prior to the fix commits 36c07127924f and 87cd6b717e40

Discovery Timeline

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

Technical Details for CVE-2026-98570

Vulnerability Analysis

The seg6, ioam6, and rpl lwtunnels compute their skb_cow_head() headroom request as the length of the headers they plan to push plus the value returned by dst_dev_overhead(). After pushing the new IPv6 headers, they call skb_mac_header_rebuild() to reconstruct the Layer 2 header beneath them. The rebuild requires skb->mac_len bytes of headroom.

dst_dev_overhead() returns LL_RESERVED_SPACE() of the egress device, which is 16 bytes on plain Ethernet. When the ingress MAC header is longer, as it is on a VLAN device operating with reorder_hdr disabled, the reserved space is insufficient. The call to skb_set_mac_header(skb, -skb->mac_len) then computes a negative byte offset that overflows into the unsigned 16-bit skb->mac_header field.

In a reproduced case, skb->mac_header wraps to 65534 on a 704-byte skb->head. The subsequent memmove writes skb->mac_len bytes approximately 64 KB past the allocated buffer, corrupting adjacent kernel memory. This is a classic [CWE-787] out-of-bounds write triggered by [CWE-191] integer underflow in a size calculation.

Root Cause

The helper dst_dev_overhead() returned the device link-layer reserved space without considering the actual MAC header length of the packet being processed. The fix returns the larger of LL_RESERVED_SPACE() and skb->mac_len, aligning the no-dst branch with the dst branch and covering every caller uniformly.

Attack Vector

Triggering the condition requires forwarding IPv6 traffic through an interface where the MAC header exceeds the device link-layer reservation. A VLAN device with reorder_hdr set to off meets this requirement. Any IPv6 packet, including plain ping6, flowing through such an interface and processed by seg6, ioam6, or rpl lwtunnel encapsulation will overflow kernel heap memory. The vulnerability is reachable on all five seg6 encapsulation modes and on the inline paths of rpl and ioam6.

No verified public exploit code is available. The patched helper now returns max(LL_RESERVED_SPACE(dst->dev), skb->mac_len) to ensure sufficient headroom for mac header rebuild. See the kernel git commit 87cd6b717e40 and kernel git commit 36c07127924f for the authoritative fix.

Detection Methods for CVE-2026-98570

Indicators of Compromise

  • Unexplained kernel oops, panics, or BUG: reports referencing skb_mac_header_rebuild, seg6_input, ioam6, or rpl_do_srh call paths
  • Memory corruption slab warnings adjacent to network receive processing on hosts running IPv6 forwarding with lwtunnels configured
  • skb->mac_header values approaching 0xFFFF observed in kernel diagnostics or ftrace output on affected code paths

Detection Strategies

  • Audit interfaces for VLAN configurations with reorder_hdr off combined with IPv6 forwarding and any seg6, ioam6, or rpl route attributes
  • Enable KASAN on test and canary systems to surface the out-of-bounds write when IPv6 traffic traverses the vulnerable paths
  • Correlate kernel ring buffer messages with netlink route changes that install seg6, ioam6, or rpl encapsulation

Monitoring Recommendations

  • Collect dmesg and /var/log/kern.log into a central log store and alert on panics or KASAN reports involving the IPv6 lwtunnel subsystem
  • Monitor configuration drift on VLAN interfaces, specifically changes to reorder_hdr state via ip link or iproute2
  • Track running kernel versions against the stable trees that include commits 36c07127924f and 87cd6b717e40

How to Mitigate CVE-2026-98570

Immediate Actions Required

  • Identify Linux hosts that forward IPv6 traffic and use seg6, ioam6, or rpl lightweight tunnels in any route table
  • Apply the upstream stable kernel update that includes commits 36c07127924f and 87cd6b717e40 as soon as distribution packages become available
  • On systems that cannot be patched immediately, review VLAN interfaces and disable configurations that combine reorder_hdr off with IPv6 lwtunnel forwarding

Patch Information

The fix changes dst_dev_overhead() to return the larger of LL_RESERVED_SPACE(dst->dev) and skb->mac_len, ensuring every caller reserves enough headroom for a full MAC header rebuild. Apply vendor kernel updates referencing the upstream commits 36c07127924f and 87cd6b717e40.

Workarounds

  • Remove seg6, ioam6, and rpl route encapsulation on hosts that do not require them until the kernel is patched
  • Ensure VLAN interfaces operate with reorder_hdr on (the default) where possible to avoid the oversized MAC header path
  • Restrict IPv6 forwarding on affected interfaces or move affected workloads to patched hosts
bash
# Inspect VLAN reorder_hdr state and IPv6 forwarding on affected interfaces
ip -d link show type vlan | grep -E 'vlan|reorder_hdr'
sysctl net.ipv6.conf.all.forwarding

# Enumerate routes that use seg6, ioam6, or rpl lwtunnel encapsulation
ip -6 route show | grep -E 'encap (seg6|ioam6|rpl)'

# Verify the running kernel includes the fix commits
uname -r

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.