syzbot


general protection fault in kvm_arch_vcpu_ioctl_run

Status: fixed on 2019/01/11 01:22
Subsystems: kvm
[Documentation on labels]
Reported-by: syzbot+39810e6c400efadfef71@syzkaller.appspotmail.com
Fix commit: dcbd3e49c2f0 KVM: X86: Fix NULL deref in vcpu_scan_ioapic
First crash: 2163d, last: 2145d
Discussions (4)
Title Replies (including bot) Last reply
[PATCH 3.16 000/305] 3.16.63-rc1 review 313 (313) 2019/06/07 15:34
[PATCH 4.19 00/46] 4.19.13-stable review 55 (55) 2018/12/29 12:20
[PATCH] KVM: X86: Fix NULL deref in vcpu_scan_ioapic 2 (2) 2018/12/18 21:03
general protection fault in kvm_arch_vcpu_ioctl_run 0 (2) 2018/12/16 02:09

Sample crash report:
audit: type=1400 audit(1544928042.399:36): avc:  denied  { map } for  pid=6165 comm="syz-executor604" path="/root/syz-executor604766160" dev="sda1" ino=16483 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1
L1TF CPU bug present and SMT on, data leak possible. See CVE-2018-3646 and https://www.kernel.org/doc/html/latest/admin-guide/l1tf.html for details.
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: 6165 Comm: syz-executor604 Not tainted 4.20.0-rc6+ #154
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:kvm_apic_hw_enabled arch/x86/kvm/lapic.h:169 [inline]
RIP: 0010:vcpu_scan_ioapic arch/x86/kvm/x86.c:7449 [inline]
RIP: 0010:vcpu_enter_guest arch/x86/kvm/x86.c:7602 [inline]
RIP: 0010:vcpu_run arch/x86/kvm/x86.c:7874 [inline]
RIP: 0010:kvm_arch_vcpu_ioctl_run+0x5296/0x7320 arch/x86/kvm/x86.c:8074
Code: 03 00 00 48 89 f8 48 c1 e8 03 42 80 3c 20 00 0f 85 b4 1e 00 00 49 8b 9f e0 03 00 00 48 8d bb 88 00 00 00 48 89 f8 48 c1 e8 03 <42> 80 3c 20 00 0f 85 8a 1e 00 00 48 8b 9b 88 00 00 00 48 8d bb d8
RSP: 0018:ffff8881ca8d7530 EFLAGS: 00010206
RAX: 0000000000000011 RBX: 0000000000000000 RCX: ffffffff8110198b
RDX: 0000000000000000 RSI: ffffffff81103a68 RDI: 0000000000000088
RBP: ffff8881ca8d78d0 R08: ffff8881c435c600 R09: 0000000000000008
R10: 0000000000000028 R11: ffffffff810feb0f R12: dffffc0000000000
R13: 0000000000000000 R14: ffffc90005e09db8 R15: ffff8881c1a40080
FS:  000000000256c880(0000) GS:ffff8881daf00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000040 CR3: 00000001cb749000 CR4: 00000000001426e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 kvm_vcpu_ioctl+0x5c8/0x1150 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2596
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:509 [inline]
 do_vfs_ioctl+0x1de/0x1790 fs/ioctl.c:696
 ksys_ioctl+0xa9/0xd0 fs/ioctl.c:713
 __do_sys_ioctl fs/ioctl.c:720 [inline]
 __se_sys_ioctl fs/ioctl.c:718 [inline]
 __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:718
 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x440859
Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 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 fb 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffe58e8a068 EFLAGS: 00000207 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440859
RDX: 0000000000000000 RSI: 000000000000ae80 RDI: 0000000000000008
RBP: 00000000006ca018 R08: 00000000004002c8 R09: 00000000004002c8
R10: 00000000004002c8 R11: 0000000000000207 R12: 00000000004020e0
R13: 0000000000402170 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace c0c6b3f3cf2c3b48 ]---
RIP: 0010:kvm_apic_hw_enabled arch/x86/kvm/lapic.h:169 [inline]
RIP: 0010:vcpu_scan_ioapic arch/x86/kvm/x86.c:7449 [inline]
RIP: 0010:vcpu_enter_guest arch/x86/kvm/x86.c:7602 [inline]
RIP: 0010:vcpu_run arch/x86/kvm/x86.c:7874 [inline]
RIP: 0010:kvm_arch_vcpu_ioctl_run+0x5296/0x7320 arch/x86/kvm/x86.c:8074
Code: 03 00 00 48 89 f8 48 c1 e8 03 42 80 3c 20 00 0f 85 b4 1e 00 00 49 8b 9f e0 03 00 00 48 8d bb 88 00 00 00 48 89 f8 48 c1 e8 03 <42> 80 3c 20 00 0f 85 8a 1e 00 00 48 8b 9b 88 00 00 00 48 8d bb d8
RSP: 0018:ffff8881ca8d7530 EFLAGS: 00010206
RAX: 0000000000000011 RBX: 0000000000000000 RCX: ffffffff8110198b
RDX: 0000000000000000 RSI: ffffffff81103a68 RDI: 0000000000000088
RBP: ffff8881ca8d78d0 R08: ffff8881c435c600 R09: 0000000000000008
R10: 0000000000000028 R11: ffffffff810feb0f R12: dffffc0000000000
R13: 0000000000000000 R14: ffffc90005e09db8 R15: ffff8881c1a40080
FS:  000000000256c880(0000) GS:ffff8881daf00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000040 CR3: 00000001cb749000 CR4: 00000000001426e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (12):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/12/16 02:43 upstream 6531e115b7ab def91db3 .config console log report syz C ci-upstream-kasan-gce-selinux-root
2018/12/16 02:43 upstream 6531e115b7ab def91db3 .config console log report syz C ci-upstream-kasan-gce-smack-root
2018/12/16 02:42 upstream 6531e115b7ab def91db3 .config console log report syz C ci-upstream-kasan-gce-root
2018/12/16 02:08 upstream 6531e115b7ab def91db3 .config console log report syz C ci-upstream-kasan-gce
2018/12/17 04:23 upstream 7566ec393f41 def91db3 .config console log report syz C ci-upstream-kasan-gce-386
2018/12/20 03:10 upstream 62393dbcbe0f 02e69052 .config console log report ci-upstream-kasan-gce
2018/12/16 01:06 upstream 6531e115b7ab def91db3 .config console log report ci-upstream-kasan-gce
2018/12/02 11:01 upstream 4b78317679c4 e0d8c853 .config console log report ci-upstream-kasan-gce-smack-root
2018/12/15 21:46 upstream 6531e115b7ab def91db3 .config console log report ci-upstream-kasan-gce-386
2018/12/15 20:57 upstream 6531e115b7ab def91db3 .config console log report ci-upstream-kasan-gce-386
2018/12/01 09:52 upstream b6839ef26e54 d8988561 .config console log report ci-upstream-kasan-gce-386
2018/12/01 10:55 linux-next 442b8cea2477 d8988561 .config console log report ci-upstream-linux-next-kasan-gce-root
* Struck through repros no longer work on HEAD.