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

CVE-2026-98122: Linux Kernel VXLAN Use-After-Free Vulnerability

CVE-2026-98122 is a use-after-free flaw in Linux kernel VXLAN MDB handling that allows memory corruption through crafted multicast database operations. This post explains its technical details, affected versions, 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-98122 Overview

CVE-2026-98122 is a use-after-free vulnerability in the Linux kernel's Virtual Extensible LAN (VXLAN) Multicast Database (MDB) implementation. The flaw resides in vxlan_mdb_remote_src_del() and stems from improper validation of the all-zeros source address in vxlan_mdb_is_valid_source(). An attacker can craft an MDB entry whose derived (S, G) key aliases an existing (*, G) key, causing the kernel to free an entry and then access it again. Because MDB operations are network-namespace scoped, an unprivileged local user can trigger the condition from a user and network namespace they create.

Critical Impact

Local attackers can trigger kernel memory corruption from an unprivileged user namespace, enabling potential privilege escalation on affected Linux systems.

Affected Products

  • Linux kernel versions containing the vulnerable VXLAN MDB implementation
  • Distributions shipping affected mainline and stable kernel branches
  • Systems with VXLAN driver loaded and unprivileged user namespaces enabled

Discovery Timeline

  • 2026-09-25 - CVE-2026-98122 published to NVD
  • 2026-09-30 - Last updated in NVD database
  • Discovered by XBOW, triaged by Baul Lee

Technical Details for CVE-2026-98122

Vulnerability Analysis

The VXLAN MDB subsystem maintains forwarding entries keyed by struct vxlan_mdb_entry_key. Entries are compared with a plain memcmp(). A (, G) entry represents a group whose source address field is all-zeros. A source list (MDBE_ATTR_SRC_LIST) is only valid on (, G) entries, and each list member derives a corresponding (S, G) entry.

The validator vxlan_mdb_is_valid_source() accepts the all-zeros address for both MDBE_ATTR_SOURCE and each MDBE_ATTR_SRC_LIST member. When both the parent source and a list member hold the all-zeros address, the derived (S, G) key becomes byte-identical to the (*, G) key. Both keys resolve to the same forwarding entry.

During deletion, vxlan_mdb_remote_src_del() calls vxlan_mdb_remote_src_fwd_del() followed by vxlan_mdb_remote_src_entry_del(). With aliased keys, the first call frees the entry that owns ent, and the second call then dereferences freed memory, reading ->pprev and ->next from the freed object and writing through those pointers.

Root Cause

The root cause is incomplete input validation. vxlan_mdb_is_valid_source() fails to reject the all-zeros source address inside a source list, allowing user-supplied Netlink data to construct two logically distinct entries that share one key. This is a Use After Free weakness triggered by key aliasing between (*, G) and (S, G) MDB entries.

Attack Vector

An unprivileged local user creates a new user namespace and network namespace, then issues RTM_NEWMDB Netlink messages against a VXLAN device. By adding a (*, G) entry with NLM_F_REPLACE and a source list containing the all-zeros address, the attacker reaches the vulnerable deletion path through vxlan_mdb_remote_srcs_replace(). KASAN logs confirm a slab use-after-free in __vxlan_mdb_add+0x1cd/0xd70 with the freed object allocated by vxlan_mdb_remote_srcs_add() and freed through vxlan_mdb_remote_del().

No verified proof-of-concept code is published alongside the advisory. See the upstream commits for the authoritative fix diff.

Detection Methods for CVE-2026-98122

Indicators of Compromise

  • Kernel KASAN reports referencing __vxlan_mdb_add, vxlan_mdb_remote_src_fwd_del, or vxlan_mdb_remote_del in dmesg
  • Unexpected VXLAN device crashes, soft lockups, or oopses on hosts running untrusted workloads
  • Audit records showing RTM_NEWMDB Netlink messages originating from unprivileged processes inside user namespaces

Detection Strategies

  • Enable KASAN on test and staging kernels to surface use-after-free conditions in the VXLAN MDB code paths
  • Monitor kernel ring buffer logs for slab-use-after-free signatures tied to vxlan_mdb_* symbols
  • Track processes that create user namespaces and immediately interact with network namespace Netlink interfaces

Monitoring Recommendations

  • Collect /var/log/kern.log and journalctl -k output into a centralized log pipeline for anomaly review
  • Alert on repeated RTM_NEWMDB operations from non-root UIDs in container workloads
  • Correlate VXLAN kernel traces with container runtime events to identify namespace-based abuse

How to Mitigate CVE-2026-98122

Immediate Actions Required

  • Apply the upstream Linux kernel patches referenced below as soon as distribution updates become available
  • Restrict creation of unprivileged user namespaces where feasible by setting kernel.unprivileged_userns_clone=0 on supported distributions
  • Unload or blacklist the vxlan module on hosts that do not require VXLAN overlay networking

Patch Information

The fix rejects the all-zeros address inside vxlan_mdb_is_valid_source(), covering both call sites. A legitimate (*, G) entry is still expressed by omitting the source attribute. Upstream commits:

Workarounds

  • Disable unprivileged user namespaces via sysctl kernel.unprivileged_userns_clone=0 on Debian/Ubuntu-derived kernels
  • Apply seccomp or AppArmor profiles that block the unshare syscall for untrusted workloads
  • Remove the vxlan kernel module on systems that do not use overlay networking: modprobe -r vxlan and blacklist in /etc/modprobe.d/
bash
# Configuration example
# Disable unprivileged user namespaces
echo 'kernel.unprivileged_userns_clone=0' | sudo tee /etc/sysctl.d/99-disable-userns.conf
sudo sysctl --system

# Blacklist the vxlan module if unused
echo 'blacklist vxlan' | sudo tee /etc/modprobe.d/blacklist-vxlan.conf
sudo modprobe -r vxlan

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.