syzbot


general protection fault in trace_probe_unlink

Status: fixed on 2019/10/15 23:40
Subsystems: trace
[Documentation on labels]
Reported-by: syzbot+2f807f4d3a2a4e87f18f@syzkaller.appspotmail.com
Fix commit: d59fae6fea39 tracing/kprobe: Fix NULL pointer access in trace_porbe_unlink()
First crash: 1682d, last: 1678d
Cause bisection: introduced by (bisect log) :
commit ca89bc071d5e4e981dcc52e0ca90f4500d332e42
Author: Masami Hiramatsu <mhiramat@kernel.org>
Date: Wed Jun 19 15:07:49 2019 +0000

  tracing/kprobe: Add multi-probe per event support

Crash: general protection fault in trace_probe_unlink (log)
Repro: C syz .config
  
Discussions (4)
Title Replies (including bot) Last reply
[for-next][PATCH 4/8] tracing/kprobe: Fix NULL pointer access in trace_porbe_unlink() 1 (1) 2019/09/19 23:23
[PATCH] tracing/kprobe: Fix NULL pointer access in trace_porbe_unlink() 3 (3) 2019/09/18 06:28
Re: general protection fault in trace_probe_unlink 1 (1) 2019/09/18 01:13
general protection fault in trace_probe_unlink 0 (1) 2019/09/16 23:39

Sample crash report:
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000180
RBP: 00007ffc04171a30 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000ffffffff R11: 0000000000000246 R12: ffffffffffffffff
R13: 0000000000000004 R14: 0000000000000000 R15: 0000000000000000
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 8633 Comm: syz-executor797 Not tainted 5.3.0-rc8-next-20190915 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__list_del_entry_valid+0x85/0xf5 lib/list_debug.c:51
Code: 0f 84 e1 00 00 00 48 b8 22 01 00 00 00 00 ad de 49 39 c4 0f 84 e2 00 00 00 48 b8 00 00 00 00 00 fc ff df 4c 89 e2 48 c1 ea 03 <80> 3c 02 00 75 53 49 8b 14 24 4c 39 f2 0f 85 99 00 00 00 49 8d 7d
RSP: 0018:ffff888090a7f9d8 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: ffff88809b6f90c0 RCX: ffffffff817c0ca9
RDX: 0000000000000000 RSI: ffffffff817c0a73 RDI: ffff88809b6f90c8
RBP: ffff888090a7f9f0 R08: ffff88809a04e600 R09: ffffed1015d26aed
R10: ffffed1015d26aec R11: ffff8880ae935763 R12: 0000000000000000
R13: 0000000000000000 R14: ffff88809b6f90c0 R15: ffff88809b6f90d0
FS:  0000555556f99880(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000006cc090 CR3: 00000000962b2000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __list_del_entry include/linux/list.h:131 [inline]
 list_del_init include/linux/list.h:190 [inline]
 trace_probe_unlink+0x1f/0x200 kernel/trace/trace_probe.c:959
 trace_probe_cleanup+0xd3/0x110 kernel/trace/trace_probe.c:973
 trace_probe_init+0x3f2/0x510 kernel/trace/trace_probe.c:1011
 alloc_trace_uprobe+0x5e/0x250 kernel/trace/trace_uprobe.c:353
 create_local_trace_uprobe+0x109/0x4a0 kernel/trace/trace_uprobe.c:1508
 perf_uprobe_init+0x131/0x210 kernel/trace/trace_event_perf.c:314
 perf_uprobe_event_init+0x106/0x1a0 kernel/events/core.c:8898
 perf_try_init_event+0x135/0x590 kernel/events/core.c:10184
 perf_init_event kernel/events/core.c:10228 [inline]
 perf_event_alloc.part.0+0x1b89/0x33d0 kernel/events/core.c:10505
 perf_event_alloc kernel/events/core.c:10887 [inline]
 __do_sys_perf_event_open+0xa2d/0x2d00 kernel/events/core.c:10989
 __se_sys_perf_event_open kernel/events/core.c:10871 [inline]
 __x64_sys_perf_event_open+0xbe/0x150 kernel/events/core.c:10871
 do_syscall_64+0xfa/0x760 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x441269
Code: e8 5c ae 02 00 48 83 c4 18 c3 0f 1f 80 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 bb 0a fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffc04171a18 EFLAGS: 00000246 ORIG_RAX: 000000000000012a
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441269
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000180
RBP: 00007ffc04171a30 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000ffffffff R11: 0000000000000246 R12: ffffffffffffffff
R13: 0000000000000004 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace ef71b9b0abb5d24f ]---
RIP: 0010:__list_del_entry_valid+0x85/0xf5 lib/list_debug.c:51
Code: 0f 84 e1 00 00 00 48 b8 22 01 00 00 00 00 ad de 49 39 c4 0f 84 e2 00 00 00 48 b8 00 00 00 00 00 fc ff df 4c 89 e2 48 c1 ea 03 <80> 3c 02 00 75 53 49 8b 14 24 4c 39 f2 0f 85 99 00 00 00 49 8d 7d
RSP: 0018:ffff888090a7f9d8 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: ffff88809b6f90c0 RCX: ffffffff817c0ca9
RDX: 0000000000000000 RSI: ffffffff817c0a73 RDI: ffff88809b6f90c8
RBP: ffff888090a7f9f0 R08: ffff88809a04e600 R09: ffffed1015d26aed
R10: ffffed1015d26aec R11: ffff8880ae935763 R12: 0000000000000000
R13: 0000000000000000 R14: ffff88809b6f90c0 R15: ffff88809b6f90d0
FS:  0000555556f99880(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000006cc090 CR3: 00000000962b2000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/09/16 15:41 linux-next 2015a28f2cd5 cb936299 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/09/20 15:46 linux-next eb2f12732f67 d96e88f3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/09/18 09:04 linux-next a4b5b2e06e42 03e0d245 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/09/17 15:08 linux-next f84e1c16f08d 13dcda9b .config console log report ci-upstream-linux-next-kasan-gce-root
2019/09/17 05:25 linux-next f84e1c16f08d 51ca0454 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/09/16 15:38 linux-next 2015a28f2cd5 cb936299 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/09/16 15:13 linux-next 2015a28f2cd5 cb936299 .config console log report ci-upstream-linux-next-kasan-gce-root
* Struck through repros no longer work on HEAD.