summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorSteven Rostedt <rostedt@goodmis.org>2025-06-10 09:33:48 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-06-27 11:13:41 +0100
commit45ccfac4c5430f4de79d95c595e418634133ab5f (patch)
tree0556ef640c4b234d5fba9980976075bbc21c38d2 /tools/perf/scripts/python/stackcollapse.py
parentb73bf4d6304596cd5425018402a6c34227e7b731 (diff)
tracing: Do not free "head" on error path of filter_free_subsystem_filters()
commit 8a157d8a00e815cab4432653cb50c9cedbbb4931 upstream. The variable "head" is allocated and initialized as a list before allocating the first "item" for the list. If the allocation of "item" fails, it frees "head" and then jumps to the label "free_now" which will process head and free it. This will cause a UAF of "head", and it doesn't need to free it before jumping to the "free_now" label as that code will free it. Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Link: https://lore.kernel.org/20250610093348.33c5643a@gandalf.local.home Fixes: a9d0aab5eb33 ("tracing: Fix regression of filter waiting a long time on RCU synchronization") Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/r/202506070424.lCiNreTI-lkp@intel.com/ Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions