syzbot


kernel BUG at fs/userfaultfd.c:LINE! (2)

Status: fixed on 2018/08/08 18:10
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+121be635a7a35ddb7dcb@syzkaller.appspotmail.com
Fix commit: 31e810aa1033 userfaultfd: remove uffd flags from vma->vm_flags if UFFD_EVENT_FORK fails
First crash: 2274d, last: 2255d
Discussions (4)
Title Replies (including bot) Last reply
[PATCH 4.14 00/23] 4.14.61-stable review 25 (25) 2018/08/05 11:51
[PATCH 4.17 00/31] 4.17.13-stable review 32 (32) 2018/08/05 11:50
[PATCH RESEND] userfaultfd: remove uffd flags from vma->vm_flags if UFFD_EVENT_FORK fails 1 (1) 2018/07/30 06:26
kernel BUG at fs/userfaultfd.c:LINE! (2) 2 (3) 2018/07/18 07:12
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream kernel BUG at fs/userfaultfd.c:LINE! fs C 3 2481d 2479d 4/28 fixed on 2018/02/01 10:32

Sample crash report:
random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
------------[ cut here ]------------
kernel BUG at fs/userfaultfd.c:883!
invalid opcode: 0000 [#1] SMP KASAN
CPU: 1 PID: 4534 Comm: syz-executor868 Not tainted 4.18.0-rc5+ #150
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:userfaultfd_release+0x5fb/0x770 fs/userfaultfd.c:882
Code: 00 31 c0 48 8b 4d d0 65 48 33 0c 25 28 00 00 00 0f 85 a1 00 00 00 48 8d 65 d8 5b 41 5c 41 5d 41 5e 41 5f 5d c3 e8 75 be a0 ff <0f> 0b 4c 89 f7 e8 0b 9e de ff e9 11 fc ff ff 4c 89 e7 e8 5e 9d de 
RSP: 0018:ffff8801b04ffa80 EFLAGS: 00010293
RAX: ffff8801aee9c300 RBX: dffffc0000000000 RCX: ffffffff81db4a59
RDX: 0000000000000000 RSI: ffffffff81db4ccb RDI: 0000000000000000
RBP: ffff8801b04ffbd0 R08: ffff8801aee9c300 R09: 0000000000000000
R10: ffff8801aee9cb38 R11: 16fb0df9f74494d6 R12: ffff8801afd27670
R13: 0000000000000000 R14: ffff8801afd27568 R15: 0000000000000000
FS:  00000000019fe880(0000) GS:ffff8801daf00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fab3d5ede78 CR3: 00000001afc8f000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __fput+0x355/0x8b0 fs/file_table.c:209
 ____fput+0x15/0x20 fs/file_table.c:243
 task_work_run+0x1ec/0x2a0 kernel/task_work.c:113
 tracehook_notify_resume include/linux/tracehook.h:192 [inline]
 exit_to_usermode_loop+0x313/0x370 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:0x405471
Code: 75 14 b8 03 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 54 17 00 00 c3 48 83 ec 08 e8 6a fc ff ff 48 89 04 24 b8 03 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 b3 fc ff ff 48 89 d0 48 83 c4 08 48 3d 01 
RSP: 002b:00007ffe1b734900 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000005 RCX: 0000000000405471
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000005
RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000
R10: 00007ffe1b734910 R11: 0000000000000293 R12: 00000000006dbc3c
R13: 00000000006dbda0 R14: 0000000000000008 R15: 0000000000000001
Modules linked in:
Dumping ftrace buffer:
   (ftrace buffer empty)
---[ end trace 43113bc2798a8bd8 ]---
RIP: 0010:userfaultfd_release+0x5fb/0x770 fs/userfaultfd.c:882
Code: 00 31 c0 48 8b 4d d0 65 48 33 0c 25 28 00 00 00 0f 85 a1 00 00 00 48 8d 65 d8 5b 41 5c 41 5d 41 5e 41 5f 5d c3 e8 75 be a0 ff <0f> 0b 4c 89 f7 e8 0b 9e de ff e9 11 fc ff ff 4c 89 e7 e8 5e 9d de 
RSP: 0018:ffff8801b04ffa80 EFLAGS: 00010293
RAX: ffff8801aee9c300 RBX: dffffc0000000000 RCX: ffffffff81db4a59
RDX: 0000000000000000 RSI: ffffffff81db4ccb RDI: 0000000000000000
RBP: ffff8801b04ffbd0 R08: ffff8801aee9c300 R09: 0000000000000000
R10: ffff8801aee9cb38 R11: 16fb0df9f74494d6 R12: ffff8801afd27670
R13: 0000000000000000 R14: ffff8801afd27568 R15: 0000000000000000
FS:  00000000019fe880(0000) GS:ffff8801daf00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fab3d5ede78 CR3: 00000001afc8f000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/07/17 02:34 upstream 706bf68b4339 40cb0c9a .config console log report syz C ci-upstream-kasan-gce-root
2018/07/15 18:38 upstream 37b5dca2898d 92a49505 .config console log report syz C ci-upstream-kasan-gce
2018/07/21 03:56 https://github.com/google/kmsan.git master d1c2a46a46f6 af255b09 .config console log report syz C ci-upstream-kmsan-gce
2018/07/19 01:46 linux-next 0b742fe187f7 49f35839 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2018/07/15 18:57 upstream 37b5dca2898d 92a49505 .config console log report syz ci-upstream-kasan-gce-386
2018/07/19 02:32 upstream 04a132065175 49f35839 .config console log report ci-upstream-kasan-gce-root
2018/07/15 18:17 upstream 37b5dca2898d 92a49505 .config console log report ci-upstream-kasan-gce
2018/08/03 03:34 upstream e30cb13c5a09 5b7e23bb .config console log report ci-upstream-kasan-gce-386
* Struck through repros no longer work on HEAD.