Re: kernel BUG at arch/x86/kvm/x86.c:LINE!

From: Wanpeng Li
Date: Fri Oct 27 2017 - 04:48:29 EST


Hi Dmitry,
2017-10-27 16:34 GMT+08:00 Dmitry Vyukov <dvyukov@xxxxxxxxxx>:
> On Fri, Oct 27, 2017 at 10:34 AM, syzbot
> <bot+4facc37258a582d017ddb43934d4419891f41919@xxxxxxxxxxxxxxxxxxxxxxxxx>
> wrote:
>> Hello,
>>
>> syzkaller hit the following crash on
>> bb70832dd42b298d4303fd054bf18a78650ff04a
>> 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
>

Coud you post a c program?

Regards,
Wanpeng Li

> Last happened on upstream 4ed590271a65b0fbe3eb1cf828ad5af16603c8ce (Oct 26).
>
> device syz5 entered promiscuous mode
> ------------[ cut here ]------------
> kernel BUG at arch/x86/kvm/x86.c:7182!
> invalid opcode: 0000 [#1] SMP KASAN
> Dumping ftrace buffer:
> (ftrace buffer empty)
> Modules linked in:
> CPU: 0 PID: 5788 Comm: syz-executor3 Not tainted 4.14.0-rc6+ #148
> Hardware name: Google Google Compute Engine/Google Compute Engine,
> BIOS Google 01/01/2011
> task: ffff8801cdc002c0 task.stack: ffff8801974d8000
> RIP: 0010:complete_emulated_mmio+0x5c2/0x6f0 arch/x86/kvm/x86.c:7182
> RSP: 0000:ffff8801974df620 EFLAGS: 00010216
> RAX: 0000000000010000 RBX: ffff8801d2948ac0 RCX: ffffc9000204f000
> RDX: 000000000000009b RSI: ffffffff810d5db2 RDI: ffff8801d2948ce0
> RBP: ffff8801974df660 R08: 0000000000000000 R09: ffffed0032e9bf2c
> R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff810d57f0
> R13: ffff8801d87fc000 R14: ffff8801d073d780 R15: ffff8801d2948ac0
> FS: 00007fb474244700(0000) GS:ffff8801db200000(0000) knlGS:0000000000000000
> CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 000000c438c9b000 CR3: 00000001dad6b000 CR4: 00000000001426f0
> DR0: 0000000020000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600
> Call Trace:
> kvm_arch_vcpu_ioctl_run+0x2e07/0x5c70 arch/x86/kvm/x86.c:7261
> kvm_vcpu_ioctl+0x64c/0x1010 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2551
> vfs_ioctl fs/ioctl.c:45 [inline]
> do_vfs_ioctl+0x1b1/0x1520 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:0x452869
> RSP: 002b:00007fb474243be8 EFLAGS: 00000212 ORIG_RAX: 0000000000000010
> RAX: ffffffffffffffda RBX: 0000000000758190 RCX: 0000000000452869
> RDX: 0000000000000000 RSI: 000000000000ae80 RDI: 0000000000000015
> RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000
> R10: 0000000000000000 R11: 0000000000000212 R12: 0000000000000000
> R13: 0000000000a6f7ff R14: 00007fb4742449c0 R15: 0000000000000002
> Code: 01 00 00 00 48 89 df e8 ad 9c 47 00 44 89 e6 4c 89 f7 45 31 e4
> e8 2f 42 4d 00 45 85 ed 41 0f 94 c4 e9 5f fc ff ff e8 8e 63 60 00 <0f>
> 0b e8 07 29 95 00 e9 9c fa ff ff 89 45 c8 e8 fa 28 95 00 8b
> RIP: complete_emulated_mmio+0x5c2/0x6f0 arch/x86/kvm/x86.c:7182 RSP:
> ffff8801974df620
> ---[ end trace f3b46bcb7f943cb5 ]---
> Kernel panic - not syncing: Fatal exception
> Dumping ftrace buffer:
> (ftrace buffer empty)
> Kernel Offset: disabled
>
>
>
>> kernel BUG at arch/x86/kvm/x86.c:7150!
>> invalid opcode: 0000 [#1] SMP KASAN
>> Dumping ftrace buffer:
>> (ftrace buffer empty)
>> Modules linked in:
>> CPU: 3 PID: 3029 Comm: syz-executor0 Not tainted 4.13.0-rc5-next-20170817+
>> #5
>> Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
>> task: ffff88006c488700 task.stack: ffff880067800000
>> RIP: 0010:complete_emulated_mmio+0x5be/0x6f0 arch/x86/kvm/x86.c:7150
>> RSP: 0018:ffff880067807620 EFLAGS: 00010297
>> RAX: ffff88006c488700 RBX: ffff880039428040 RCX: ffff88003942845c
>> RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff880039428260
>> RBP: ffff880067807660 R08: 0000000000000000 R09: ffffed000cf00f2c
>> R10: ffff880067807a58 R11: ffff8800678079d0 R12: ffffffff810d0840
>> R13: ffff880039c71000 R14: ffff88006da89f00 R15: ffff880039428040
>> FS: 00007f8311e83700(0000) GS:ffff88006df00000(0000) knlGS:0000000000000000
>> CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
>> CR2: 00007f04f6102000 CR3: 000000003d5de000 CR4: 00000000000026e0
>> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
>> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
>> Call Trace:
>> kvm_arch_vcpu_ioctl_run+0x2e2b/0x58b0 arch/x86/kvm/x86.c:7220
>> kvm_vcpu_ioctl+0x64c/0x1010 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2591
>> vfs_ioctl fs/ioctl.c:45 [inline]
>> do_vfs_ioctl+0x1b1/0x1520 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:0x446749
>> RSP: 002b:00007f8311e82c08 EFLAGS: 00000282 ORIG_RAX: 0000000000000010
>> RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 0000000000446749
>> RDX: 0000000000000000 RSI: 000000000000ae80 RDI: 0000000000000005
>> RBP: 0000000000a5f870 R08: 0000000000000000 R09: 0000000000000000
>> R10: 0000000000000000 R11: 0000000000000282 R12: 0000000000000000
>> R13: 0000000000000000 R14: 00007f8311e839c0 R15: 00007f8311e83700
>> Code: 01 00 00 00 48 89 df e8 51 9e 47 00 44 89 e6 4c 89 f7 45 31 e4 e8 93
>> 25 4d 00 45 85 ed 41 0f 94 c4 e9 c5 fc ff ff e8 f2 2e 60 00 <0f> 0b e8 1b 99
>> 94 00 e9 a0 fa ff ff 89 45 c8 e8 0e 99 94 00 8b
>> RIP: complete_emulated_mmio+0x5be/0x6f0 arch/x86/kvm/x86.c:7150 RSP:
>> ffff880067807620
>> ---[ end trace f2b488a12d890bf5 ]---
>> Kernel panic - not syncing: Fatal exception
>> 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/001a114ac88a984913055c832605%40google.com.
>> For more options, visit https://groups.google.com/d/optout.