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-97918 Overview
CVE-2026-97918 is a use-after-free vulnerability in the Linux kernel's tracing subsystem. The flaw occurs when enabling a histogram trigger fails, leaving the trigger freed while still referenced by the global named_triggers list. A subsequent call to find_named_trigger() reads the freed memory, producing a KASAN slab-use-after-free report. The issue was uncovered during kernel self-testing and resolved by ensuring that hist_unregister_trigger() cleans up the registration path when trace_event_trigger_enable_disable() fails.
Critical Impact
Local triggering of a kernel use-after-free in the tracing subsystem can lead to memory corruption and potential privilege escalation on affected Linux hosts.
Affected Products
- Linux kernel (upstream tracing subsystem)
- Distributions shipping vulnerable kernel versions prior to the fix commits
- Systems where unprivileged histogram trigger configuration is possible via tracefs
Discovery Timeline
- 2026-09-25 - CVE-2026-97918 published to NVD
- 2026-09-25 - Last updated in NVD database
Technical Details for CVE-2026-97918
Vulnerability Analysis
The defect lives in the kernel event histogram trigger path. The prior fix in commit 6f86bdeab633 ("tracing: Fix bad hist from corrupting named_triggers list") moved trigger registration so that hist_trigger_enable() immediately follows it. One failure path remained unhandled.
Inside hist_trigger_enable(), the trigger is added to file->triggers and then removed when trace_event_trigger_enable_disable(file, 1) returns an error. Because the list entry is deleted before unregistration runs, the subsequent walk in hist_unregister_trigger() matches nothing, test stays NULL, and the ->free() callback that would invoke del_named_trigger() is skipped. Control falls through to out_free, which frees the trigger object while it remains on the global named_triggers list.
Root Cause
The root cause is improper cleanup ordering during a failure path. The trigger is detached from file->triggers before the unregistration logic responsible for removing it from the global named list and releasing related state (named list entry, hist_pad reference, shared histogram reference, copied cmd_ops) can execute. The fix leaves the trigger in place so hist_unregister_trigger() can undo everything cmd_ops->init() performed and also pair the failed trace_event_trigger_enable_disable() call.
Attack Vector
A local user with permission to write to tracefs trigger files (typically root or members of a privileged tracing group) can configure a histogram trigger that fails to enable. The resulting use-after-free is observable by subsequent calls to find_named_trigger+0xac/0xc0 through hist_register_trigger() and event_hist_trigger_parse(), as shown in the reported KASAN trace. Exploitation requires local access and the ability to issue repeated trigger write operations via event_trigger_write().
See the upstream fixes for implementation detail: Kernel Git Commit 51b0710, Kernel Git Commit 92383ce, and Kernel Git Commit bfa6bc1.
Detection Methods for CVE-2026-97918
Indicators of Compromise
- KASAN reports of slab-use-after-free in find_named_trigger in kernel logs.
- Kernel oops or panic traces that include hist_register_trigger, event_hist_trigger_parse, or event_trigger_write on the call stack.
- Unexpected writes to /sys/kernel/tracing/events/*/trigger from non-administrative workflows.
Detection Strategies
- Enable KASAN on test or canary kernels to surface the use-after-free deterministically during QA.
- Audit tracefs and debugfs access controls, logging any process other than approved observability tooling that writes histogram trigger definitions.
- Correlate repeated failing trigger configuration attempts with subsequent kernel warnings as a signal of exploitation attempts.
Monitoring Recommendations
- Forward dmesg and /var/log/kern.log to a centralized log store and alert on KASAN, BUG:, and use-after-free strings.
- Monitor process execution that invokes writes to /sys/kernel/tracing/ or /sys/kernel/debug/tracing/ paths.
- Track kernel version inventory to confirm hosts have received the fix commits across production fleets.
How to Mitigate CVE-2026-97918
Immediate Actions Required
- Apply the upstream fix commits 51b07104, 92383cef, and bfa6bc11 or install a distribution kernel update that includes them.
- Restrict access to tracefs and debugfs to administrators and trusted observability services only.
- Reboot affected systems after kernel package updates to activate the patched image.
Patch Information
The fix leaves the trigger registered on failure so hist_unregister_trigger() performs the full cleanup, including the named list entry, hist_pad reference, the shared histogram reference, and the copied cmd_ops. It also removes the fall-through from out_unreg to out_free, which previously double-released trigger_data and hist_data. The enable_timestamps check in hist_unregister_trigger() is also moved above the ->free() call because hist_data does not outlive it. Patches are available in the stable tree via Kernel Git Commit 51b0710, Kernel Git Commit 92383ce, and Kernel Git Commit bfa6bc1.
Workarounds
- Mount tracefs with restrictive ownership so only root processes can write trigger files.
- Disable histogram triggers in environments that do not require them by removing write permissions on events/*/trigger under tracefs.
- Use mandatory access control (SELinux, AppArmor) policies to confine processes capable of writing tracing configuration.
# Configuration example: restrict tracefs trigger access
mount -o remount,mode=0700 /sys/kernel/tracing
chown -R root:root /sys/kernel/tracing
find /sys/kernel/tracing/events -name trigger -exec chmod 0600 {} \;
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

