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

CVE-2026-97612: Linux Kernel MPLS Buffer Overflow Vulnerability

CVE-2026-97612 is a buffer overflow flaw in the Linux kernel MPLS implementation that causes memory corruption when labels are popped. This post explains its 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-97612 Overview

CVE-2026-97612 is a Linux kernel vulnerability in the Multiprotocol Label Switching (MPLS) processing path. The flaw stems from skb_mpls_pop() failing to clear the inner_protocol field on a socket buffer after the last MPLS label is popped. A stale inner network header offset then survives into later packet-handling code paths, including Open vSwitch (OVS) fragmentation. When OVS re-pushes MPLS and subsequently calls ovs_fragment(), the stale offset becomes negative, bypasses a signed bound check, and is widened to an unsigned length used by memcpy(). The result is an approximately 4 GiB copy out of a 30-byte per-CPU buffer, producing kernel memory corruption from a local, low-privileged context.

Critical Impact

A local user with the ability to influence OVS flows can trigger an out-of-bounds kernel write large enough to corrupt arbitrary memory, enabling privilege escalation or system compromise.

Affected Products

  • Linux kernel (mainline), reproduced on v7.3-rc1 as noted in the commit message
  • Linux kernel networking subsystem: net/mpls, net/openvswitch, net/sched/act_mpls.c, net/sched/sch_frag.c
  • Any distribution kernel exposing Open vSwitch MPLS actions to unprivileged or containerized workloads

Discovery Timeline

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

Technical Details for CVE-2026-97612

Vulnerability Analysis

The vulnerability lives in the Linux kernel MPLS encapsulation helpers. skb_mpls_push() records the pre-encapsulation network header offset exactly once, gated on !skb->inner_protocol. The companion skb_mpls_pop() never clears inner_protocol when the last label is removed. The recorded inner_network_header therefore outlives the encapsulation it was meant to describe.

Open vSwitch can then reach a state where a packet has no MPLS header but still carries a stale, deeper inner_network_header offset. The sequence is: push a label, pop every label, recirculate through ovs_flow_key_update() (which resets network_header but leaves inner_* intact), then push MPLS again. When ovs_fragment() later restores skb->network_header = skb->inner_network_header, the offset points behind the current data pointer, so skb_network_offset(skb) returns a negative value.

Root Cause

The root cause is incomplete state management in skb_mpls_pop(). The function removes the MPLS header without clearing skb->inner_protocol, so the one-shot gate in skb_mpls_push() prevents the inner header offset from being re-recorded on the next push. The signed bound check in ovs_fragment(), if (skb_network_offset(skb) > MAX_L2_LEN), accepts the resulting negative offset. prepare_frag() then assigns that value to an unsigned int hlen, converting a small negative number such as -8 into 0xfffffff8. The subsequent memcpy(&data->l2_data, skb->data, hlen) writes roughly 4 GiB into a 30-byte per-CPU buffer, triggering a kernel page fault and arbitrary adjacent memory corruption. The same shape as commit 975b5b067f52 for IPv6 Segment Routing applies here: a stale network header offset reaching a consumer that widens it.

Attack Vector

Exploitation requires local access with the ability to install or influence Open vSwitch flows that chain MPLS push, pop, recirculate, push, and fragment actions. The net/sched/act_mpls.c traffic control action is the only other skb_mpls_pop() caller and shares the same defect, broadening the attack surface to tc-based pipelines. No user interaction is required once the flow is installed. The reproducer in the commit message shows prepare_frag+0x3df faulting with RDX=0x00000000fffffff8, confirming the integer-truncation path. See the upstream fixes at Kernel Git Commit 011e17b5, Kernel Git Commit 78a86d75, Kernel Git Commit b3912052, and Kernel Git Commit da8c3a7f.

Detection Methods for CVE-2026-97612

Indicators of Compromise

  • Kernel Oops or page fault entries referencing memcpy+0x8/0x20 with a call chain through prepare_frag, ovs_fragment, do_output, and ovs_execute_actions.
  • Kernel log lines showing faulting addresses in the per-CPU allocation range together with an RDX value near 0xfffffff8, indicating truncated-negative length copies.
  • Unexpected openvswitch module crashes or tc action faults on hosts that process MPLS traffic.

Detection Strategies

  • Monitor /var/log/kern.log, dmesg, and journalctl -k for the signature stack trace involving prepare_frag and ovs_fragment.
  • Audit installed OVS flows and tc filters for sequences that push MPLS, pop MPLS, recirculate, and fragment, which match the vulnerable code path.
  • Correlate kernel crash telemetry with workloads that use network namespaces or containers with CAP_NET_ADMIN, which is a prerequisite for triggering the flaw.

Monitoring Recommendations

  • Enable kdump and KASAN on canary hosts to catch out-of-bounds writes before they cascade into silent corruption.
  • Forward kernel ring buffer events into a centralized logging pipeline and alert on BUG: unable to handle page fault entries referencing OVS or MPLS symbols.
  • Track package and kernel versions across the fleet to confirm patch coverage against the fixing commits listed in the kernel.org references.

How to Mitigate CVE-2026-97612

Immediate Actions Required

  • Apply the upstream kernel patches that clear inner_protocol in skb_mpls_pop() across net/mpls and net/sched/act_mpls.c.
  • Update distribution kernels to the stable release that incorporates commits 011e17b5, 78a86d75, b3912052, and da8c3a7f.
  • Reboot affected hosts after patching to ensure the running kernel includes the fix.

Patch Information

Fixes are available in the upstream Linux stable tree. The relevant commits are Kernel Git Commit 011e17b5, Kernel Git Commit 78a86d75, Kernel Git Commit b3912052, and Kernel Git Commit da8c3a7f. The fix clears skb->inner_protocol when the last MPLS label is popped so a later push re-records the current network header offset. sch_frag.c additionally saves and restores inner_protocol around fragmentation, mirroring the OVS pattern.

Workarounds

  • Where patching is not immediately possible, unload the openvswitch kernel module on hosts that do not require it: modprobe -r openvswitch.
  • Remove or disable tc actions that use the mpls action on untrusted interfaces until the kernel is updated.
  • Restrict CAP_NET_ADMIN inside containers and user namespaces so unprivileged tenants cannot install MPLS-manipulating flows.
bash
# Verify kernel version and confirm the MPLS fix is present
uname -r

# Temporarily disable Open vSwitch where it is not required
systemctl stop openvswitch-switch
systemctl disable openvswitch-switch
modprobe -r openvswitch

# Audit tc filters for mpls actions that reach the vulnerable path
tc -s filter show dev <iface> | grep -i mpls

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.