syzbot


BUG: unable to handle kernel paging request in coalesced_mmio_write

Status: fixed on 2019/12/01 09:13
Reported-by: syzbot+fa7e2587dff5bb4b1be2@syzkaller.appspotmail.com
Fix commit: 232a6462f43f KVM: coalesced_mmio: add bounds checking
First crash: 1761d, last: 1761d
Fix bisection: fixed by (bisect log) :
commit 232a6462f43fceeac82bd99ef092b38e3a7ee296
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 1754d 1758d 13/26 fixed on 2019/10/15 23:40
linux-4.14 BUG: unable to handle kernel paging request in coalesced_mmio_write C done 4 1755d 1761d 1/1 fixed on 2019/12/01 20:17

Sample crash report:
audit: type=1400 audit(1561243920.909:36): avc:  denied  { map } for  pid=7773 comm="syz-executor831" path="/root/syz-executor831863447" dev="sda1" ino=16484 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 ffffed12f8ff841f
PGD 21fff0067 P4D 21fff0067 PUD 0 
Oops: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 7773 Comm: syz-executor831 Not tainted 4.19.55 #27
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:coalesced_mmio_write+0x288/0x440 arch/x86/kvm/../../../virt/kvm/coalesced_mmio.c:83
Code: 38 d0 7c 08 84 d2 0f 85 cc 01 00 00 41 8b 47 04 48 8d 14 40 49 8d 7c d7 08 48 ba 00 00 00 00 00 fc ff df 48 89 f9 48 c1 e9 03 <80> 3c 11 00 0f 85 92 01 00 00 48 8d 14 40 48 b9 00 00 00 00 00 fc
RSP: 0018:ffff88809409f130 EFLAGS: 00010a02
RAX: 00000000f7d5760a RBX: 0000000000000000 RCX: 1ffff112f8ff841f
RDX: dffffc0000000000 RSI: ffffffff8107bf9c RDI: ffff8897c7fc20f8
RBP: ffff88809409f180 R08: ffff88808dbe6080 R09: fffff52000bc74d9
R10: fffff52000bc74d8 R11: ffffc90005e3a6c3 R12: 0000000000000001
R13: ffff8880743bcc90 R14: 0000000000000001 R15: ffff88808bf91000
FS:  0000000001018940(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffed12f8ff841f CR3: 00000000941a4000 CR4: 00000000001426e0
Call Trace:
 kvm_iodevice_write include/kvm/iodev.h:66 [inline]
 __kvm_io_bus_write+0x29b/0x380 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3471
 kvm_io_bus_write+0x15c/0x290 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3496
 vcpu_mmio_write arch/x86/kvm/x86.c:4779 [inline]
 write_mmio+0x175/0x4e0 arch/x86/kvm/x86.c:5141
 emulator_read_write_onepage+0x429/0xd50 arch/x86/kvm/x86.c:5210
 emulator_read_write+0x1b7/0x5a0 arch/x86/kvm/x86.c:5259
 emulator_write_emulated+0x3c/0x50 arch/x86/kvm/x86.c:5296
 segmented_write+0xf0/0x150 arch/x86/kvm/emulate.c:1446
 writeback arch/x86/kvm/emulate.c:1808 [inline]
 writeback+0x3f4/0x6a0 arch/x86/kvm/emulate.c:1794
 x86_emulate_insn+0x1de1/0x48f0 arch/x86/kvm/emulate.c:5674
 x86_emulate_instruction+0xc84/0x1c20 arch/x86/kvm/x86.c:6271
 kvm_mmu_page_fault+0x326/0x1650 arch/x86/kvm/mmu.c:5287
 handle_ept_violation+0x1c9/0x500 arch/x86/kvm/vmx.c:7690
 vmx_handle_exit+0x276/0x1650 arch/x86/kvm/vmx.c:10165
 vcpu_enter_guest+0x1244/0x6130 arch/x86/kvm/x86.c:7735
 vcpu_run arch/x86/kvm/x86.c:7798 [inline]
 kvm_arch_vcpu_ioctl_run+0x417/0x16c0 arch/x86/kvm/x86.c:7998
 kvm_vcpu_ioctl+0x4dc/0xf90 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2594
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:501 [inline]
 do_vfs_ioctl+0xd5f/0x1380 fs/ioctl.c:688
 ksys_ioctl+0xab/0xd0 fs/ioctl.c:705
 __do_sys_ioctl fs/ioctl.c:712 [inline]
 __se_sys_ioctl fs/ioctl.c:710 [inline]
 __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:710
 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x4444e9
Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 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 0f 83 1b 0c fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffe0192daa8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007ffe0192dab0 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
Modules linked in:
CR2: ffffed12f8ff841f
---[ end trace 6711d194e7d5b8b4 ]---
RIP: 0010:coalesced_mmio_write+0x288/0x440 arch/x86/kvm/../../../virt/kvm/coalesced_mmio.c:83
Code: 38 d0 7c 08 84 d2 0f 85 cc 01 00 00 41 8b 47 04 48 8d 14 40 49 8d 7c d7 08 48 ba 00 00 00 00 00 fc ff df 48 89 f9 48 c1 e9 03 <80> 3c 11 00 0f 85 92 01 00 00 48 8d 14 40 48 b9 00 00 00 00 00 fc
RSP: 0018:ffff88809409f130 EFLAGS: 00010a02
RAX: 00000000f7d5760a RBX: 0000000000000000 RCX: 1ffff112f8ff841f
RDX: dffffc0000000000 RSI: ffffffff8107bf9c RDI: ffff8897c7fc20f8
RBP: ffff88809409f180 R08: ffff88808dbe6080 R09: fffff52000bc74d9
R10: fffff52000bc74d8 R11: ffffc90005e3a6c3 R12: 0000000000000001
R13: ffff8880743bcc90 R14: 0000000000000001 R15: ffff88808bf91000
FS:  0000000001018940(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffed12f8ff841f CR3: 00000000941a4000 CR4: 00000000001426e0

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/06/22 22:56 linux-4.19.y 78778071092e 34bf9440 .config console log report syz C ci2-linux-4-19
2019/06/22 22:27 linux-4.19.y 78778071092e 34bf9440 .config console log report syz C ci2-linux-4-19
* Struck through repros no longer work on HEAD.