syzbot


BUG: unable to handle kernel paging request in coalesced_mmio_write

Status: fixed on 2019/12/01 20:17
Reported-by: syzbot+1c89747767c158362294@syzkaller.appspotmail.com
Fix commit: bf81752d808c KVM: coalesced_mmio: add bounds checking
First crash: 1770d, last: 1763d
Fix bisection: fixed by (bisect log) :
commit bf81752d808cd31e18d9a8db6d92b73497aa48d2
Author: Matt Delco <delco@chromium.org>
Date: Mon Sep 16 21:16:54 2019 +0000

  KVM: coalesced_mmio: add bounds checking

  
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream BUG: unable to handle kernel paging request in coalesced_mmio_write kvm C done 10 1762d 1767d 13/26 fixed on 2019/10/15 23:40
linux-4.19 BUG: unable to handle kernel paging request in coalesced_mmio_write C done 2 1770d 1770d 1/1 fixed on 2019/12/01 09:13

Sample crash report:
audit: type=1400 audit(1561797773.176:36): avc:  denied  { map } for  pid=7100 comm="syz-executor368" path="/root/syz-executor368072724" 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/hw-vuln/l1tf.html for details.
BUG: unable to handle kernel paging request at ffffed12fa26561f
IP: coalesced_mmio_write+0x240/0x440 arch/x86/kvm/../../../virt/kvm/coalesced_mmio.c:83
PGD 21ffef067 P4D 21ffef067 PUD 0 
Oops: 0000 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 0 PID: 7100 Comm: syz-executor368 Not tainted 4.14.131 #25
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
task: ffff888077c3a540 task.stack: ffff888085d90000
RIP: 0010:coalesced_mmio_write+0x240/0x440 arch/x86/kvm/../../../virt/kvm/coalesced_mmio.c:83
RSP: 0018:ffff888085d97428 EFLAGS: 00010a02
RAX: 00000000f7d5760a RBX: 0000000000000000 RCX: ffff8880952fa000
RDX: dffffc0000000000 RSI: 1ffff112fa26561f RDI: ffff8897d132b0f8
RBP: ffff888085d97478 R08: 0000000000000007 R09: 0000000000000000
R10: 0000000000000002 R11: ffff888077c3a540 R12: ffff88807a0e1a10
R13: 0000000000000001 R14: ffff8880a55b39a0 R15: 0000000000000001
FS:  0000000001268940(0000) GS:ffff8880aee00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffed12fa26561f CR3: 0000000095996000 CR4: 00000000001426f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 kvm_iodevice_write include/kvm/iodev.h:66 [inline]
 __kvm_io_bus_write+0x241/0x340 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3485
 kvm_io_bus_write+0x115/0x200 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3510
 vcpu_mmio_write arch/x86/kvm/x86.c:4486 [inline]
 write_mmio+0x148/0x480 arch/x86/kvm/x86.c:4824
 emulator_read_write_onepage+0x36a/0xbb0 arch/x86/kvm/x86.c:4893
 emulator_read_write+0x174/0x540 arch/x86/kvm/x86.c:4942
 emulator_write_emulated+0x3c/0x50 arch/x86/kvm/x86.c:4979
 segmented_write+0xd3/0x120 arch/x86/kvm/emulate.c:1459
 writeback+0x425/0x760 arch/x86/kvm/emulate.c:1821
 x86_emulate_insn+0x15f2/0x4120 arch/x86/kvm/emulate.c:5616
 x86_emulate_instruction+0x423/0x1700 arch/x86/kvm/x86.c:5917
 kvm_mmu_page_fault+0x1c5/0x300 arch/x86/kvm/mmu.c:4998
 handle_ept_violation+0x149/0x420 arch/x86/kvm/vmx.c:6930
 vmx_handle_exit+0x20d/0x12a0 arch/x86/kvm/vmx.c:9194
 vcpu_enter_guest+0xec8/0x5220 arch/x86/kvm/x86.c:7239
 vcpu_run arch/x86/kvm/x86.c:7302 [inline]
 kvm_arch_vcpu_ioctl_run+0x318/0x1000 arch/x86/kvm/x86.c:7469
 kvm_vcpu_ioctl+0x401/0xd10 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2588
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:500 [inline]
 do_vfs_ioctl+0x7ae/0x1060 fs/ioctl.c:684
 SYSC_ioctl fs/ioctl.c:701 [inline]
 SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692
 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x4444e9
RSP: 002b:00007ffefa023a78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007ffefa023a80 RCX: 00000000004444e9
RDX: 0000000000000000 RSI: 000000000000ae80 RDI: 0000000000000005
RBP: 0000000000000000 R08: 0000000000402240 R09: 0000000000402240
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000405590
R13: 0000000000405620 R14: 0000000000000000 R15: 0000000000000000
Code: c0 03 38 d0 7c 08 84 d2 0f 85 00 02 00 00 8b 41 04 48 8d 14 40 48 8d 7c d1 08 48 ba 00 00 00 00 00 fc ff df 48 89 fe 48 c1 ee 03 <80> 3c 16 00 0f 85 bf 01 00 00 48 8d 14 40 48 be 00 00 00 00 00 
RIP: coalesced_mmio_write+0x240/0x440 arch/x86/kvm/../../../virt/kvm/coalesced_mmio.c:83 RSP: ffff888085d97428
CR2: ffffed12fa26561f
---[ end trace b246c70338280a38 ]---

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/06/29 08:46 linux-4.14.y f4cc0ed9b2c7 7509bf36 .config console log report syz C ci2-linux-4-14
2019/06/29 08:21 linux-4.14.y f4cc0ed9b2c7 7509bf36 .config console log report syz C ci2-linux-4-14
2019/06/22 20:08 linux-4.14.y a5758c531177 34bf9440 .config console log report syz C ci2-linux-4-14
2019/06/22 19:30 linux-4.14.y a5758c531177 34bf9440 .config console log report ci2-linux-4-14
* Struck through repros no longer work on HEAD.