Re: WARNING in handle_ept_misconfig

From: Dmitry Vyukov
Date: Thu Oct 26 2017 - 12:38:02 EST


On Thu, Oct 26, 2017 at 6:35 PM, syzbot
<bot+c1d9517cab094dae65e446c0c5b4de6c40f4dc58@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:
> Hello,
>
> syzkaller hit the following crash on
> 9829d9f31f6c0e4984545e03032f14ccca6eeb68
> git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/master
> compiler: gcc (GCC) 7.1.1 20170620
> .config is attached
> Raw console output is attached.
>
> syzkaller reproducer is attached. See https://goo.gl/kgGztJ
> for information about syzkaller reproducers

This also happened on more recent commits including upstream
a957fd420ca8774f1a6708c64a867f056e67c46e and
8a5776a5f49812d29fe4b2d0a2d71675c3facf3f.


> WARNING: CPU: 0 PID: 4003 at arch/x86/kvm/vmx.c:6526
> handle_ept_misconfig+0x140/0x520 arch/x86/kvm/vmx.c:6526
> Kernel panic - not syncing: panic_on_warn set ...
>
> CPU: 0 PID: 4003 Comm: syz-executor1 Not tainted 4.13.0-next-20170904+ #14
> Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
> Call Trace:
> __dump_stack lib/dump_stack.c:16 [inline]
> dump_stack+0x194/0x257 lib/dump_stack.c:52
> panic+0x1e4/0x417 kernel/panic.c:181
> __warn+0x1c4/0x1d9 kernel/panic.c:542
> report_bug+0x211/0x2d0 lib/bug.c:183
> fixup_bug+0x40/0x90 arch/x86/kernel/traps.c:178
> do_trap_no_signal arch/x86/kernel/traps.c:212 [inline]
> do_trap+0x260/0x390 arch/x86/kernel/traps.c:261
> do_error_trap+0x120/0x390 arch/x86/kernel/traps.c:298
> do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:311
> invalid_op+0x18/0x20 arch/x86/entry/entry_64.S:905
> RIP: 0010:handle_ept_misconfig+0x140/0x520 arch/x86/kvm/vmx.c:6526
> RSP: 0018:ffff88006d2df470 EFLAGS: 00010297
> RAX: ffff88006d1d0540 RBX: 1ffff1000da5be90 RCX: 0000000000000000
> RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffed000da5be78
> RBP: ffff88006d2df548 R08: 0000000000000007 R09: ffff88006d2df2f0
> R10: ffff88006d1d0540 R11: 0000000000000002 R12: ffff88003aec06c0
> R13: 00000000fffffff2 R14: ffff88006d2df520 R15: dffffc0000000000
> vmx_handle_exit+0x24b/0x1a60 arch/x86/kvm/vmx.c:8823
> vcpu_enter_guest arch/x86/kvm/x86.c:7038 [inline]
> vcpu_run arch/x86/kvm/x86.c:7100 [inline]
> kvm_arch_vcpu_ioctl_run+0x1d36/0x5a30 arch/x86/kvm/x86.c:7261
> kvm_vcpu_ioctl+0x64c/0x1010 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2550
> vfs_ioctl fs/ioctl.c:45 [inline]
> do_vfs_ioctl+0x1b1/0x1530 fs/ioctl.c:685
> SYSC_ioctl fs/ioctl.c:700 [inline]
> SyS_ioctl+0x8f/0xc0 fs/ioctl.c:691
> entry_SYSCALL_64_fastpath+0x1f/0xbe
> RIP: 0033:0x447299
> RSP: 002b:00007fddb74bdc08 EFLAGS: 00000296 ORIG_RAX: 0000000000000010
> RAX: ffffffffffffffda RBX: 000000000000000b RCX: 0000000000447299
> RDX: 0000000000000000 RSI: 000000000000ae80 RDI: 000000000000000b
> RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000
> R10: 0000000000000000 R11: 0000000000000296 R12: 000000000000000c
> R13: 0000000000005790 R14: 00000000006e8850 R15: 000000000000000b
> Dumping ftrace buffer:
> (ftrace buffer empty)
> Kernel Offset: disabled
> Rebooting in 86400 seconds..
>
>
> ---
> This bug is generated by a dumb bot. It may contain errors.
> See https://goo.gl/tpsmEJ for details.
> Direct all questions to syzkaller@xxxxxxxxxxxxxxxxx
>
> syzbot will keep track of this bug report.
> Once a fix for this bug is committed, please reply to this email with:
> #syz fix: exact-commit-title
> To mark this as a duplicate of another syzbot report, please reply with:
> #syz dup: exact-subject-of-another-report
> If it's a one-off invalid bug report, please reply with:
> #syz invalid
> Note: if the crash happens again, it will cause creation of a new bug
> report.
>
> --
> You received this message because you are subscribed to the Google Groups
> "syzkaller-bugs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to syzkaller-bugs+unsubscribe@xxxxxxxxxxxxxxxxx
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/syzkaller-bugs/001a11440f66112544055c75c246%40google.com.
> For more options, visit https://groups.google.com/d/optout.