general protection fault in delayed_uprobe_remove

12 views
Skip to first unread message

syzbot

unread,
Nov 1, 2018, 12:38:04 PM11/1/18
to ac...@kernel.org, alexander...@linux.intel.com, jo...@redhat.com, linux-...@vger.kernel.org, mi...@redhat.com, namh...@kernel.org, pet...@infradead.org, syzkall...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 5b7449810ae6 Merge tag 'tag-chrome-platform-for-v4.20' of ..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=15805e33400000
kernel config: https://syzkaller.appspot.com/x/.config?x=4e8e3fa31e0cc680
dashboard link: https://syzkaller.appspot.com/bug?extid=eab6e18f95a9fe69005e
compiler: gcc (GCC) 8.0.1 20180413 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1756fca3400000

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+eab6e1...@syzkaller.appspotmail.com

8021q: adding VLAN 0 to HW filter on device team0
8021q: adding VLAN 0 to HW filter on device team0
8021q: adding VLAN 0 to HW filter on device team0
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: 0 PID: 8497 Comm: syz-executor3 Not tainted 4.19.0+ #91
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
RIP: 0010:delayed_uprobe_remove+0x6f/0x140 kernel/events/uprobes.c:339
Code: 00 00 00 48 81 fb 80 f0 5f 89 4c 8b 23 49 bd 00 00 00 00 00 fc ff df
75 2f e9 98 00 00 00 e8 e8 1d e5 ff 4c 89 e0 48 c1 e8 03 <42> 80 3c 28 00
0f 85 91 00 00 00 49 81 fc 80 f0 5f 89 49 8b 04 24
RSP: 0018:ffff8801abd97380 EFLAGS: 00010a02
RAX: 1bd5a00000000020 RBX: ffff8801cb304800 RCX: 1ffff100357b5d54
RDX: 0000000000000000 RSI: ffffffff819a5b18 RDI: ffff8801cb304810
RBP: ffff8801abd973a8 R08: ffff8801abdaeaa0 R09: 0000000000000006
R10: 0000000000000000 R11: ffff8801abdae200 R12: dead000000000100
R13: dffffc0000000000 R14: ffff8801cefeb540 R15: 0000000000000000
FS: 0000000001283940(0000) GS:ffff8801dae00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000004cc6e0 CR3: 00000001d16cf000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
put_uprobe+0x4d/0x60 kernel/events/uprobes.c:575
uprobe_unregister+0x56/0x70 kernel/events/uprobes.c:1088
probe_event_disable.part.16+0x16a/0x2c0 kernel/trace/trace_uprobe.c:990
probe_event_disable kernel/trace/trace_uprobe.c:1224 [inline]
trace_uprobe_register+0x52c/0xcf0 kernel/trace/trace_uprobe.c:1223
perf_trace_event_unreg.isra.3+0xbb/0x220
kernel/trace/trace_event_perf.c:157
perf_uprobe_destroy+0xc3/0x130 kernel/trace/trace_event_perf.c:342
_free_event+0x414/0x1660 kernel/events/core.c:4446
put_event+0x48/0x60 kernel/events/core.c:4532
perf_event_release_kernel+0x8d0/0x10e0 kernel/events/core.c:4638
perf_release+0x37/0x50 kernel/events/core.c:4648
__fput+0x385/0xa30 fs/file_table.c:278
____fput+0x15/0x20 fs/file_table.c:309
task_work_run+0x1e8/0x2a0 kernel/task_work.c:113
tracehook_notify_resume include/linux/tracehook.h:188 [inline]
exit_to_usermode_loop+0x318/0x380 arch/x86/entry/common.c:166
prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline]
syscall_return_slowpath arch/x86/entry/common.c:268 [inline]
do_syscall_64+0x6be/0x820 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x411021
Code: 75 14 b8 03 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 34 19 00 00 c3 48
83 ec 08 e8 0a fc ff ff 48 89 04 24 b8 03 00 00 00 0f 05 <48> 8b 3c 24 48
89 c2 e8 53 fc ff ff 48 89 d0 48 83 c4 08 48 3d 01
RSP: 002b:00007ffda00105b0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000005 RCX: 0000000000411021
RDX: 0000000000000000 RSI: 0000000000730b80 RDI: 0000000000000004
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000730b70 R11: 0000000000000293 R12: 0000000000000000
R13: 0000000000000001 R14: 0000000000000033 R15: 0000000000000003
Modules linked in:
---[ end trace 0f8af665f1aa3802 ]---
RIP: 0010:delayed_uprobe_remove+0x6f/0x140 kernel/events/uprobes.c:339
Code: 00 00 00 48 81 fb 80 f0 5f 89 4c 8b 23 49 bd 00 00 00 00 00 fc ff df
75 2f e9 98 00 00 00 e8 e8 1d e5 ff 4c 89 e0 48 c1 e8 03 <42> 80 3c 28 00
0f 85 91 00 00 00 49 81 fc 80 f0 5f 89 49 8b 04 24
RSP: 0018:ffff8801abd97380 EFLAGS: 00010a02
RAX: 1bd5a00000000020 RBX: ffff8801cb304800 RCX: 1ffff100357b5d54
RDX: 0000000000000000 RSI: ffffffff819a5b18 RDI: ffff8801cb304810
RBP: ffff8801abd973a8 R08: ffff8801abdaeaa0 R09: 0000000000000006
R10: 0000000000000000 R11: ffff8801abdae200 R12: dead000000000100
R13: dffffc0000000000 R14: ffff8801cefeb540 R15: 0000000000000000
FS: 0000000001283940(0000) GS:ffff8801dae00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000004cc6e0 CR3: 00000001d16cf000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#bug-status-tracking for how to communicate with
syzbot.
syzbot can test patches for this bug, for details see:
https://goo.gl/tpsmEJ#testing-patches

syzbot

unread,
Nov 3, 2018, 3:16:04 PM11/3/18
to ac...@kernel.org, alexander...@linux.intel.com, jo...@redhat.com, linux-...@vger.kernel.org, mi...@redhat.com, namh...@kernel.org, pet...@infradead.org, syzkall...@googlegroups.com
syzbot has found a reproducer for the following crash on:

HEAD commit: 25e9471b6a27 Add linux-next specific files for 20181102
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=1549cfe5400000
kernel config: https://syzkaller.appspot.com/x/.config?x=2a22859d870756c1
dashboard link: https://syzkaller.appspot.com/bug?extid=eab6e18f95a9fe69005e
compiler: gcc (GCC) 8.0.1 20180413 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=137174f5400000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1278485d400000

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+eab6e1...@syzkaller.appspotmail.com

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: 0 PID: 21962 Comm: syz-executor753 Not tainted 4.19.0-next-20181102+
#104
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
RIP: 0010:delayed_uprobe_remove+0x6f/0x140 kernel/events/uprobes.c:339
Code: 00 00 00 48 81 fb c0 f8 5f 89 4c 8b 23 49 bd 00 00 00 00 00 fc ff df
75 2f e9 98 00 00 00 e8 78 1d e5 ff 4c 89 e0 48 c1 e8 03 <42> 80 3c 28 00
0f 85 91 00 00 00 49 81 fc c0 f8 5f 89 49 8b 04 24
RSP: 0018:ffff8801cc56f178 EFLAGS: 00010a02
RAX: 1bd5a00000000020 RBX: ffff8801c1fece00 RCX: 1ffff1003b2001f4
RDX: 0000000000000000 RSI: ffffffff819a4af8 RDI: ffff8801c1fece18
RBP: ffff8801cc56f1a0 R08: ffff8801d9000fa0 R09: 0000000000000006
R10: 0000000000000000 R11: ffff8801d9000700 R12: dead000000000100
R13: dffffc0000000000 R14: 0000000000000000 R15: ffff8801bb484ec0
FS: 00007fcaad5a4700(0000) GS:ffff8801dae00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fcaad5a3e78 CR3: 00000001d392f000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
uprobe_clear_state+0xbe/0x390 kernel/events/uprobes.c:1510
__mmput kernel/fork.c:1041 [inline]
mmput+0x1bc/0x610 kernel/fork.c:1066
exit_mm kernel/exit.c:545 [inline]
do_exit+0xe74/0x26d0 kernel/exit.c:854
do_group_exit+0x177/0x440 kernel/exit.c:970
get_signal+0x8a8/0x1970 kernel/signal.c:2517
do_signal+0x9c/0x21c0 arch/x86/kernel/signal.c:816
exit_to_usermode_loop+0x2e5/0x380 arch/x86/entry/common.c:162
prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline]
syscall_return_slowpath arch/x86/entry/common.c:268 [inline]
do_syscall_64+0x6be/0x820 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x4469c9
Code: e8 dc e6 ff ff 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 4b 07 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fcaad5a3db8 EFLAGS: 00000246 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 00000000006dcc38 RCX: 00000000004469c9
RDX: 00000000004469c9 RSI: 0000000000000000 RDI: 0000000000000004
RBP: 00000000006dcc30 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dcc3c
R13: 00007ffc9cc8172f R14: 00007fcaad5a49c0 R15: 00000000006dcd2c
Modules linked in:
---[ end trace b0de3a2925ef8954 ]---
RIP: 0010:delayed_uprobe_remove+0x6f/0x140 kernel/events/uprobes.c:339
Code: 00 00 00 48 81 fb c0 f8 5f 89 4c 8b 23 49 bd 00 00 00 00 00 fc ff df
75 2f e9 98 00 00 00 e8 78 1d e5 ff 4c 89 e0 48 c1 e8 03 <42> 80 3c 28 00
0f 85 91 00 00 00 49 81 fc c0 f8 5f 89 49 8b 04 24
RSP: 0018:ffff8801cc56f178 EFLAGS: 00010a02
RAX: 1bd5a00000000020 RBX: ffff8801c1fece00 RCX: 1ffff1003b2001f4
RDX: 0000000000000000 RSI: ffffffff819a4af8 RDI: ffff8801c1fece18
RBP: ffff8801cc56f1a0 R08: ffff8801d9000fa0 R09: 0000000000000006
R10: 0000000000000000 R11: ffff8801d9000700 R12: dead000000000100
R13: dffffc0000000000 R14: 0000000000000000 R15: ffff8801bb484ec0
FS: 00007fcaad5a4700(0000) GS:ffff8801dae00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000154c000 CR3: 00000001d4590000 CR4: 00000000001406f0

syzbot

unread,
Mar 21, 2019, 7:03:00 AM3/21/19
to ac...@kernel.org, alexander...@linux.intel.com, jo...@redhat.com, linux-...@vger.kernel.org, mi...@redhat.com, namh...@kernel.org, ol...@redhat.com, pet...@infradead.org, ravi.b...@linux.ibm.com, ros...@goodmis.org, songliu...@fb.com, syzkall...@googlegroups.com
syzbot has bisected this bug to:

commit a6ca88b241d5e929e6e60b12ad8cd288f0ffa256
Author: Song Liu <songliu...@fb.com>
Date: Tue Oct 2 05:36:36 2018 +0000

trace_uprobe: support reference counter in fd-based uprobe

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=12c86993200000
start commit: a6ca88b2 trace_uprobe: support reference counter in fd-bas..
git tree: linux-next
final crash: https://syzkaller.appspot.com/x/report.txt?x=11c86993200000
console output: https://syzkaller.appspot.com/x/log.txt?x=16c86993200000
Reported-by: syzbot+eab6e1...@syzkaller.appspotmail.com
Fixes: a6ca88b241d5 ("trace_uprobe: support reference counter in fd-based
uprobe")

Oleg Nesterov

unread,
Mar 21, 2019, 12:18:47 PM3/21/19
to syzbot, ac...@kernel.org, alexander...@linux.intel.com, jo...@redhat.com, linux-...@vger.kernel.org, mi...@redhat.com, namh...@kernel.org, pet...@infradead.org, ravi.b...@linux.ibm.com, ros...@goodmis.org, songliu...@fb.com, syzkall...@googlegroups.com
iiuc,

#syz fix: Uprobes: Fix kernel oops with delayed_uprobe_remove()

Steven Rostedt

unread,
Mar 21, 2019, 12:26:46 PM3/21/19
to Oleg Nesterov, syzbot, ac...@kernel.org, alexander...@linux.intel.com, jo...@redhat.com, linux-...@vger.kernel.org, mi...@redhat.com, namh...@kernel.org, pet...@infradead.org, ravi.b...@linux.ibm.com, songliu...@fb.com, syzkall...@googlegroups.com
On Thu, 21 Mar 2019 17:18:41 +0100
Oleg Nesterov <ol...@redhat.com> wrote:

> iiuc,
>
> #syz fix: Uprobes: Fix kernel oops with delayed_uprobe_remove()

Thanks, because I haven't been able to reproduce this, and couldn't see
how it could bug like it did by looking at the current code.

-- Steve
Reply all
Reply to author
Forward
0 new messages