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

CVE-2026-98487: Linux Kernel Bridge MDB Use-After-Free

CVE-2026-98487 is a use-after-free vulnerability in the Linux kernel's network bridge MDB component that can cause memory corruption. This article covers technical details, affected versions, and mitigation strategies.

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

CVE-2026-98487 is a use-after-free vulnerability in the Linux kernel bridge Multicast Database (MDB) subsystem. The flaw resides in br_mdb_flush_pgs(), which maintains a pointer-to-pointer cursor while walking the mp->ports list. During a port group deletion, br_multicast_del_pg() can re-enter the same MDB entry through br_multicast_sg_del_exclude_ports() and unlink unrelated port groups. The cursor then dereferences freed memory, leaving mp->ports pointing to a stale object. A subsequent RTM_GETMDB netlink request exposes the dangling pointer and triggers a KASAN slab-use-after-free in br_mdb_dump.

Critical Impact

A local attacker with network configuration privileges can trigger kernel memory corruption through bridge multicast operations, potentially leading to denial of service or privilege escalation.

Affected Products

  • Linux kernel bridge subsystem (net/bridge/br_mdb.c)
  • Multiple stable kernel branches referenced by commits 46ec55855c97, ab1404ac8115, ab3c4a4c85f2, and fe2a42789c12
  • Distributions shipping affected mainline and long-term support kernels

Discovery Timeline

  • 2026-10-18 - CVE-2026-98487 published to the National Vulnerability Database
  • 2026-10-19 - Last updated in NVD database

Technical Details for CVE-2026-98487

Vulnerability Analysis

The Linux bridge MDB tracks multicast group memberships per bridge port. The function br_mdb_flush_pgs() iterates mp->ports using a pointer-to-pointer cursor to safely unlink entries during traversal. The cursor assumes that only the currently selected port group is removed per iteration.

That assumption breaks when br_multicast_del_pg() triggers br_multicast_sg_del_exclude_ports(). This secondary call re-enters the same MDB entry and can unlink additional port groups that are not the current cursor target. If the cursor points into one of these indirectly freed groups, the next loop iteration dereferences freed slab memory.

The resulting dangling pointer persists in mp->ports. A later RTM_GETMDB dump reaches the freed object through br_mdb_dump(), producing the KASAN slab-use-after-free report observed in br_mdb_dump → rtnl_mdb_dump → rtnl_dumpit → netlink_dump.

Root Cause

The root cause is unsafe iteration during concurrent list mutation. The cursor tracks only direct deletions, not cascading removals performed by nested helpers invoked during the walk. This is a classic use-after-free in kernel list traversal, where the iterator state becomes inconsistent with the underlying list.

Attack Vector

Exploitation requires the ability to modify bridge multicast configuration, typically CAP_NET_ADMIN within the relevant network namespace. An attacker triggers port group flushes that cause br_multicast_sg_del_exclude_ports() to free sibling entries, then issues an RTM_GETMDB netlink request to dereference the freed memory. The fix resets the cursor to mp->ports after every deletion, guaranteeing a safe restart because each deletion removes at least the selected group.

See external kernel commit references for the applied patch diff.

Detection Methods for CVE-2026-98487

Indicators of Compromise

  • KASAN reports naming slab-use-after-free in br_mdb_dump in kernel logs or dmesg output
  • Unexpected kernel oops or panic traces originating from br_mdb_dump, rtnl_mdb_dump, or netlink_dump
  • Repeated bridge MDB flush and RTM_GETMDB sequences from unprivileged workloads or containers

Detection Strategies

  • Enable KASAN on test and canary kernels to surface use-after-free conditions in the bridge subsystem
  • Audit kernel versions against the fix commits 46ec55855c97, ab1404ac8115, ab3c4a4c85f2, and fe2a42789c12
  • Monitor netlink activity targeting RTM_GETMDB and RTM_DELMDB from containers or non-root namespaces

Monitoring Recommendations

  • Collect and alert on kernel ring buffer messages containing KASAN or BUG: entries referencing bridge code
  • Centralize kernel logs via syslog or journald forwarders for correlation with host identity and workload metadata
  • Track CAP_NET_ADMIN grants to container runtimes and user namespaces that interact with bridge devices

How to Mitigate CVE-2026-98487

Immediate Actions Required

  • Apply the upstream fix that resets the cursor to mp->ports after every deletion in br_mdb_flush_pgs()
  • Update to a stable kernel release that includes commits 46ec55855c97, ab1404ac8115, ab3c4a4c85f2, or fe2a42789c12
  • Reboot affected hosts to activate the patched kernel

Patch Information

The fix is distributed across four stable kernel commits: Kernel Commit 46ec55855c97, Kernel Commit ab1404ac8115, Kernel Commit ab3c4a4c85f2, and Kernel Commit fe2a42789c12. The patch restarts the port group walk from mp->ports after each deletion, ensuring the cursor never references freed memory.

Workarounds

  • Restrict CAP_NET_ADMIN in untrusted user namespaces and container runtimes to prevent bridge MDB manipulation
  • Disable Linux bridge multicast snooping on hosts that do not require it by setting multicast_snooping to 0 on affected bridges
  • Limit exposure of RTM_GETMDB netlink operations to trusted management planes
bash
# Disable multicast snooping on a bridge as a temporary mitigation
sudo sysctl -w net.bridge.bridge-nf-call-iptables=1
sudo ip link set dev br0 type bridge mcast_snooping 0

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.