syzbot


general protection fault in __x86_indirect_thunk_rbx

Status: fixed on 2019/03/21 17:09
Reported-by: syzbot+83e12cf81d2c14842146@syzkaller.appspotmail.com
Fix commit: d6367d624137 fs/locks: use properly initialized file_lock when unlocking.
First crash: 1992d, last: 1992d
Cause bisection: introduced by (bisect log) :
commit dee160df820de41ff2f59a715643680822a0ab06
Author: NeilBrown <neilb@suse.com>
Date: Mon Nov 5 01:30:47 2018 +0000

  locks: use properly initialized file_lock when unlocking.

Crash: general protection fault in locks_remove_flock (log)
Repro: C syz .config
  
Discussions (1)
Title Replies (including bot) Last reply
general protection fault in __x86_indirect_thunk_rbx 2 (5) 2019/03/21 06:16

Sample crash report:
sshd (5641) used greatest stack depth: 15744 bytes left
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: 5655 Comm: syz-executor158 Not tainted 4.20.0-rc1-next-20181107+ #107
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__x86_indirect_thunk_rbx+0x10/0x20 arch/x86/lib/retpoline.S:33
Code: 90 0f ae e8 eb f9 48 89 04 24 c3 0f 1f 44 00 00 66 2e 0f 1f 84 00 00 00 00 00 e8 07 00 00 00 f3 90 0f ae e8 eb f9 48 89 1c 24 <c3> 0f 1f 44 00 00 66 2e 0f 1f 84 00 00 00 00 00 e8 07 00 00 00 f3
RSP: 0018:ffff8801d5b9f2b0 EFLAGS: 00010293
RAX: ffff8801ba204240 RBX: 894cdffffc000000 RCX: ffffffff81ed555d
RDX: 0000000000000000 RSI: ffffffff81ed5c9e RDI: ffff8801d5b9f338
RBP: ffff8801d5b9f4a0 R08: ffff8801ba204240 R09: ffffed003b5e5b67
R10: ffffed003b5e5b67 R11: ffff8801daf2db3b R12: ffff8801ba0be800
R13: ffff8801d5b9f338 R14: 1ffff1003ab73e5b R15: dffffc0000000000
FS:  000000000181d880(0000) GS:ffff8801daf00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000040 CR3: 000000000946a000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 locks_remove_file+0x148/0x5c0 fs/locks.c:2607
 __fput+0x2f0/0xa70 fs/file_table.c:271
 ____fput+0x15/0x20 fs/file_table.c:312
 task_work_run+0x1e8/0x2a0 kernel/task_work.c:113
 exit_task_work include/linux/task_work.h:22 [inline]
 do_exit+0x1ad1/0x26d0 kernel/exit.c:867
 do_group_exit+0x177/0x440 kernel/exit.c:970
 __do_sys_exit_group kernel/exit.c:981 [inline]
 __se_sys_exit_group kernel/exit.c:979 [inline]
 __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:979
 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x43efe8
Code: Bad RIP value.
RSP: 002b:00007ffdcfd19218 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000043efe8
RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000
RBP: 00000000004be8a8 R08: 00000000000000e7 R09: ffffffffffffffd0
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00000000006d0180 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace 96397ecf10c169a4 ]---
RIP: 0010:__x86_indirect_thunk_rbx+0x10/0x20 arch/x86/lib/retpoline.S:33
Code: 90 0f ae e8 eb f9 48 89 04 24 c3 0f 1f 44 00 00 66 2e 0f 1f 84 00 00 00 00 00 e8 07 00 00 00 f3 90 0f ae e8 eb f9 48 89 1c 24 <c3> 0f 1f 44 00 00 66 2e 0f 1f 84 00 00 00 00 00 e8 07 00 00 00 f3
RSP: 0018:ffff8801d5b9f2b0 EFLAGS: 00010293
RAX: ffff8801ba204240 RBX: 894cdffffc000000 RCX: ffffffff81ed555d
RDX: 0000000000000000 RSI: ffffffff81ed5c9e RDI: ffff8801d5b9f338
RBP: ffff8801d5b9f4a0 R08: ffff8801ba204240 R09: ffffed003b5e5b67
R10: ffffed003b5e5b67 R11: ffff8801daf2db3b R12: ffff8801ba0be800
R13: ffff8801d5b9f338 R14: 1ffff1003ab73e5b R15: dffffc0000000000
FS:  000000000181d880(0000) GS:ffff8801daf00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000043efbe CR3: 000000000946a000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (16):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/11/07 23:20 linux-next d881de30d29e e85d2a61 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2018/11/07 21:18 linux-next d881de30d29e e85d2a61 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2018/11/07 14:02 linux-next d881de30d29e 8bd6bd63 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2018/11/07 12:39 linux-next d881de30d29e 8bd6bd63 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2018/11/07 11:43 linux-next d881de30d29e 8bd6bd63 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2018/11/07 10:33 linux-next d881de30d29e 8bd6bd63 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2018/11/07 09:55 linux-next d881de30d29e 8bd6bd63 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2018/11/07 09:08 linux-next d881de30d29e 8bd6bd63 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2018/11/07 07:47 linux-next d881de30d29e 8bd6bd63 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2018/11/07 07:46 linux-next d881de30d29e 8bd6bd63 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2018/11/08 02:22 linux-next d881de30d29e e85d2a61 .config console log report ci-upstream-linux-next-kasan-gce-root
2018/11/07 21:49 linux-next d881de30d29e e85d2a61 .config console log report ci-upstream-linux-next-kasan-gce-root
2018/11/07 18:57 linux-next d881de30d29e e85d2a61 .config console log report ci-upstream-linux-next-kasan-gce-root
2018/11/07 18:09 linux-next d881de30d29e e85d2a61 .config console log report ci-upstream-linux-next-kasan-gce-root
2018/11/07 06:35 linux-next d881de30d29e 8bd6bd63 .config console log report ci-upstream-linux-next-kasan-gce-root
2018/11/07 03:21 linux-next d881de30d29e 8bd6bd63 .config console log report ci-upstream-linux-next-kasan-gce-root
* Struck through repros no longer work on HEAD.