summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorMasami Hiramatsu (Google) <mhiramat@kernel.org>2026-11-13 17:28:09 +0900
committerMasami Hiramatsu (Google) <mhiramat@kernel.org>2026-11-13 23:04:31 +0900
commitf1d9b7a3fe99b4228acdbab3c744c29f7ffe86ef (patch)
treee5b0609d1681c4761f4cbc06e07a57c2823e01eb /tools/perf/scripts/python
parentc55722233c041865d1477a58adbc52540bfad017 (diff)
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: ca89bc071d5e ("tracing/kprobe: Add multi-probe per event support") Fixes: 41af3cf587f4 ("tracing/uprobe: Add multi-probe per uprobe event support") Fixes: 7491e2c44278 ("tracing: Add a probe that attaches to trace events") Fixes: 334e5519c375 ("tracing/probes: Add fprobe events for tracing function entry and exit.") Cc: stable@vger.kernel.org Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions