Files
linux/kernel
Masami Hiramatsu (Google) f1d9b7a3fe tracing/probes: Check enabled and busy state before unlinking sibling probes
When a multiprobe event is enabled or referenced (for example, by an
eprobe, trigger, or open tracefs file) and a user attempts to delete the
event or one of its probes via dynamic_events, checking
trace_probe_has_sibling() before the enabled and busy checks allows the
first probe to be unlinked and freed while the event is still active,
only returning -EBUSY on the last sibling probe. For uprobe events,
unlinking and freeing an enabled sibling probe without unregistering its
uprobe_consumer also causes a use-after-free.

Ensure all four probe types (kprobe, fprobe, uprobe, and eprobe) verify
that the event is neither enabled nor busy before unlinking any sibling
probe.

Link: https://lore.kernel.org/all/179455848898.403392.17675270675769076596.stgit@devnote2/

Fixes: ca89bc071d ("tracing/kprobe: Add multi-probe per event support")
Fixes: 41af3cf587 ("tracing/uprobe: Add multi-probe per uprobe event support")
Fixes: 7491e2c442 ("tracing: Add a probe that attaches to trace events")
Fixes: 334e5519c3 ("tracing/probes: Add fprobe events for tracing function entry and exit.")
Cc: [email protected]
Signed-off-by: Masami Hiramatsu (Google) <[email protected]>
2026-11-13 23:04:31 +09:00
..
…
…
2026-09-28 08:44:41 +02:00
…
…
…
…
…
2026-11-11 12:32:07 +01:00
2026-10-12 11:13:01 +02:00
…
…
…
…
2026-10-24 00:46:49 -07:00
2026-01-26 19:07:13 -08:00
…
…
2026-09-04 12:46:45 +02:00