syzbot


general protection fault in kvm_hv_irq_routing_update

Status: fixed on 2021/04/09 19:46
Subsystems: kvm
[Documentation on labels]
Reported-by: syzbot+6987f3b2dbd9eda95f12@syzkaller.appspotmail.com
Fix commit: 919f4ebc5987 KVM: x86: hyper-v: Fix Hyper-V context null-ptr-deref
First crash: 1219d, last: 1209d
Cause bisection: introduced by (bisect log) :
commit 8f014550dfb114cc7f42a517d20d2cf887a0b771
Author: Vitaly Kuznetsov <vkuznets@redhat.com>
Date: Tue Jan 26 13:48:14 2021 +0000

  KVM: x86: hyper-v: Make Hyper-V emulation enablement conditional

Crash: SYZFAIL: wrong response packet (log)
Repro: C syz .config
  
Duplicate bugs (1)
duplicates (1):
Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
general protection fault in synic_get kvm 8 1209d 1215d 0/27 closed as dup on 2021/02/26 17:54
Discussions (2)
Title Replies (including bot) Last reply
[PATCH] KVM: x86: hyper-v: Fix Hyper-V context null-ptr-deref 2 (2) 2021/03/01 09:47
general protection fault in kvm_hv_irq_routing_update 1 (2) 2021/02/26 07:42

Sample crash report:
L1TF CPU bug present and SMT on, data leak possible. See CVE-2018-3646 and https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/l1tf.html for details.
general protection fault, probably for non-canonical address 0xdffffc0000000028: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000140-0x0000000000000147]
CPU: 1 PID: 8370 Comm: syz-executor859 Not tainted 5.11.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:synic_get arch/x86/kvm/hyperv.c:165 [inline]
RIP: 0010:kvm_hv_set_sint_gsi arch/x86/kvm/hyperv.c:475 [inline]
RIP: 0010:kvm_hv_irq_routing_update+0x230/0x460 arch/x86/kvm/hyperv.c:498
Code: 80 19 00 00 48 89 f8 48 c1 e8 03 80 3c 28 00 0f 85 ff 01 00 00 4d 8b ad 80 19 00 00 49 8d bd 40 01 00 00 48 89 f8 48 c1 e8 03 <0f> b6 04 28 84 c0 74 06 0f 8e d2 01 00 00 45 0f b6 bd 40 01 00 00
RSP: 0018:ffffc90001b3fac0 EFLAGS: 00010206
RAX: 0000000000000028 RBX: ffff888012df5900 RCX: 0000000000000000
RDX: ffff888022193780 RSI: ffffffff81174d43 RDI: 0000000000000140
RBP: dffffc0000000000 R08: 0000000000000000 R09: ffffc900018819eb
R10: ffffffff81170f3e R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000001
FS:  0000000000a73300(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000557e8c876888 CR3: 0000000013c0b000 CR4: 00000000001526e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 kvm_set_irq_routing+0x69b/0x940 arch/x86/kvm/../../../virt/kvm/irqchip.c:223
 kvm_vm_ioctl+0x12d0/0x2800 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3959
 vfs_ioctl fs/ioctl.c:48 [inline]
 __do_sys_ioctl fs/ioctl.c:753 [inline]
 __se_sys_ioctl fs/ioctl.c:739 [inline]
 __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:739
 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x43ef29
Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 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 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe391eb808 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000400488 RCX: 000000000043ef29
RDX: 0000000020000140 RSI: 000000004008ae6a RDI: 0000000000000004
RBP: 0000000000402f10 R08: 0000000000400488 R09: 0000000000400488
R10: 0000000000400488 R11: 0000000000000246 R12: 0000000000402fa0
R13: 0000000000000000 R14: 00000000004ac018 R15: 0000000000400488
Modules linked in:
---[ end trace 2aa75ec1dd148710 ]---
RIP: 0010:synic_get arch/x86/kvm/hyperv.c:165 [inline]
RIP: 0010:kvm_hv_set_sint_gsi arch/x86/kvm/hyperv.c:475 [inline]
RIP: 0010:kvm_hv_irq_routing_update+0x230/0x460 arch/x86/kvm/hyperv.c:498
Code: 80 19 00 00 48 89 f8 48 c1 e8 03 80 3c 28 00 0f 85 ff 01 00 00 4d 8b ad 80 19 00 00 49 8d bd 40 01 00 00 48 89 f8 48 c1 e8 03 <0f> b6 04 28 84 c0 74 06 0f 8e d2 01 00 00 45 0f b6 bd 40 01 00 00
RSP: 0018:ffffc90001b3fac0 EFLAGS: 00010206
RAX: 0000000000000028 RBX: ffff888012df5900 RCX: 0000000000000000
RDX: ffff888022193780 RSI: ffffffff81174d43 RDI: 0000000000000140
RBP: dffffc0000000000 R08: 0000000000000000 R09: ffffc900018819eb
R10: ffffffff81170f3e R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000001
FS:  0000000000a73300(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000557e8c876888 CR3: 0000000013c0b000 CR4: 00000000001526e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (33):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/02/23 09:24 upstream a99163e9e708 c26fb06b .config console log report syz C ci-upstream-kasan-gce general protection fault in kvm_hv_irq_routing_update
2021/03/04 15:44 upstream f69d02e37a85 d7e4e604 .config console log report info ci-upstream-kasan-gce-selinux-root general protection fault in kvm_hv_irq_routing_update
2021/03/04 15:34 upstream f69d02e37a85 d7e4e604 .config console log report info ci-upstream-kasan-gce-selinux-root general protection fault in kvm_hv_irq_routing_update
2021/03/04 10:16 upstream f69d02e37a85 d7e4e604 .config console log report info ci-upstream-kasan-gce general protection fault in kvm_hv_irq_routing_update
2021/03/04 01:48 upstream f69d02e37a85 06ed56cd .config console log report info ci-upstream-kasan-gce-selinux-root general protection fault in kvm_hv_irq_routing_update
2021/03/03 22:20 upstream f69d02e37a85 06ed56cd .config console log report info ci-upstream-kasan-gce-selinux-root general protection fault in kvm_hv_irq_routing_update
2021/03/03 18:44 upstream f69d02e37a85 06ed56cd .config console log report info ci-upstream-kasan-gce general protection fault in kvm_hv_irq_routing_update
2021/03/02 13:21 upstream 7a7fd0de4a98 92ead296 .config console log report info ci-upstream-kasan-gce general protection fault in kvm_hv_irq_routing_update
2021/03/02 07:03 upstream fe07bfda2fb9 183afb6c .config console log report info ci-upstream-kasan-gce general protection fault in kvm_hv_irq_routing_update
2021/03/01 16:35 upstream fe07bfda2fb9 4c37c133 .config console log report info ci-upstream-kasan-gce general protection fault in kvm_hv_irq_routing_update
2021/03/01 01:24 upstream cd278456d4ca 4c37c133 .config console log report info ci-upstream-kasan-gce general protection fault in kvm_hv_irq_routing_update
2021/02/23 05:32 upstream a99163e9e708 fcc6d71b .config console log report info ci-qemu-upstream general protection fault in kvm_hv_irq_routing_update
2021/02/22 22:20 upstream a99163e9e708 c26fb06b .config console log report info ci-upstream-kasan-gce general protection fault in kvm_hv_irq_routing_update
2021/02/22 20:42 upstream a99163e9e708 c26fb06b .config console log report info ci-qemu-upstream general protection fault in kvm_hv_irq_routing_update
2021/02/22 16:13 upstream 31caf8b2a847 c26fb06b .config console log report info ci-qemu-upstream general protection fault in kvm_hv_irq_routing_update
2021/02/22 06:54 upstream 31caf8b2a847 a659b3f1 .config console log report info ci-qemu-upstream general protection fault in kvm_hv_irq_routing_update
2021/03/04 16:52 upstream f69d02e37a85 d7e4e604 .config console log report info ci-upstream-kasan-gce-386 general protection fault in kvm_hv_irq_routing_update
2021/03/04 10:27 upstream f69d02e37a85 d7e4e604 .config console log report info ci-upstream-kasan-gce-386 general protection fault in kvm_hv_irq_routing_update
2021/03/03 21:03 upstream f69d02e37a85 06ed56cd .config console log report info ci-upstream-kasan-gce-386 general protection fault in kvm_hv_irq_routing_update
2021/03/03 21:03 upstream f69d02e37a85 06ed56cd .config console log report info ci-upstream-kasan-gce-386 general protection fault in kvm_hv_irq_routing_update
2021/03/03 19:57 upstream f69d02e37a85 06ed56cd .config console log report info ci-upstream-kasan-gce-386 general protection fault in kvm_hv_irq_routing_update
2021/03/02 15:23 upstream 7a7fd0de4a98 92ead296 .config console log report info ci-upstream-kasan-gce-386 general protection fault in kvm_hv_irq_routing_update
2021/03/02 12:51 upstream 7a7fd0de4a98 92ead296 .config console log report info ci-qemu-upstream-386 general protection fault in kvm_hv_irq_routing_update
2021/03/01 17:40 upstream fe07bfda2fb9 4c37c133 .config console log report info ci-upstream-kasan-gce-386 general protection fault in kvm_hv_irq_routing_update
2021/03/01 15:57 upstream fe07bfda2fb9 4c37c133 .config console log report info ci-qemu-upstream-386 general protection fault in kvm_hv_irq_routing_update
2021/03/01 02:14 upstream 06d5d309a3f1 4c37c133 .config console log report info ci-upstream-kasan-gce-386 general protection fault in kvm_hv_irq_routing_update
2021/02/23 04:03 upstream a99163e9e708 c26fb06b .config console log report info ci-upstream-kasan-gce-386 general protection fault in kvm_hv_irq_routing_update
2021/02/23 01:09 upstream a99163e9e708 fcc6d71b .config console log report info ci-qemu-upstream-386 general protection fault in kvm_hv_irq_routing_update
2021/02/22 22:01 upstream a99163e9e708 c26fb06b .config console log report info ci-qemu-upstream-386 general protection fault in kvm_hv_irq_routing_update
2021/02/22 13:36 upstream 31caf8b2a847 c26fb06b .config console log report info ci-qemu-upstream-386 general protection fault in kvm_hv_irq_routing_update
2021/02/22 13:34 upstream 31caf8b2a847 a659b3f1 .config console log report info ci-upstream-kasan-gce-386 general protection fault in kvm_hv_irq_routing_update
2021/02/22 11:30 upstream 31caf8b2a847 a659b3f1 .config console log report info ci-upstream-kasan-gce-386 general protection fault in kvm_hv_irq_routing_update
2021/03/02 12:55 linux-next 92f791ebd25b 92ead296 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in kvm_hv_irq_routing_update
* Struck through repros no longer work on HEAD.