syzbot


KMSAN: kernel-infoleak in vmx_get_nested_state

Status: fixed on 2019/03/06 07:43
Subsystems: kvm
[Documentation on labels]
Fix commit: 3a33d030daaa kvm: x86/vmx: Use kzalloc for cached_vmcs12
First crash: 2037d, last: 1926d

Sample crash report:
IPv6: ADDRCONF(NETDEV_CHANGE): hsr0: link becomes ready
IPv6: ADDRCONF(NETDEV_UP): vxcan1: link is not ready
8021q: adding VLAN 0 to HW filter on device batadv0
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+0x16b/0x1f0 lib/usercopy.c:32
CPU: 0 PID: 10517 Comm: syz-executor499 Not tainted 5.0.0-rc1+ #9
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+0x173/0x1d0 lib/dump_stack.c:113
 kmsan_report+0x12e/0x2a0 mm/kmsan/kmsan.c:600
 kmsan_internal_check_memory+0x9e4/0xb10 mm/kmsan/kmsan.c:692
 kmsan_copy_to_user+0xab/0xc0 mm/kmsan/kmsan_hooks.c:601
 _copy_to_user+0x16b/0x1f0 lib/usercopy.c:32
 copy_to_user include/linux/uaccess.h:174 [inline]
 vmx_get_nested_state+0xf7a/0x1020 arch/x86/kvm/vmx/nested.c:5272
 kvm_arch_vcpu_ioctl+0xb34/0x7200 arch/x86/kvm/x86.c:4162
 kvm_vcpu_ioctl+0xc6d/0x1d20 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2825
 do_vfs_ioctl+0xebd/0x2bf0 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+0xbc/0xf0 arch/x86/entry/common.c:291
 entry_SYSCALL_64_after_hwframe+0x63/0xe7
RIP: 0033:0x44b119
Code: e8 dc 0b 03 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 bb 04 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f1a93584ce8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000006e2c48 RCX: 000000000044b119
RDX: 0000000020002280 RSI: 00000000c080aebe RDI: 0000000000000008
RBP: 00000000006e2c40 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006e2c4c
R13: 00007ffc58222d0f R14: 00007f1a935859c0 R15: 000000000000002d

Uninit was created at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:205 [inline]
 kmsan_internal_poison_shadow+0x92/0x150 mm/kmsan/kmsan.c:159
 kmsan_kmalloc+0xa6/0x130 mm/kmsan/kmsan_hooks.c:176
 kmem_cache_alloc_trace+0x55d/0xb40 mm/slub.c:2784
 kmalloc include/linux/slab.h:545 [inline]
 enter_vmx_operation+0x1db/0xab0 arch/x86/kvm/vmx/nested.c:4147
 vmx_set_nested_state+0x9b2/0x14a0 arch/x86/kvm/vmx/nested.c:5350
 kvm_arch_vcpu_ioctl+0x4c47/0x7200 arch/x86/kvm/x86.c:4204
 kvm_vcpu_ioctl+0xc6d/0x1d20 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2825
 do_vfs_ioctl+0xebd/0x2bf0 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+0xbc/0xf0 arch/x86/entry/common.c:291
 entry_SYSCALL_64_after_hwframe+0x63/0xe7

Bytes 0-997 of 998 are uninitialized
Memory access of size 998 starts at ffff8880acf3a000
Data copied to user address 0000000020003300
==================================================================

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/02/06 18:31 https://github.com/google/kmsan.git master fa1981bee40f d25487bc .config console log report syz C ci-upstream-kmsan-gce
2019/03/05 15:10 https://github.com/google/kmsan.git master 6c55aa96dcda bb91cf81 .config console log report ci-upstream-kmsan-gce
2019/02/07 14:16 https://github.com/google/kmsan.git master fa1981bee40f aa4feb03 .config console log report ci-upstream-kmsan-gce
2019/02/06 16:52 https://github.com/google/kmsan.git master fa1981bee40f d25487bc .config console log report ci-upstream-kmsan-gce
2018/12/08 08:28 https://github.com/google/kmsan.git master 3f06bda61398 65ed2472 .config console log report ci-upstream-kmsan-gce
2018/11/14 09:57 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.