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

CVE-2026-97922: Linux Kernel Use-After-Free Vulnerability

CVE-2026-97922 is a use-after-free vulnerability in the Linux kernel tracing subsystem that causes memory leaks when histogram triggers use variables multiple times. 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-97922 Overview

CVE-2026-97922 is a memory leak vulnerability in the Linux kernel tracing subsystem. The flaw resides in the histogram trigger (hist trigger) code, which fails to free variable references when the same variable is referenced three or more times in a single trigger. When the trigger is removed, the variable reference and its associated strings leak.

The issue was introduced by prior fixes that changed reference counting semantics without correctly accounting for the number of references actually held. The vulnerability affects systems where privileged users create and remove histogram triggers with repeated variable references.

Critical Impact

Repeated creation and removal of affected histogram triggers can exhaust kernel memory, degrading system stability over time.

Affected Products

  • Linux kernel versions containing commit 8bcebc77e85f ("tracing: Fix histogram code when expression has same var as value")
  • Linux kernel stable branches prior to the fix commits (4bddcb3, 4cff53b, 94bbd65, e7b6d67)
  • Distributions shipping affected kernel versions with tracing enabled

Discovery Timeline

  • 2026-09-25 - CVE-2026-97922 published to the National Vulnerability Database (NVD)
  • 2026-09-25 - Last updated in NVD database

Technical Details for CVE-2026-97922

Vulnerability Analysis

The defect lives in the kernel tracing histogram trigger code path. A histogram trigger can reference variables through expressions, and these references are stored in a trigger's var_refs[] array. The array was designed to be the sole owner of each variable reference object, with destroy_hist_field() returning early for HIST_FIELD_FL_VAR_REF so that only the array-level cleanup frees the object.

A subsequent fix allowed repeated references to the same variable within an expression to share a single reference object, introducing a count field. However, only the increment path was implemented. The decrement path remained absent because expression destruction still returns early for variable reference fields. As a result, __destroy_hist_field() observes the total number of references ever created, not the number still held.

The cleanup logic frees the object when the decremented count is 0 or 1. Two references work correctly, but three or more references cause the object and its associated strings to leak when the trigger is removed.

Root Cause

The root cause is an incorrect reference counting pattern [CWE-401: Missing Release of Memory after Effective Lifetime]. The increment side exists without a matching decrement side, so the stored count reflects historical reference creation rather than live outstanding references. The free condition tolerates up to two references; any count greater than two produces a leak.

Attack Vector

Exploitation requires local access and sufficient privileges to interact with the tracing filesystem (typically root or CAP_SYS_ADMIN). An attacker or faulty workload that repeatedly installs and removes a histogram trigger containing three or more references to the same variable can incrementally leak kernel memory and strings, leading to resource exhaustion over time.

No code example is provided because this is a reference counting defect in kernel internals. See the upstream commits referenced below for the specific code changes.

Detection Methods for CVE-2026-97922

Indicators of Compromise

  • Unexplained growth in kernel slab memory consumption observable through /proc/slabinfo or slabtop
  • Repeated creation and removal of histogram triggers under /sys/kernel/tracing/events/*/trigger or /sys/kernel/debug/tracing/events/*/trigger
  • Presence of hist trigger definitions that reference the same variable three or more times in one expression

Detection Strategies

Monitoring Recommendations

  • Track long-term kernel memory trends on hosts that use tracing extensively, including performance monitoring agents and eBPF-adjacent tooling
  • Log writes to tracing control files via the Linux audit subsystem to capture trigger definitions as they are installed
  • Alert on sustained slab growth that correlates with trigger install and remove cycles

How to Mitigate CVE-2026-97922

Immediate Actions Required

  • Apply the upstream stable kernel update that incorporates the fix commits listed in the references
  • Restrict access to /sys/kernel/tracing and /sys/kernel/debug/tracing to trusted administrators only
  • Audit existing monitoring tooling for histogram triggers that reference the same variable three or more times

Patch Information

The fix drops the shared reference count and frees the variable reference unconditionally. This is safe because create_var_ref() searches and appends within a single trigger (so no external code holds the object) and check_var_refs() already refuses to remove a trigger whose variables are still referenced elsewhere, returning -EBUSY. Patched kernels are available via the stable tree commits 4bddcb3, 4cff53b, 94bbd65, and e7b6d67.

Workarounds

  • Avoid installing histogram triggers that reference the same variable three or more times in a single expression
  • Rewrite affected trigger expressions to use at most two references per variable
  • Where tracing is not required operationally, unmount tracefs or restrict its permissions to prevent unprivileged interaction
bash
# Restrict tracefs access to root only
chmod 700 /sys/kernel/tracing
mount -o remount,mode=700 /sys/kernel/tracing

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.