Re: BUG: unable to handle kernel paging request in copy_user_handle_tail

From: Dmitry Vyukov
Date: Tue Dec 19 2017 - 07:17:05 EST


On Sun, Dec 3, 2017 at 3:23 PM, syzbot
<bot+3eb502e4ffc8d10e954c93b17c5898e460af8908@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:
> Hello,
>
> syzkaller hit the following crash on
> d127129e85a020879f334154300ddd3f7ec21c1e
> 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.
>
> Unfortunately, I don't have any reproducer for this bug yet.
>
>
> netlink: 1 bytes leftover after parsing attributes in process
> `syz-executor0'.
> BUG: unable to handle kernel paging request at fffffffffffffff8
> IP: copy_user_handle_tail+0x31/0x80 arch/x86/lib/usercopy_64.c:69
> PGD 5e28067 P4D 5e28067 PUD 5e2a067 PMD 0
> Oops: 0002 [#1] SMP KASAN
> Dumping ftrace buffer:
> (ftrace buffer empty)
> Modules linked in:
> CPU: 0 PID: 13534 Comm: syz-executor7 Not tainted 4.15.0-rc1-next-20171129+
> #55
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
> Google 01/01/2011
> task: ffff8801c34260c0 task.stack: ffff8801c24f0000
> RIP: 0010:copy_user_handle_tail+0x31/0x80 arch/x86/lib/usercopy_64.c:69
> RSP: 0018:ffff8801c24f6f80 EFLAGS: 00010246
> RAX: 0000000000010000 RBX: 0000000000000000 RCX: ffffffff851551f5
> RDX: 0000000000001452 RSI: ffffc900031fa000 RDI: ffff8801d92e3cc0
> RBP: ffff8801c24f6fa8 R08: 003000000000ff07 R09: 0000000000001b4e
> R10: 0000000000000002 R11: ffffed003b25c799 R12: 000000000000000f
> R13: ffff8801d92e3cc0 R14: 0000000020000001 R15: 0000000020000007
> FS: 00007fa423a37700(0000) GS:ffff8801db400000(0000) knlGS:0000000000000000
> CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: fffffffffffffff8 CR3: 00000001c2c9d000 CR4: 00000000001426f0
> DR0: 0000000020000000 DR1: 0000000020000000 DR2: 0000000020000000
> DR3: 0000000020000000 DR6: 00000000ffff0ff1 DR7: 00000000000b0602
> Call Trace:
> copy_user_generic arch/x86/include/asm/uaccess_64.h:37 [inline]
> raw_copy_from_user arch/x86/include/asm/uaccess_64.h:55 [inline]
> __copy_from_user include/linux/uaccess.h:75 [inline]
> __kvm_read_guest_page+0x81/0xa0
> arch/x86/kvm/../../../virt/kvm/kvm_main.c:1730
> kvm_vcpu_read_guest_page+0x44/0x60
> arch/x86/kvm/../../../virt/kvm/kvm_main.c:1750
> kvm_fetch_guest_virt+0x10e/0x180 arch/x86/kvm/x86.c:4506
> __do_insn_fetch_bytes+0x5e9/0x8a0 arch/x86/kvm/emulate.c:881
> x86_decode_insn+0x13d5/0x4990 arch/x86/kvm/emulate.c:5035
> x86_emulate_instruction+0x5e2/0x1ad0 arch/x86/kvm/x86.c:5732
> kvm_mmu_page_fault+0x1d3/0x2f0 arch/x86/kvm/mmu.c:4953
> handle_ept_violation+0x198/0x550 arch/x86/kvm/vmx.c:6544
> vmx_handle_exit+0x25d/0x1ce0 arch/x86/kvm/vmx.c:8893
> vcpu_enter_guest arch/x86/kvm/x86.c:7084 [inline]
> vcpu_run arch/x86/kvm/x86.c:7146 [inline]
> kvm_arch_vcpu_ioctl_run+0x1cb4/0x5c60 arch/x86/kvm/x86.c:7314
> kvm_vcpu_ioctl+0x64c/0x1010 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2574
> vfs_ioctl fs/ioctl.c:46 [inline]
> do_vfs_ioctl+0x1b1/0x1530 fs/ioctl.c:686
> SYSC_ioctl fs/ioctl.c:701 [inline]
> SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692
> entry_SYSCALL_64_fastpath+0x1f/0x96
> RIP: 0033:0x4529d9
> RSP: 002b:00007fa423a36c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000010
> RAX: ffffffffffffffda RBX: 0000000000758020 RCX: 00000000004529d9
> RDX: 0000000000000000 RSI: 000000000000ae80 RDI: 000000000000001a
> RBP: 00000000000003a7 R08: 0000000000000000 R09: 0000000000000000
> R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006f2848
> R13: 00000000ffffffff R14: 00007fa423a376d4 R15: 0000000000000000
> Code: 41 56 41 55 41 54 41 89 d4 53 49 89 fd 49 89 f7 e8 25 e9 5a fc 45 85
> e4 74 3d e8 1b e9 5a fc 0f 1f 00 31 db 4d 8d 77 01 45 8a 3f <0f> 1f 00 85 db
> 75 2a e8 03 e9 5a fc 0f 1f 00 45 88 7d 00 0f 1f
> RIP: copy_user_handle_tail+0x31/0x80 arch/x86/lib/usercopy_64.c:69 RSP:
> ffff8801c24f6f80
> CR2: fffffffffffffff8
> ---[ end trace e547a071dbca0159 ]---

#syz dup: BUG: unable to handle kernel paging request in __switch_to

> ---
> 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
> Please credit me with: Reported-by: syzbot <syzkaller@xxxxxxxxxxxxxxxx>
>
> 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.
> Note: all commands must start from beginning of the line in the email body.
>
> --
> 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/089e082676ece5fb6b055f7056c1%40google.com.
> For more options, visit https://groups.google.com/d/optout.