You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tracing: fprobe events: Fix possible UAF on modules
JIRA: https://issues.redhat.com/browse/RHEL-86682
Conflicts: Context change from missing commit 8275637 ("tracing:
Adopt __free() and guard() for trace_fprobe.c")
commit dd94150
Author: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Date: Mon Mar 31 23:05:07 2025 +0900
tracing: fprobe events: Fix possible UAF on modules
Commit ac91052 ("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: ac91052 ("tracing: tprobe-events: Fix leakage of module refcount")
Cc: stable@vger.kernel.org
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
0 commit comments