CVE-2026-97936: tracing: Fix memory corruption from the histogram stacktrace modifier

Published Sep 25, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

tracing: Fix memory corruption from the histogram stacktrace modifier

parsefield() sets HISTFIELDFLSTACKTRACE from the ".stacktrace" modifier before it looks the field name up, and nothing afterwards checks that the name resolved to a field which holds a stacktrace. createhistfield() picks HISTFIELDFNSTACK on the strength of the field pointer alone, which reads a dataloc word from the record and follows its low 16 bits as an offset into the same record. eventhisttrigger() takes the first word there as an entry count and copies that many longs into a 31 entry array:

nentries = stack; memcpy(entries, ++stack, nentries sizeof(unsigned long));

Neither end of that copy is bounded, and the count is whatever the event holds at the offset, so any field will do:

# cd /sys/kernel/tracing/events/sched/schedprocessfork # echo 'hist:keys=parentpid.stacktrace' > trigger # (true)

BUG: kernel NULL pointer dereference, address: 0000000000000008 RIP: 0010:rbinsertcolor+0x18/0x130 timerqueuelinkedadd+0x7e/0xd0 enqueuehrtimer+0x39/0xb0 hrtimerrunqueues+0x10f/0x1f0 </IRQ> RIP: 0010:memcpy+0xc/0x30 eventhisttrigger+0x165/0x690

The timer interrupt landed on the rbtree the copy had already run over. No debug options are needed for this; KASAN reports the same write as an out-of-bounds read of 13835058055416381440 bytes.

Documentation/trace/histogram.rst already states the rule, "must be a long[] type", so enforce it once the name has been resolved. Names which resolve to no field at all, "hitcount.stacktrace" and the common pseudo-fields, are refused for the same reason: they hold no stacktrace to read.

Affected Software

1 affected component
Linux Linux kernel

Event History

Sep 25, 2026
CVE Published
via MITRE·10:22 AM
Data Sourced
via MITRE·10:22 AM
Description
Data Sourced
via NVD·11:17 AM
Description

Frequently Asked Questions

1

What access does an attacker need to trigger this issue?

The demonstrated trigger requires writing a histogram trigger definition to a tracing event's trigger file under /sys/kernel/tracing, such as the sched_process_fork event. The provided data does not state which users or privilege configurations are permitted to do this.

2

What action causes the vulnerable path to run?

A histogram key using the .stacktrace modifier on a field that does not actually contain a stacktrace can select the stacktrace handling path. When the relevant event occurs, the kernel treats record data as a stacktrace location and count, leading to an unbounded copy.

3

What could happen when the issue is triggered?

The described behavior can cause memory corruption because neither the copied entry count nor the copy bounds are validated. The supplied example results in a kernel NULL pointer dereference during memcpy.

4

How can I check for potentially affected trigger definitions?

Review histogram trigger definitions for keys that apply the .stacktrace modifier to fields that are not stacktrace fields. The example to look for is a trigger definition resembling hist:keys=parent_pid.stacktrace.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203