diff options
author | Masami Hiramatsu (Google) <mhiramat@kernel.org> | 2025-03-31 17:05:07 +0300 |
---|---|---|
committer | Masami Hiramatsu (Google) <mhiramat@kernel.org> | 2025-04-02 17:18:58 +0300 |
commit | dd941507a9486252d6fcf11814387666792020f3 (patch) | |
tree | 24a9736cedfe69bc65688dfd1da135860af5fafc /tools/perf/scripts/python/task-analyzer.py | |
parent | d24fa977eec53399a9a49a2e1dc592430ea0a607 (diff) | |
download | linux-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/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions