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

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

CVE-2026-97923 is a use-after-free vulnerability in the Linux kernel tracing subsystem affecting histogram variable reference handling. This article covers the 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-97923 Overview

CVE-2026-97923 is a memory leak vulnerability in the Linux kernel's tracing subsystem. The flaw affects histogram trigger functionality when a variable reference (VAR_REF) field fails initialization. The function create_var_ref() allocates a hist_field and calls init_var_ref() to populate it, but a failure in the initialization path leaves the allocated field unfreed and untracked.

Critical Impact

Repeated failures during histogram trigger setup can leak kernel memory, degrading system stability over time on hosts that make extensive use of ftrace histogram triggers.

Affected Products

  • Linux kernel (tracing subsystem, histogram trigger code)
  • Distributions shipping kernels containing commit 656fe2ba85e8 ("tracing: Use hist trigger's var_ref array to destroy var_refs")
  • Stable kernel branches referenced in the backport commits 222abcbe, 516001d5, 74375caa, and a69baeac

Discovery Timeline

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

Technical Details for CVE-2026-97923

Vulnerability Analysis

The vulnerability resides in the kernel's ftrace histogram trigger implementation. When a user configures a histogram trigger that references a variable, the kernel calls create_var_ref() to allocate a new hist_field with the HIST_FIELD_FL_VAR_REF flag. It then calls init_var_ref() to populate the field's contents.

If init_var_ref() fails, the allocated hist_field is leaked. The field is not yet linked into the trigger's var_refs[] array, which only happens after a successful initialization. As a result, no cleanup path references the object.

The standard cleanup function destroy_hist_field() returns early for any field flagged HIST_FIELD_FL_VAR_REF, because commit 656fe2ba85e8 moved variable-reference cleanup to a dedicated walk over the trigger's var_refs[] array. Since the failed field is in neither location, memory is lost.

Root Cause

The root cause is a lifecycle mismatch introduced when variable-reference cleanup was refactored. The original call to destroy_hist_field() was correct before the refactor, but after it, the function silently skips VAR_REF fields. The caller create_var_ref() therefore invokes a cleanup routine that performs no work for this field type. The fix calls __destroy_hist_field(), which frees the field without inspecting the flag.

Attack Vector

Triggering the leak requires local privileges sufficient to configure ftrace histogram triggers, typically through /sys/kernel/debug/tracing/ or /sys/kernel/tracing/. A local user capable of writing malformed histogram trigger definitions can repeatedly induce init_var_ref() failures and gradually exhaust kernel memory. The vulnerability does not provide code execution or privilege escalation. Impact is limited to resource consumption and potential denial of service on long-running systems.

See the upstream fix in Kernel Git Commit 222abcbe for the implementation details.

Detection Methods for CVE-2026-97923

Indicators of Compromise

  • Growing unaccounted kernel slab allocations correlated with activity in /sys/kernel/tracing/events/*/trigger or /sys/kernel/debug/tracing/.
  • Repeated userspace writes to histogram trigger files that return error codes such as -ENOMEM or -EINVAL.
  • Steadily increasing kmalloc-* cache usage reported by /proc/slabinfo without corresponding workload growth.

Detection Strategies

  • Audit kernel versions against the fixed commits (222abcbe, 516001d5, 74375caa, a69baeac) to confirm patch status.
  • Monitor who has write access to tracefs and debugfs, and flag non-root processes attempting to configure histogram triggers.
  • Correlate ftrace trigger configuration events with sustained kernel memory growth over hours or days.

Monitoring Recommendations

  • Enable auditd rules on /sys/kernel/tracing/ and /sys/kernel/debug/tracing/ write operations to capture trigger configuration attempts.
  • Track long-term trends for MemAvailable, Slab, and SReclaimable from /proc/meminfo on production hosts.
  • Alert on repeated failed writes to tracing trigger files from the same process or user context.

How to Mitigate CVE-2026-97923

Immediate Actions Required

  • Apply the upstream Linux kernel patches that call __destroy_hist_field() on the error path of create_var_ref().
  • Restrict access to tracefs and debugfs so that only trusted administrative accounts can configure ftrace triggers.
  • Reboot into patched kernels during the next scheduled maintenance window on hosts using histogram triggers.

Patch Information

The fix is available in the mainline kernel and stable backports. Review the relevant commits: Kernel Git Commit 222abcbe, Kernel Git Commit 516001d5, Kernel Git Commit 74375caa, and Kernel Git Commit a69baeac. The patch replaces the ineffective destroy_hist_field() call with __destroy_hist_field(), which frees the field regardless of its flags.

Workarounds

  • Mount tracefs with restrictive permissions or unmount it on systems that do not require live tracing.
  • Disable or constrain the CONFIG_HIST_TRIGGERS functionality through access controls where feasible.
  • Use Linux capabilities and namespaces to prevent unprivileged containers from reaching tracing interfaces on the host.
bash
# Configuration example: restrict tracefs to root only
mount -o remount,mode=0700 /sys/kernel/tracing
chown root:root /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.