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-97920 Overview
CVE-2026-97920 is a Linux kernel vulnerability in the tracing subsystem. The flaw resides in print_entries() within the histogram trigger code path. The function reuses the n_entries variable for both the sort entry count and its own return value. When the stats allocation fails, n_entries is overwritten with -ENOMEM and later passed to tracing_map_destroy_sort_entries(), which accepts an unsigned integer. The negative value wraps to 4294967284, causing an out-of-bounds read of a vmalloc region when the cleanup loop dereferences pointers past the valid array.
Critical Impact
An unsigned integer wrap turns an allocation-failure cleanup path into an out-of-bounds read in kernel vmalloc memory, producing a KASAN report and a potential kernel oops when reading the hist file of a trigger carrying a .percent or .graph modifier.
Affected Products
- Linux kernel (upstream tracing_map histogram trigger code)
- Stable kernel branches referenced by commits 06f5634, 17e87ce, 9bd8321, and c80b2a8
- Builds that include the companion change "tracing: hist: let values keep the percent and graph modifiers"
Discovery Timeline
- 2026-09-25 - CVE-2026-97920 published to NVD
- 2026-09-25 - Last updated in NVD database
Technical Details for CVE-2026-97920
Vulnerability Analysis
The defect lives in kernel/trace/trace_events_hist.c. print_entries() first calls tracing_map_sort_entries() and stores the returned count in n_entries. The same variable is reused as the function's return value, so when a subsequent kzalloc() for a stats structure fails, the code assigns n_entries = -ENOMEM and jumps to the out: label.
The cleanup path calls tracing_map_destroy_sort_entries(sort_entries, n_entries). The destroy helper declares its count argument as unsigned int and iterates from zero up to that bound, invoking destroy_sort_entry() on each pointer. The negative value is reinterpreted as 4294967284, so the loop walks far past the end of the sort_entries vmalloc region, dereferencing and freeing arbitrary pointers.
The condition is reachable only when reading the hist file of a histogram trigger whose value carries a .percent or .graph modifier, and when the stats allocation fails. KASAN flags the fault as vmalloc-out-of-bounds in tracing_map_destroy_sort_entries+0xa0/0xb0, with the read occurring beyond a four-page region allocated by tracing_map_sort_entries.
Root Cause
The root cause is variable aliasing combined with a signed-to-unsigned conversion. n_entries carries two incompatible meanings along the same control flow: a non-negative element count on success and a negative errno on failure. Passing the dual-purpose value to an API that expects unsigned int collapses the error signal into a very large iteration bound. This is an out-of-bounds read driven by an integer sign conversion defect [CWE-125, CWE-195].
Attack Vector
Exploitation requires local access and the ability to configure a histogram trigger with a .percent or .graph value, plus the ability to read its hist file under conditions where the stats allocation fails. __create_val_field() has rejected these modifiers since v6.3, so mainline is not reachable until the companion patch that restores support for percent and graph modifiers lands. On vulnerable builds the result is a kernel-space out-of-bounds read, with potential for an oops and denial of service when the fault falls on an unmapped page. The upstream fix separates the error return into its own variable so n_entries continues to hold the valid count on the cleanup path.
Detection Methods for CVE-2026-97920
Indicators of Compromise
- KASAN report containing vmalloc-out-of-bounds in tracing_map_destroy_sort_entries in dmesg or kernel logs.
- Kernel oops or panic stack traces showing hist_show calling tracing_map_destroy_sort_entries from seq_read_iter and vfs_read.
- Processes reading /sys/kernel/tracing/events/*/hist or /sys/kernel/debug/tracing/events/*/hist for triggers that declare .percent or .graph value modifiers.
Detection Strategies
- Inventory running kernels against the fixed commits 06f5634ec558, 17e87ce55f87, 9bd8321f5370, and c80b2a8067d5 to flag unpatched builds.
- Audit tracing configurations for histogram triggers using .percent or .graph modifiers, which are the only configurations that reach the vulnerable branch.
- Correlate kernel KASAN or oops events with user activity reading tracefs hist files to identify triggering sessions.
Monitoring Recommendations
- Forward dmesg, kern.log, and KASAN output to a central log pipeline and alert on tracing_map_destroy_sort_entries frames.
- Monitor access to tracefs and debugfs paths, since reading hist files is required to reach the faulty code path.
- Track memory-pressure conditions that make the statskzalloc() more likely to fail, including sustained low-memory and OOM events on tracing hosts.
How to Mitigate CVE-2026-97920
Immediate Actions Required
- Apply the upstream fix that returns the error in a separate variable and leaves n_entries holding the valid count across the cleanup path.
- Restrict access to tracefs and debugfs so only trusted administrators can create histogram triggers or read hist files.
- Verify whether the companion change "tracing: hist: let values keep the percent and graph modifiers" has been backported; if so, the fix for CVE-2026-97920 must be applied first.
Patch Information
The fix is distributed across the stable tree in commits Kernel Git Commit 06f5634, Kernel Git Commit 17e87ce, Kernel Git Commit 9bd8321, and Kernel Git Commit c80b2a8. The patch introduces a dedicated error variable so tracing_map_destroy_sort_entries() receives the correct element count on both success and failure paths.
Workarounds
- Avoid creating histogram triggers whose values use .percent or .graph modifiers until the kernel is patched.
- Unmount or restrict tracefs and debugfs on production systems where kernel tracing is not required.
- Limit CAP_SYS_ADMIN and tracefs access to a minimal set of operators to reduce the attack surface.
# Configuration example
# Restrict tracefs access to root only
mount -o remount,mode=0700 /sys/kernel/tracing
# Verify running kernel against fixed stable commits
uname -r
git -C /path/to/linux log --oneline \
06f5634ec558 17e87ce55f87 9bd8321f5370 c80b2a8067d5
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

