tracing/probe: Fix null pointer dereference
PATCH 1/1 tracing/probe: Fix null pointer dereference
BUG: KASAN: null-ptr-deref in trace_probe_cleanup+0x8d/0xd0 Read of size 8 at addr 0000000000000000 by task syz-executor.0/9746 trace_probe_cleanup+0x8d/0xd0 free_trace_kprobe.part.14+0x15/0x50 alloc_trace_kprobe+0x23e/0x250
Signed-off-by Xinpeng Liu <[email protected]>
--- kernel/trace/trace_probe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
kernel/trace/trace_probe.c +2 -1
@@ -895,7 +895,8 @@ void trace_probe_cleanup(struct trace_probe *tp)for (i =0 ; i < tp->nr_args; i++)traceprobe_free_probe_arg (&tp->args[i]); -kfree (call->class->system); +if (call->class) +kfree (call->class->system);kfree (call->name);kfree (call->print_fmt); }
Signature · 1 line
1.8.3.1