syzbot


BUG: unable to handle kernel NULL pointer dereference in kvm_vm_ioctl

Status: fixed on 2020/07/17 17:58
Subsystems: kvm
[Documentation on labels]
Fix commit: 3021e69219e2 kcov: check kcov_softirq in kcov_remote_stop()
First crash: 1401d, last: 1401d

Sample crash report:
BUG: kernel NULL pointer dereference, address: 0000000000000000
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 89742067 P4D 89742067 PUD 9ee0b067 PMD 0 
Oops: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 11929 Comm: syz-executor.5 Not tainted 5.7.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__read_once_size include/linux/compiler.h:252 [inline]
RIP: 0010:__sanitizer_cov_trace_pc+0x3f/0x60 kernel/kcov.c:202
Code: c2 00 01 ff 00 74 11 f7 c2 00 01 00 00 74 35 83 b9 04 14 00 00 00 74 2c 8b 91 e0 13 00 00 83 fa 02 75 21 48 8b 91 e8 13 00 00 <48> 8b 32 48 8d 7e 01 8b 89 e4 13 00 00 48 39 cf 73 08 48 89 44 f2
RSP: 0018:ffffc90008dcfd48 EFLAGS: 00010246
RAX: ffffffff81a4ce7a RBX: ffff88805affe968 RCX: ffff88805affe540
RDX: 0000000000000000 RSI: 0000000000000008 RDI: 0000000000000286
RBP: 1ffff1100b5ffd2d R08: dffffc0000000000 R09: fffffbfff162e0a5
R10: fffffbfff162e0a5 R11: 0000000000000000 R12: dffffc0000000000
R13: 00007f1c72b3f510 R14: 000000000000000b R15: ffffffff88f3a235
FS:  00007f1c72b41700(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000008c370000 CR4: 00000000001426e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __might_fault+0xfa/0x150 mm/memory.c:4808
 _copy_from_user+0x28/0x170 lib/usercopy.c:11
 copy_from_user include/linux/uaccess.h:144 [inline]
 kvm_vm_ioctl+0x314/0x2680 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3632
 vfs_ioctl fs/ioctl.c:47 [inline]
 ksys_ioctl fs/ioctl.c:771 [inline]
 __do_sys_ioctl fs/ioctl.c:780 [inline]
 __se_sys_ioctl+0xf9/0x160 fs/ioctl.c:778
 do_syscall_64+0xf3/0x1b0 arch/x86/entry/common.c:295
 entry_SYSCALL_64_after_hwframe+0x49/0xb3
RIP: 0033:0x45c927
Code: 48 83 c4 08 48 89 d8 5b 5d c3 66 0f 1f 84 00 00 00 00 00 48 89 e8 48 f7 d8 48 39 c3 0f 92 c0 eb 92 66 90 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 0d b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f1c72b3f068 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 000000000000000f RCX: 000000000045c927
RDX: 00007f1c72b3f510 RSI: 000000004020ae46 RDI: 0000000000000004
RBP: 0000000020ff5000 R08: 00007f1c72b3f070 R09: 000000000078bf00
R10: 0000000000000005 R11: 0000000000000246 R12: 00000000fec00000
R13: 0000000000000004 R14: 00000000004ce46a R15: 00007f1c72b416d4
Modules linked in:
CR2: 0000000000000000
---[ end trace 51ea7a35d5b76d43 ]---
RIP: 0010:__read_once_size include/linux/compiler.h:252 [inline]
RIP: 0010:__sanitizer_cov_trace_pc+0x3f/0x60 kernel/kcov.c:202
Code: c2 00 01 ff 00 74 11 f7 c2 00 01 00 00 74 35 83 b9 04 14 00 00 00 74 2c 8b 91 e0 13 00 00 83 fa 02 75 21 48 8b 91 e8 13 00 00 <48> 8b 32 48 8d 7e 01 8b 89 e4 13 00 00 48 39 cf 73 08 48 89 44 f2
RSP: 0018:ffffc90008dcfd48 EFLAGS: 00010246
RAX: ffffffff81a4ce7a RBX: ffff88805affe968 RCX: ffff88805affe540
RDX: 0000000000000000 RSI: 0000000000000008 RDI: 0000000000000286
RBP: 1ffff1100b5ffd2d R08: dffffc0000000000 R09: fffffbfff162e0a5
R10: fffffbfff162e0a5 R11: 0000000000000000 R12: dffffc0000000000
R13: 00007f1c72b3f510 R14: 000000000000000b R15: ffffffff88f3a235
FS:  00007f1c72b41700(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b2eb21000 CR3: 000000008c370000 CR4: 00000000001426e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/06/17 22:41 upstream 7ae77150d94d b9f3810b .config console log report ci-upstream-kasan-gce-smack-root
* Struck through repros no longer work on HEAD.