Commit 8a157d8
committed
tracing: Do not free "head" on error path of filter_free_subsystem_filters()
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 <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Link: https://lore.kernel.org/[email protected]
Fixes: a9d0aab ("tracing: Fix regression of filter waiting a long time on RCU synchronization")
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>
Closes: https://lore.kernel.org/r/[email protected]/
Signed-off-by: Steven Rostedt (Google) <[email protected]>1 parent 19272b3 commit 8a157d8
1 file changed
+1
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1437 | 1437 | | |
1438 | 1438 | | |
1439 | 1439 | | |
1440 | | - | |
1441 | | - | |
| 1440 | + | |
1442 | 1441 | | |
1443 | | - | |
1444 | 1442 | | |
1445 | 1443 | | |
1446 | 1444 | | |
| |||
0 commit comments