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

tracing: Set the trace clock before registering the histogram trigger

hist_register_trigger() puts the trigger on the global named_triggers
list in cmd_ops->init(), and only then sets the trace clock:

if (data->cmd_ops->init) {
ret = data->cmd_ops->init(data);
if (ret < 0)
goto out;
}

if (hist_data->enable_timestamps) {
ret = tracing_set_clock(file->tr, hist_data->attrs->clock);
if (ret) {
hist_err(tr, HIST_ERR_SET_CLOCK_FAIL, errpos(clock));
goto out;
}

The clock string is not checked anywhere before that call, so a named
trigger using common_timestamp with an unknown clock fails after it has
already become findable. event_hist_trigger_parse() then frees it
without taking it off the list, and the next lookup by name reads the
freed object:

~# cd /sys/kernel/tracing/events/sched/sched_switch
~# echo 'hist:name=foo:keys=common_pid:ts=common_timestamp:clock=bogus' > trigger
bash: echo: write error: Invalid argument
~# echo 'hist:name=foo:keys=common_pid' > trigger

BUG: KASAN: slab-use-after-free in find_named_trigger+0xac/0xc0
Read of size 8 at addr ffff88800915d760 by task init/1
find_named_trigger+0xac/0xc0
hist_register_trigger+0xc1/0x900
event_hist_trigger_parse+0x3146/0x6af0
event_trigger_write+0xce/0x160
Freed by task 63:
kfree+0x154/0x420
trigger_kthread_fn+0xfd/0x160

Set the clock before the trigger is registered, so that nothing which
can fail runs after it is published, the way commit 6f86bdeab633
("tracing: Fix bad hist from corrupting named_triggers list") moved the
registration below the rest of the setup.

tracing_set_filter_buffering() is reference counted, so the init failure
path has to drop the reference that the clock block now takes first.
Published: 2026-09-25
Score: n/a
EPSS: n/a
KEV: No
Impact: Kernel Privilege Escalation via Use‑After‑Free
Action: Immediate Patch
AI Analysis

Impact

A fault in the Linux kernel’s tracing subsystem allows a kernel‑space use‑after‑free when a histogram trigger is created with an invalid clock string. The invalid clock causes initialization to fail after the trigger has already been registered, so the now‑freed trigger object remains on the global trigger list. A subsequent lookup reads the freed memory, triggering a KASAN crash and exposing kernel memory corruption. This flaw can be leveraged by a local user with write access to the trigger interface to corrupt kernel data or potentially execute arbitrary code at elevated privileges.

Affected Systems

All Linux kernels that include the tracing subsystem prior to the fix. No specific kernel release versions are enumerated in the CVE data, so the vulnerability may exist in any kernel build that has not applied this patch.

Risk and Exploitability

The vulnerability is a classic use‑after‑free (CWE‑416), which is highly exploitable for privilege escalation. The EPSS score is not provided, and the vulnerability is not listed in CISA’s KEV catalog, suggesting no widespread exploitation yet. The attack vector likely requires a local user to write to /sys/kernel/tracing/events/.../trigger with an intentionally malformed clock value; thus it is a local, file‑system‑based vector. With sufficient local system access, an attacker could trigger the use‑after‑free to corrupt memory and potentially gain kernel‑level execution.

Generated by OpenCVE AI on September 25, 2026 at 13:56 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update the Linux kernel to a version that contains the fix which sets the trace clock before the trigger is registered.
  • Reboot the system after applying the kernel update to ensure the new code is in memory.
  • If updating the kernel is not immediately possible, disable histogram triggers by removing any custom triggers or setting the configuration option to disable hist triggers, so that the vulnerable path is not exercised.

Generated by OpenCVE AI on September 25, 2026 at 13:56 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 25 Sep 2026 14:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-20
CWE-416

Fri, 25 Sep 2026 10:30:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: tracing: Set the trace clock before registering the histogram trigger hist_register_trigger() puts the trigger on the global named_triggers list in cmd_ops->init(), and only then sets the trace clock: if (data->cmd_ops->init) { ret = data->cmd_ops->init(data); if (ret < 0) goto out; } if (hist_data->enable_timestamps) { ret = tracing_set_clock(file->tr, hist_data->attrs->clock); if (ret) { hist_err(tr, HIST_ERR_SET_CLOCK_FAIL, errpos(clock)); goto out; } The clock string is not checked anywhere before that call, so a named trigger using common_timestamp with an unknown clock fails after it has already become findable. event_hist_trigger_parse() then frees it without taking it off the list, and the next lookup by name reads the freed object: ~# cd /sys/kernel/tracing/events/sched/sched_switch ~# echo 'hist:name=foo:keys=common_pid:ts=common_timestamp:clock=bogus' > trigger bash: echo: write error: Invalid argument ~# echo 'hist:name=foo:keys=common_pid' > trigger BUG: KASAN: slab-use-after-free in find_named_trigger+0xac/0xc0 Read of size 8 at addr ffff88800915d760 by task init/1 find_named_trigger+0xac/0xc0 hist_register_trigger+0xc1/0x900 event_hist_trigger_parse+0x3146/0x6af0 event_trigger_write+0xce/0x160 Freed by task 63: kfree+0x154/0x420 trigger_kthread_fn+0xfd/0x160 Set the clock before the trigger is registered, so that nothing which can fail runs after it is published, the way commit 6f86bdeab633 ("tracing: Fix bad hist from corrupting named_triggers list") moved the registration below the rest of the setup. tracing_set_filter_buffering() is reference counted, so the init failure path has to drop the reference that the clock block now takes first.
Title tracing: Set the trace clock before registering the histogram trigger
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-09-25T10:22:49.820Z

Reserved: 2026-09-25T10:18:58.203Z

Link: CVE-2026-97935

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-09-25T11:17:20.850

Modified: 2026-09-25T11:17:20.850

Link: CVE-2026-97935

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-25T14:00:13Z

Weaknesses