UBUNTU-CVE-2026-89746: Use After Free
In the Linux kernel, the following vulnerability has been resolved: tracing: Fix use-after-free with same-name named triggers When two hist triggers on different events are registered with the same name=, the second one reuses the first as nameddata. Both are added to tr->histvars by savehistvars() during eventhisttriggerparse(), because savehistvars() is called before eventtriggerregister() while the named reuse is only detected later, in histregistertrigger(). In the named-data branch histregistertrigger() then frees the second histogram's histdata via destroyhistdata(), but never removes its tr->histvars list entry, leaving a dangling pointer and leaking the tracearray reference it holds. A later hist trigger that references a variable makes findvarfile() walk tr->histvars and dereference the freed histdata. The bug is reproducible from userspace by writing three hist triggers to tracefs: cd /sys/kernel/tracing echo 'hist:keys=commonpid:x=commonpid:name=mh' > events/sched/schedswitch/trigger echo 'hist:keys=commonpid:x=commonpid:name=mh' > events/sched/schedprocessfork/trigger echo 'hist:keys=commonpid:vals=$x' > events/sched/schedprocessexit/trigger The third write panics the kernel: BUG: KASAN: slab-use-after-free in findvarfile.part.0+0x272/0x290 Read of size 8 at addr ffff888001f8a0e0 by task sh/1 CPU: 1 UID: 0 PID: 1 Comm: sh Tainted: G D N Call Trace: findvarfile.part.0 findeventvar parseatom parseexpr createvalfield eventhisttriggerparse triggerprocessregex eventtriggerwrite vfswrite ksyswrite dosyscall64 entrySYSCALL64afterhwframe Allocated by task 1: eventhisttriggerparse Freed by task 1: histregistertrigger+0x618/0xa30 eventhisttriggerparse The buggy address belongs to freed 2048-byte region Oops: general protection fault ... RIP: findvarfile.part.0 Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b Fix by removing the histdata from tr->histvars and releasing the tracearray reference in the named-data branch of histregistertrigger() before freeing the histdata.
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 - Compensating control
In the named-data branch of hist_register_trigger(), remove the freed hist_data from tr->hist_vars and release the trace_array reference before freeing hist_data.
Event History
Frequently Asked Questions
Is this remotely exploitable?
The supplied vector identifies this as a local attack (AV:L), not a remote one. It requires low privileges (PR:L) and no user interaction (UI:N).
What access does an attacker need to trigger the flaw?
An attacker needs to be able to write histogram triggers through tracefs. The issue is reproducible from userspace by registering histogram triggers on tracing events.
What trigger configuration causes the use-after-free?
The condition occurs when two histogram triggers on different events use the same name, causing the second trigger to reuse the first trigger's named data. A later histogram trigger that references a variable can then cause traversal of a list entry pointing to freed histogram data.
Which Ubuntu kernel packages are identified as affected?
The listed packages are ubuntu/linux-riscv, ubuntu/linux-realtime, ubuntu/linux-azure, ubuntu/linux-gcp, ubuntu/linux-azure-fde, ubuntu/linux-gke, ubuntu/linux-hwe-edge, and ubuntu/linux-gkeop.