UBUNTU-CVE-2026-97936: Null Pointer Dereference
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
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ubuntu/linux-hwe-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42~24.04.1 - Upgrade
Upgrade
ubuntu/linux-riscv-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1~24.04.1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 7.0.0-42.42 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 7.0.0-1016.17 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 7.0.0-1016.18 - Upgrade
Upgrade
ubuntu/linux-ibmto a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oem-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 7.0.0-1015.16 - Upgrade
Upgrade
ubuntu/linux-riscvto a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1 - Configuration
After resolving the field name, enforce that the field is a long[] type before enabling the .stacktrace modifier; reject unresolved names, hitcount.stacktrace, and common_* pseudo-fields because they do not hold a stacktrace.
Linux kernel tracing histogram stacktrace modifier stacktrace field type validation = long[]
Event History
Frequently Asked Questions
Who is exposed to this issue?
Systems using the affected Ubuntu Linux kernel packages are exposed when histogram triggers can be configured through the kernel tracing interface. The affected package list includes linux-riscv, linux-realtime, linux-azure, linux-gcp, linux-azure-fde, linux-gke, linux-hwe-edge, and linux-gkeop.
What does an attacker need to do to trigger the memory corruption?
They need to create a histogram trigger using the .stacktrace modifier on a field that is not actually a stacktrace field. The example uses a trigger written under /sys/kernel/tracing/events/sched/sched_process_fork/trigger with parent_pid.stacktrace as the key.
What is the impact of a successful trigger?
The kernel can interpret arbitrary event data as a stacktrace location and count, then copy an unbounded number of entries into a fixed 31-entry array. The supplied example results in a kernel NULL pointer dereference, and the described behavior is memory corruption.