aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/subcmd/help.c
diff options
context:
space:
mode:
authorIan Rogers <[email protected]>2025-09-02 18:17:11 +0000
committerNamhyung Kim <[email protected]>2025-09-02 21:55:05 +0000
commitd7b67dd6f9db7bd2c49b415e901849b182ff0735 (patch)
tree0436a8a2a456c16aed8da5c0b5929831b54aad81 /tools/lib/subcmd/help.c
parentperf symbol: Add blocking argument to filename__read_build_id (diff)
downloadkernel-d7b67dd6f9db7bd2c49b415e901849b182ff0735.tar.gz
kernel-d7b67dd6f9db7bd2c49b415e901849b182ff0735.zip
perf bpf-event: Fix use-after-free in synthesis
Calls to perf_env__insert_bpf_prog_info may fail as a sideband thread may already have inserted the bpf_prog_info. Such failures may yield info_linear being freed which then causes use-after-free issues with the internal bpf_prog_info info struct. Make it so that perf_env__insert_bpf_prog_info trigger early non-error paths and fix the use-after-free in perf_event__synthesize_one_bpf_prog. Add proper return error handling to perf_env__add_bpf_info (that calls perf_env__insert_bpf_prog_info) and propagate the return value in its callers. Closes: https://lore.kernel.org/lkml/CAP-5=fWJQcmUOP7MuCA2ihKnDAHUCOBLkQFEkQES-1ZZTrgf8Q@mail.gmail.com/ Fixes: 03edb7020bb9 ("perf bpf: Fix two memory leakages when calling perf_env__insert_bpf_prog_info()") Reviewed-by: Namhyung Kim <[email protected]> Signed-off-by: Ian Rogers <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Namhyung Kim <[email protected]>
Diffstat (limited to 'tools/lib/subcmd/help.c')
0 files changed, 0 insertions, 0 deletions