CVE-2026-97918: tracing: Undo the registration when enabling the histogram trigger fails

Published Sep 25, 2026
·
Updated

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

tracing: Undo the registration when enabling the histogram trigger fails

Commit 6f86bdeab633 ("tracing: Fix bad hist from corrupting namedtriggers list") described how a trigger that is registered but not on file->triggers ends up freed while still on the global namedtriggers list, and moved the registration down so that histtriggerenable() follows it immediately. One path still gets there. histtriggerenable() adds the trigger and takes it straight back out when the event cannot be enabled:

listaddtailrcu(&data->list, &file->triggers);

updatecondflag(file);

if (traceeventtriggerenabledisable(file, 1) < 0) { listdelrcu(&data->list); updatecondflag(file); ret--; }

so the list walk in histunregistertrigger() matches nothing, test stays NULL, and the ->free() that would call delnamedtrigger() is skipped. outunreg falls through to outfree, which frees the trigger anyway:

BUG: KASAN: slab-use-after-free in findnamedtrigger+0xac/0xc0 Read of size 8 at addr ffff8880091d3160 by task init/1 findnamedtrigger+0xac/0xc0 histregistertrigger+0xc1/0xa00 eventhisttriggerparse+0x3146/0x6af0 eventtriggerwrite+0xce/0x160 Freed by task 69: kfree+0x154/0x420 triggerkthreadfn+0xfd/0x160

Leave the trigger where histunregistertrigger() can find it and let that undo the registration, which is the only code that knows all of what cmdops->init() took: the named list entry, the histpad reference, the reference on the trigger a named histogram is shared with, and the copied cmdops. It also pairs the failed traceeventtriggerenabledisable(), whose smref and buffered event reference are otherwise left behind.

Since ->free() releases triggerdata and, for a trigger that does not share its histogram, histdata with it, outunreg can no longer fall through to outfree. For a trigger that does share, histregistertrigger() has already destroyed the caller's histdata, so the fall-through was reading freed memory there as well.

Move the enabletimestamps check in histunregistertrigger() above the ->free() call for the same reason: histdata does not outlive it once the trigger being removed is the one that owns it.

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 sequence triggers the use-after-free condition?

The condition occurs when a histogram trigger is registered and hist_trigger_enable() then fails because the target event cannot be enabled. The trigger is removed from the per-file trigger list but remains on the global named_triggers list before it is freed.

2

How might an affected system manifest the problem?

A later lookup of the stale named trigger can access freed memory in find_named_trigger(). The report includes a KASAN slab-use-after-free trace involving find_named_trigger, hist_register_trigger, and event_hist_trigger_parse.

3

What fix material is available?

The vulnerability is described as resolved, and the provided stable kernel references identify fixes at 51b07104d563d4be2be34158d3b9d922ca417642, bfa6bc11aef93a3d9db0ac9564b734849a9d959b, and 92383cef66791a0c63a2f27755cadbdb2fbf270b.

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