syzbot


KMSAN: uninit-value in vmx_vcpu_put

Status: closed as invalid on 2018/10/08 08:59
Subsystems: kvm
[Documentation on labels]
First crash: 2027d, last: 2027d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: uninit-value in vmx_vcpu_put (2) kvm 2 2026d 2027d 0/26 closed as invalid on 2018/10/10 13:24

Sample crash report:
hid-generic 0000:0000:0000.0002: unknown main item tag 0x0
hid-generic 0000:0000:0000.0002: unknown main item tag 0x0
hid-generic 0000:0000:0000.0002: unknown main item tag 0x0
hid-generic 0000:0000:0000.0002: unknown main item tag 0x0
==================================================================
BUG: KMSAN: uninit-value in vmx_prepare_switch_to_host arch/x86/kvm/vmx.c:2952 [inline]
BUG: KMSAN: uninit-value in vmx_vcpu_put+0x77b/0xce0 arch/x86/kvm/vmx.c:3141
CPU: 0 PID: 7523 Comm: syz-executor2 Not tainted 4.19.0-rc4+ #63
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+0x306/0x460 lib/dump_stack.c:113
 kmsan_report+0x1a3/0x2d0 mm/kmsan/kmsan.c:917
 __msan_warning+0x7c/0xe0 mm/kmsan/kmsan_instr.c:500
 vmx_prepare_switch_to_host arch/x86/kvm/vmx.c:2952 [inline]
 vmx_vcpu_put+0x77b/0xce0 arch/x86/kvm/vmx.c:3141
 kvm_arch_vcpu_put+0x3b6/0x480 arch/x86/kvm/x86.c:3182
 kvm_sched_out+0x90/0xb0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3985
 __fire_sched_out_preempt_notifiers kernel/sched/core.c:2499 [inline]
 fire_sched_out_preempt_notifiers kernel/sched/core.c:2507 [inline]
 prepare_task_switch kernel/sched/core.c:2613 [inline]
 context_switch kernel/sched/core.c:2794 [inline]
 __schedule+0x970/0x9b0 kernel/sched/core.c:3479
 preempt_schedule_common kernel/sched/core.c:3603 [inline]
 _cond_resched+0x5e/0xf0 kernel/sched/core.c:4971
 vcpu_run arch/x86/kvm/x86.c:7741 [inline]
 kvm_arch_vcpu_ioctl_run+0x1bba/0x10a20 arch/x86/kvm/x86.c:7888
 kvm_vcpu_ioctl+0x11a7/0x20b0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2590
 vfs_ioctl fs/ioctl.c:46 [inline]
 do_vfs_ioctl+0xcf3/0x2810 fs/ioctl.c:687
 ksys_ioctl fs/ioctl.c:702 [inline]
 __do_sys_ioctl fs/ioctl.c:709 [inline]
 __se_sys_ioctl+0x1da/0x270 fs/ioctl.c:707
 __x64_sys_ioctl+0x4a/0x70 fs/ioctl.c:707
 do_syscall_64+0xbe/0x100 arch/x86/entry/common.c:291
 entry_SYSCALL_64_after_hwframe+0x63/0xe7
RIP: 0033:0x457579
Code: 1d b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 eb b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fc982095c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000457579
RDX: 0000000000000000 RSI: 000000000000ae80 RDI: 0000000000000005
RBP: 000000000072bf00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fc9820966d4
R13: 00000000004c003b R14: 00000000004d0108 R15: 00000000ffffffff

Uninit was stored to memory at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:255 [inline]
 kmsan_save_stack mm/kmsan/kmsan.c:270 [inline]
 kmsan_internal_chain_origin+0x136/0x240 mm/kmsan/kmsan.c:572
 __msan_chain_origin+0x75/0xd0 mm/kmsan/kmsan_instr.c:337
 vmx_prepare_switch_to_guest+0x4f6/0x1720 arch/x86/kvm/vmx.c:2877
 vcpu_enter_guest arch/x86/kvm/x86.c:7520 [inline]
 vcpu_run arch/x86/kvm/x86.c:7711 [inline]
 kvm_arch_vcpu_ioctl_run+0x82fa/0x10a20 arch/x86/kvm/x86.c:7888
 kvm_vcpu_ioctl+0x11a7/0x20b0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2590
 vfs_ioctl fs/ioctl.c:46 [inline]
 do_vfs_ioctl+0xcf3/0x2810 fs/ioctl.c:687
 ksys_ioctl fs/ioctl.c:702 [inline]
 __do_sys_ioctl fs/ioctl.c:709 [inline]
 __se_sys_ioctl+0x1da/0x270 fs/ioctl.c:707
 __x64_sys_ioctl+0x4a/0x70 fs/ioctl.c:707
 do_syscall_64+0xbe/0x100 arch/x86/entry/common.c:291
 entry_SYSCALL_64_after_hwframe+0x63/0xe7

Local variable description: ----error.i.i@vmx_prepare_switch_to_guest
Variable was created at:
 vmx_prepare_switch_to_guest+0x188/0x1720 arch/x86/kvm/vmx.c:2857
 vcpu_enter_guest arch/x86/kvm/x86.c:7520 [inline]
 vcpu_run arch/x86/kvm/x86.c:7711 [inline]
 kvm_arch_vcpu_ioctl_run+0x82fa/0x10a20 arch/x86/kvm/x86.c:7888
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/10/08 03:01 https://github.com/google/kmsan.git master b2efdb2ef006 8b311eaf .config console log report ci-upstream-kmsan-gce
* Struck through repros no longer work on HEAD.