summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/stackcollapse-report
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2026-07-22 21:59:44 -0700
committerNamhyung Kim <namhyung@kernel.org>2026-07-27 17:13:08 -0700
commitad7620a2b9455874884234b0cdae62e1be0ea1f3 (patch)
tree0d911b82ba471663566af29018e76d23abb3d972 /tools/perf/scripts/python/bin/stackcollapse-report
parentb2d4225695e6977cd7802fe425d8caa5822a5e7d (diff)
perf ui hists: Fix stack use-after-return in symbol_filter_str
In evsel__hists_browse(), the local stack array 'buf' is assigned directly to the persistent 'hists->symbol_filter_str' pointer. When the browser returns or is exited, this dangling pointer remains active in the 'hists' struct and is read asynchronously by the perf top background timer, triggering a stack use-after-return. Fix it by properly duplicating the input string using strdup(), safely invoking zfree() to prevent memory leaks when overwriting, and cleanly resetting and freeing the symbol filter string upon exiting the browser. Assisted-by: Antigravity:gemini-3.5-flash Signed-off-by: Ian Rogers <irogers@google.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions