syzbot


BUG: unable to handle kernel paging request in coalesced_mmio_write

Status: fixed on 2019/10/15 23:40
Subsystems: kvm
[Documentation on labels]
Reported-by: syzbot+983c866c3dd6efa3662a@syzkaller.appspotmail.com
Fix commit: b60fe990c6b0 KVM: coalesced_mmio: add bounds checking
First crash: 1767d, last: 1759d
Cause bisection: the issue happens on the oldest tested release (bisect log)
Crash: no output from test machine (log)
Repro: C syz .config
  
Discussions (11)
Title Replies (including bot) Last reply
[PATCH 3.16 000/132] 3.16.74-rc1 review 141 (141) 2019/11/19 20:40
[PATCH 1/3] KVM: Fix coalesced mmio ring buffer out-of-bounds access 10 (10) 2019/09/24 13:55
[PATCH 4.19 00/79] 4.19.75-stable review 92 (92) 2019/09/23 01:33
[PATCH 5.3 00/21] 5.3.1-stable review 31 (31) 2019/09/22 08:13
[PATCH 5.2 000/124] 5.2.17-stable review 132 (132) 2019/09/21 05:05
[PATCH 4.4 00/56] 4.4.194-stable review 62 (62) 2019/09/20 21:38
[PATCH 4.9 00/74] 4.9.194-stable review 80 (80) 2019/09/20 21:28
[PATCH 4.14 00/59] 4.14.146-stable review 65 (65) 2019/09/20 21:22
[PATCH] KVM: coalesced_mmio: add bounds checking 3 (3) 2019/09/18 15:20
Reminder: 25 open syzbot bugs in kvm subsystem 1 (1) 2019/07/24 01:43
BUG: unable to handle kernel paging request in coalesced_mmio_write 0 (1) 2019/06/25 21:47
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 BUG: unable to handle kernel paging request in coalesced_mmio_write C done 4 1761d 1767d 1/1 fixed on 2019/12/01 20:17
linux-4.19 BUG: unable to handle kernel paging request in coalesced_mmio_write C done 2 1767d 1767d 1/1 fixed on 2019/12/01 09:13

Sample crash report:
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 page fault for address: ffffed12fa126e1f
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 21fff0067 P4D 21fff0067 PUD 0 
Oops: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 8068 Comm: syz-executor158 Not tainted 5.2.0-rc5+ #5
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:coalesced_mmio_write+0x23e/0x440 arch/x86/kvm/../../../virt/kvm/coalesced_mmio.c:83
Code: fc ff df 48 89 45 a8 8a 04 18 84 c0 0f 85 82 01 00 00 4c 89 7d a0 41 8b 46 04 4c 8d 24 40 4f 8d 74 e6 08 4c 89 f0 48 c1 e8 03 <80> 3c 18 00 74 08 4c 89 f7 e8 74 f7 a6 00 4c 8b 7d c8 49 83 c7 f0
RSP: 0018:ffff88809426ed00 EFLAGS: 00010a02
RAX: 1ffff112fa126e1f RBX: dffffc0000000000 RCX: ffff88809564c100
RDX: 0000000000000000 RSI: 000000000000000d RDI: 0000000000000000
RBP: ffff88809426ed70 R08: ffffffff8107e400 R09: ffffed101284dd8d
R10: ffffed101284dd8c R11: 1ffff1101284dd8c R12: 00000002e780621e
R13: 0000000000000000 R14: ffff8897d09370f8 R15: ffff888094906004
FS:  0000555556380940(0000) GS:ffff8880aea00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffed12fa126e1f CR3: 000000008f478000 CR4: 00000000001426f0
Call Trace:
 kvm_iodevice_write include/kvm/iodev.h:54 [inline]
 __kvm_io_bus_write arch/x86/kvm/../../../virt/kvm/kvm_main.c:3701 [inline]
 kvm_io_bus_write+0x56a/0x6f0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3726
 vcpu_mmio_write arch/x86/kvm/x86.c:5029 [inline]
 write_mmio+0x19f/0x1f0 arch/x86/kvm/x86.c:5391
 emulator_read_write_onepage+0x68a/0x980 arch/x86/kvm/x86.c:5460
 emulator_read_write+0x1d4/0x550 arch/x86/kvm/x86.c:5509
 emulator_write_emulated+0x3c/0x50 arch/x86/kvm/x86.c:5546
 writeback+0x607/0x900 arch/x86/kvm/emulate.c:1446
 x86_emulate_insn+0x3046/0x6fe0 arch/x86/kvm/emulate.c:5695
 x86_emulate_instruction+0x8a8/0x4cc0 arch/x86/kvm/x86.c:6509
 kvm_mmu_page_fault+0x3be/0xf70 arch/x86/kvm/mmu.c:5430
 handle_ept_violation+0x1a1/0x1f0 arch/x86/kvm/vmx/vmx.c:5099
 vmx_handle_exit+0x3ba/0xd00 arch/x86/kvm/vmx/vmx.c:5861
 vcpu_enter_guest+0x3e5e/0x5380 arch/x86/kvm/x86.c:8035
 vcpu_run+0x393/0xcf0 arch/x86/kvm/x86.c:8099
 kvm_arch_vcpu_ioctl_run+0xcf2/0xff0 arch/x86/kvm/x86.c:8307
 kvm_vcpu_ioctl+0x792/0xba0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2755
 do_vfs_ioctl+0x7d4/0x1890 fs/ioctl.c:46
 ksys_ioctl fs/ioctl.c:713 [inline]
 __do_sys_ioctl fs/ioctl.c:720 [inline]
 __se_sys_ioctl fs/ioctl.c:718 [inline]
 __x64_sys_ioctl+0xe3/0x120 fs/ioctl.c:718
 do_syscall_64+0xfe/0x140 arch/x86/entry/common.c:301
 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:00007ffe506f0058 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007ffe506f0060 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: ffffed12fa126e1f
---[ end trace d717c5726d3eaff3 ]---
RIP: 0010:coalesced_mmio_write+0x23e/0x440 arch/x86/kvm/../../../virt/kvm/coalesced_mmio.c:83
Code: fc ff df 48 89 45 a8 8a 04 18 84 c0 0f 85 82 01 00 00 4c 89 7d a0 41 8b 46 04 4c 8d 24 40 4f 8d 74 e6 08 4c 89 f0 48 c1 e8 03 <80> 3c 18 00 74 08 4c 89 f7 e8 74 f7 a6 00 4c 8b 7d c8 49 83 c7 f0
RSP: 0018:ffff88809426ed00 EFLAGS: 00010a02
RAX: 1ffff112fa126e1f RBX: dffffc0000000000 RCX: ffff88809564c100
RDX: 0000000000000000 RSI: 000000000000000d RDI: 0000000000000000
RBP: ffff88809426ed70 R08: ffffffff8107e400 R09: ffffed101284dd8d
R10: ffffed101284dd8c R11: 1ffff1101284dd8c R12: 00000002e780621e
R13: 0000000000000000 R14: ffff8897d09370f8 R15: ffff888094906004
FS:  0000555556380940(0000) GS:ffff8880aea00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffed12fa126e1f CR3: 000000008f478000 CR4: 00000000001426f0

Crashes (10):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/06/23 17:15 upstream 241e39004581 472f0082 .config console log report syz C ci-upstream-kasan-gce-smack-root
2019/06/23 16:44 upstream 241e39004581 472f0082 .config console log report syz C ci-upstream-kasan-gce-smack-root
2019/06/23 01:19 upstream abf02e2964b3 34bf9440 .config console log report syz C ci-upstream-kasan-gce-selinux-root
2019/06/23 00:46 upstream abf02e2964b3 34bf9440 .config console log report syz C ci-upstream-kasan-gce-selinux-root
2019/06/22 23:55 upstream abf02e2964b3 34bf9440 .config console log report syz C ci-upstream-kasan-gce-root
2019/06/22 23:24 upstream abf02e2964b3 34bf9440 .config console log report syz C ci-upstream-kasan-gce-root
2019/06/22 22:22 upstream abf02e2964b3 34bf9440 .config console log report syz C ci-upstream-kasan-gce
2019/06/22 21:50 upstream abf02e2964b3 34bf9440 .config console log report syz C ci-upstream-kasan-gce
2019/06/30 11:30 linux-next 48568d8c7f47 7509bf36 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/06/30 11:01 linux-next 48568d8c7f47 7509bf36 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
* Struck through repros no longer work on HEAD.