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

CVE-2026-98104: Linux Kernel cls_u32 Privilege Escalation

CVE-2026-98104 is a privilege escalation vulnerability in the Linux kernel's net/sched cls_u32 component caused by duplicate handle generation when node ID pools are exhausted. This article covers technical details, impact analysis, 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-98104 Overview

CVE-2026-98104 is a Linux kernel vulnerability in the net/sched traffic classifier subsystem, specifically in the cls_u32 classifier. The flaw resides in gen_new_kid() and the sibling helper gen_new_htid(), which silently return in-band fallback values when their respective ID pools are exhausted instead of propagating an error. The result is duplicate handles inside the u32 filter hash table and aliasing between root hash tables with handle 0. An attacker with namespace-local CAP_NET_ADMIN (reachable via unshare -Urn) can trigger the condition and corrupt handle bookkeeping.

Critical Impact

Local attackers in an unprivileged user namespace can exhaust the u32 classifier node ID pool to produce duplicate filter handles, corrupting ht->handle_idr bookkeeping and enabling cross-tcf_proto knode add, lookup, and delete operations.

Affected Products

  • Linux kernel builds with CONFIG_NET_SCHED=y and CONFIG_CLS_U32=y (or =m with the module loaded)
  • Linux kernel stable branches prior to the fix commits 6890e28, d7e7e98, f594f04, and feab926
  • Container and multi-tenant hosts that permit unprivileged user namespaces with CAP_NET_ADMIN

Discovery Timeline

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

Technical Details for CVE-2026-98104

Vulnerability Analysis

The cls_u32 classifier assigns a 32-bit handle to every knode (filter node) and hash table (htid). The helper gen_new_kid() allocates a per-bucket node ID through idr_alloc_u32() across two ranges. When both ranges are full, the function returns max (htid | 0xFFF) instead of an error. u32_change() consumes that value and inserts a knode whose handle is already live in the hash table, breaking uniqueness.

Because the duplicated handle was never reserved in ht->handle_idr, every subsequent error path that calls idr_remove(&ht->handle_idr, handle) removes the reservation of a different, live knode. That victim handle becomes reusable, so a single failed add compounds into additional duplicates across later operations.

The sibling helper gen_new_htid() exhibits the same silent failure. It returns 0 when the tp_c handle pool (1..0x7FF) is exhausted. u32_init() then publishes the root hash table with handle 0 without checking, and two root tables sharing handle 0 alias inside u32_lookup_ht(). The result is cross-tcf_proto knode manipulation.

Root Cause

The root cause is missing exhaustion handling in two kernel ID allocation helpers [CWE-682 Incorrect Calculation]. Both gen_new_kid() and gen_new_htid() encode allocation failure as an in-band sentinel value that collides with a legitimate handle, rather than returning a distinct error code to callers.

Attack Vector

An attacker with CAP_NET_ADMIN inside a user namespace creates a clsact qdisc on a network device and installs 4095 u32 filters with auto-generated handles, filling the node ID space for the root hash table single bucket. The 4096th auto-handle filter triggers the duplicate handle, with fh 800::fff reused. For gen_new_htid(), creating 2047 u32 proto entries on the same block exhausts the tp_c handle pool. The next proto entry receives handle 0 and aliases with other handle-0 root tables, enabling cross-tcf_proto operations. The vulnerability is reachable from an unprivileged user namespace via unshare -Urn.

See the upstream patches for the exact exhaustion checks added to both helpers: Linux Kernel Commit 6890e28 and Linux Kernel Commit feab926.

Detection Methods for CVE-2026-98104

Indicators of Compromise

  • Repeated tc filter add operations that create thousands of u32 filters on a single device, bucket, or block within a short window
  • Kernel log entries or netlink responses returning ENOSPC or ENOMEM from tc filter add operations after the patch is applied
  • Unexpected processes invoking unshare -Urn followed by tc qdisc and tc filter commands from non-administrative users

Detection Strategies

  • Audit execve telemetry for tc, unshare, and ip netns invocations originating from unprivileged users or container workloads
  • Monitor the AF_NETLINKNETLINK_ROUTE socket for high-volume RTM_NEWTFILTER messages targeting the u32 classifier
  • Correlate container runtime events with network namespace creation and traffic control configuration changes

Monitoring Recommendations

  • Enable Linux audit rules on the setns, unshare, and clone syscalls with CLONE_NEWUSER | CLONE_NEWNET flags
  • Alert on sustained tc filter add rates exceeding operational baselines for production hosts
  • Track kernel version and loaded module inventory to identify hosts running vulnerable cls_u32 builds

How to Mitigate CVE-2026-98104

Immediate Actions Required

  • Apply the upstream Linux kernel fixes referenced in commits 6890e28, d7e7e98, f594f04, and feab926 as soon as distribution packages become available
  • Disable the cls_u32 module where it is not required by setting a modprobe blacklist entry for cls_u32
  • Restrict creation of unprivileged user namespaces on multi-tenant hosts by setting kernel.unprivileged_userns_clone=0 on supported distributions

Patch Information

The fix adds explicit exhaustion checks to both gen_new_kid() and gen_new_htid(). Callers now receive -ENOSPC when the node ID pool is exhausted and -ENOMEM on transient allocation failures. The extack message distinguishes the two conditions. Reference the stable tree commits: Linux Kernel Commit 6890e28, Linux Kernel Commit d7e7e98, Linux Kernel Commit f594f04, and Linux Kernel Commit feab926.

Workarounds

  • Disable unprivileged user namespaces on hosts that do not require them to remove the primary non-root attack path
  • Blacklist or do not load the cls_u32 module on systems that rely on alternative classifiers such as cls_flower or cls_bpf
  • Apply seccomp or Linux Security Module policies on container workloads to deny the unshare syscall with CLONE_NEWUSER
bash
# Configuration example
# Disable unprivileged user namespaces (persistent)
echo 'kernel.unprivileged_userns_clone = 0' | sudo tee /etc/sysctl.d/99-userns.conf
sudo sysctl --system

# Blacklist the cls_u32 module
echo 'blacklist cls_u32' | sudo tee /etc/modprobe.d/blacklist-cls_u32.conf
sudo update-initramfs -u

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.