summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/check-perf-trace.py
diff options
context:
space:
mode:
authorMasami Hiramatsu (Google) <mhiramat@kernel.org>2025-03-31 17:05:07 +0300
committerMasami Hiramatsu (Google) <mhiramat@kernel.org>2025-04-02 17:18:58 +0300
commitdd941507a9486252d6fcf11814387666792020f3 (patch)
tree24a9736cedfe69bc65688dfd1da135860af5fafc /tools/perf/scripts/python/check-perf-trace.py
parentd24fa977eec53399a9a49a2e1dc592430ea0a607 (diff)
downloadlinux-dd941507a9486252d6fcf11814387666792020f3.tar.xz
tracing: fprobe events: Fix possible UAF on modules
Commit ac91052f0ae5 ("tracing: tprobe-events: Fix leakage of module refcount") moved try_module_get() from __find_tracepoint_module_cb() to find_tracepoint() caller, but that introduced a possible UAF because the module can be unloaded before try_module_get(). In this case, the module object should be freed too. Thus, try_module_get() does not only fail but may access to the freed object. To avoid that, try_module_get() in __find_tracepoint_module_cb() again. Link: https://lore.kernel.org/all/174342990779.781946.9138388479067729366.stgit@devnote2/ Fixes: ac91052f0ae5 ("tracing: tprobe-events: Fix leakage of module refcount") Cc: stable@vger.kernel.org Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/check-perf-trace.py')
0 files changed, 0 insertions, 0 deletions