syzbot


KMSAN: kernel-infoleak in kvm_arch_vcpu_ioctl

Status: fixed on 2018/12/07 08:24
Subsystems: kvm
[Documentation on labels]
Reported-by: syzbot+cfbc368e283d381f8cef@syzkaller.appspotmail.com
Fix commit: 7f9ad1dfa3c7 KVM: nVMX: Fix kernel info-leak when enabling KVM_CAP_HYPERV_ENLIGHTENED_VMCS more than once
First crash: 2046d, last: 2029d
Discussions (1)
Title Replies (including bot) Last reply
KMSAN: kernel-infoleak in kvm_arch_vcpu_ioctl 1 (2) 2018/11/16 22:59

Sample crash report:
IPVS: ftp: loaded support on port[0] = 21
L1TF CPU bug present and SMT on, data leak possible. See CVE-2018-3646 and https://www.kernel.org/doc/html/latest/admin-guide/l1tf.html for details.
==================================================================
BUG: KMSAN: kernel-infoleak in _copy_to_user+0x19a/0x230 lib/usercopy.c:31
CPU: 0 PID: 6697 Comm: syz-executor853 Not tainted 4.20.0-rc2+ #85
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x32d/0x480 lib/dump_stack.c:113
 kmsan_report+0x19f/0x300 mm/kmsan/kmsan.c:911
 kmsan_internal_check_memory+0x35b/0x3b0 mm/kmsan/kmsan.c:993
 kmsan_copy_to_user+0x7c/0xe0 mm/kmsan/kmsan_hooks.c:552
 _copy_to_user+0x19a/0x230 lib/usercopy.c:31
 copy_to_user include/linux/uaccess.h:183 [inline]
 kvm_vcpu_ioctl_enable_cap arch/x86/kvm/x86.c:3834 [inline]
 kvm_arch_vcpu_ioctl+0x5dee/0x7680 arch/x86/kvm/x86.c:4132
 kvm_vcpu_ioctl+0xca3/0x1f90 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2748
 do_vfs_ioctl+0xfbc/0x2f70 fs/ioctl.c:46
 ksys_ioctl fs/ioctl.c:713 [inline]
 __do_sys_ioctl fs/ioctl.c:720 [inline]
 __se_sys_ioctl+0x1da/0x270 fs/ioctl.c:718
 __x64_sys_ioctl+0x4a/0x70 fs/ioctl.c:718
 do_syscall_64+0xcf/0x110 arch/x86/entry/common.c:291
 entry_SYSCALL_64_after_hwframe+0x63/0xe7
RIP: 0033:0x4471b9
Code: e8 fc b9 02 00 48 83 c4 18 c3 0f 1f 80 00 00 00 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 3b 07 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f1e22946da8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000006f0038 RCX: 00000000004471b9
RDX: 0000000020000000 RSI: 000000004068aea3 RDI: 0000000000000005
RBP: 00000000006f0030 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006f003c
R13: 6d766b2f7665642f R14: 00007f1e229479c0 R15: 00000000000003e8

Local variable description: ----__pu_val@kvm_arch_vcpu_ioctl
Variable was created at:
 kvm_arch_vcpu_ioctl+0x29d/0x7680 arch/x86/kvm/x86.c:3848
 kvm_vcpu_ioctl+0xca3/0x1f90 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2748

Bytes 0-1 of 2 are uninitialized
Memory access of size 2 starts at ffff8881967ffbb0
Data copied to user address 0000000000706000
==================================================================

Crashes (31):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/11/15 04:08 https://github.com/google/kmsan.git master 006aa39cddee 5f5f6d14 .config console log report syz C ci-upstream-kmsan-gce
2018/12/01 19:36 https://github.com/google/kmsan.git master 9fbf73b8d4af 5a581673 .config console log report ci-upstream-kmsan-gce
2018/12/01 10:48 https://github.com/google/kmsan.git master 9fbf73b8d4af d8988561 .config console log report ci-upstream-kmsan-gce
2018/11/27 17:40 https://github.com/google/kmsan.git master fffec98ae2a6 4b6d14f2 .config console log report ci-upstream-kmsan-gce
2018/11/26 09:55 https://github.com/google/kmsan.git master fffec98ae2a6 ac912200 .config console log report ci-upstream-kmsan-gce
2018/11/25 10:22 https://github.com/google/kmsan.git master fffec98ae2a6 3d3ec907 .config console log report ci-upstream-kmsan-gce
2018/11/23 10:47 https://github.com/google/kmsan.git master 50031178f793 2b0dc848 .config console log report ci-upstream-kmsan-gce
2018/11/22 20:32 https://github.com/google/kmsan.git master 50031178f793 87815d9d .config console log report ci-upstream-kmsan-gce
2018/11/22 15:34 https://github.com/google/kmsan.git master 3ededcaa1606 2ee77802 .config console log report ci-upstream-kmsan-gce
2018/11/22 15:06 https://github.com/google/kmsan.git master 3ededcaa1606 2ee77802 .config console log report ci-upstream-kmsan-gce
2018/11/22 04:52 https://github.com/google/kmsan.git master 3ededcaa1606 9db828b5 .config console log report ci-upstream-kmsan-gce
2018/11/22 04:03 https://github.com/google/kmsan.git master 3ededcaa1606 9db828b5 .config console log report ci-upstream-kmsan-gce
2018/11/22 01:29 https://github.com/google/kmsan.git master 3ededcaa1606 9db828b5 .config console log report ci-upstream-kmsan-gce
2018/11/22 00:59 https://github.com/google/kmsan.git master 3ededcaa1606 9db828b5 .config console log report ci-upstream-kmsan-gce
2018/11/20 19:04 https://github.com/google/kmsan.git master 0891758b8cda 9aca6b52 .config console log report ci-upstream-kmsan-gce
2018/11/20 09:09 https://github.com/google/kmsan.git master 2808e543aacb 9bc2a903 .config console log report ci-upstream-kmsan-gce
2018/11/19 02:12 https://github.com/google/kmsan.git master cddc52641fd2 adf636a8 .config console log report ci-upstream-kmsan-gce
2018/11/18 16:45 https://github.com/google/kmsan.git master cddc52641fd2 adf636a8 .config console log report ci-upstream-kmsan-gce
2018/11/18 15:10 https://github.com/google/kmsan.git master cddc52641fd2 adf636a8 .config console log report ci-upstream-kmsan-gce
2018/11/18 13:31 https://github.com/google/kmsan.git master cddc52641fd2 adf636a8 .config console log report ci-upstream-kmsan-gce
2018/11/18 10:52 https://github.com/google/kmsan.git master cddc52641fd2 adf636a8 .config console log report ci-upstream-kmsan-gce
2018/11/18 10:39 https://github.com/google/kmsan.git master cddc52641fd2 adf636a8 .config console log report ci-upstream-kmsan-gce
2018/11/18 07:03 https://github.com/google/kmsan.git master cddc52641fd2 adf636a8 .config console log report ci-upstream-kmsan-gce
2018/11/18 05:38 https://github.com/google/kmsan.git master cddc52641fd2 adf636a8 .config console log report ci-upstream-kmsan-gce
2018/11/18 02:59 https://github.com/google/kmsan.git master cddc52641fd2 adf636a8 .config console log report ci-upstream-kmsan-gce
2018/11/18 00:42 https://github.com/google/kmsan.git master cddc52641fd2 adf636a8 .config console log report ci-upstream-kmsan-gce
2018/11/15 11:21 https://github.com/google/kmsan.git master 006aa39cddee 5f5f6d14 .config console log report ci-upstream-kmsan-gce
2018/11/15 09:47 https://github.com/google/kmsan.git master 006aa39cddee 5f5f6d14 .config console log report ci-upstream-kmsan-gce
2018/11/15 05:49 https://github.com/google/kmsan.git master 006aa39cddee 5f5f6d14 .config console log report ci-upstream-kmsan-gce
2018/11/15 04:48 https://github.com/google/kmsan.git master 006aa39cddee 5f5f6d14 .config console log report ci-upstream-kmsan-gce
2018/11/15 03:26 https://github.com/google/kmsan.git master 006aa39cddee 5f5f6d14 .config console log report ci-upstream-kmsan-gce
* Struck through repros no longer work on HEAD.