syzbot


KMSAN: uninit-value in em_ret_near_imm

Status: fixed on 2024/04/11 10:26
Subsystems: kvm
[Documentation on labels]
Reported-by: syzbot+c9aca2253922f806a75a@syzkaller.appspotmail.com
Fix commit: 6fd1e3963f20 KVM: x86: Clean up partially uninitialized integer in emulate_pop()
First crash: 118d, last: 102d
Discussions (2)
Title Replies (including bot) Last reply
Re: [syzbot] [kvm?] KMSAN: uninit-value in em_ret_near_imm 1 (1) 2024/02/21 13:59
[syzbot] [kvm?] KMSAN: uninit-value in em_ret_near_imm 1 (2) 2024/02/21 13:56

Sample crash report:
=====================================================
BUG: KMSAN: uninit-value in assign_eip_near arch/x86/kvm/emulate.c:829 [inline]
BUG: KMSAN: uninit-value in em_ret_near_imm+0x13c/0x580 arch/x86/kvm/emulate.c:3192
 assign_eip_near arch/x86/kvm/emulate.c:829 [inline]
 em_ret_near_imm+0x13c/0x580 arch/x86/kvm/emulate.c:3192
 x86_emulate_insn+0x1d87/0x5880 arch/x86/kvm/emulate.c:5292
 x86_emulate_instruction+0x13c9/0x30a0 arch/x86/kvm/x86.c:9171
 kvm_mmu_page_fault+0x1026/0x1140 arch/x86/kvm/mmu/mmu.c:5855
 handle_ept_violation+0x4ef/0x7f0 arch/x86/kvm/vmx/vmx.c:5796
 __vmx_handle_exit arch/x86/kvm/vmx/vmx.c:6575 [inline]
 vmx_handle_exit+0x1b05/0x2140 arch/x86/kvm/vmx/vmx.c:6592
 vcpu_enter_guest arch/x86/kvm/x86.c:11067 [inline]
 vcpu_run arch/x86/kvm/x86.c:11171 [inline]
 kvm_arch_vcpu_ioctl_run+0x91e9/0xb890 arch/x86/kvm/x86.c:11397
 kvm_vcpu_ioctl+0xbfc/0x1770 arch/x86/kvm/../../../virt/kvm/kvm_main.c:4441
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:871 [inline]
 __se_sys_ioctl+0x225/0x410 fs/ioctl.c:857
 __x64_sys_ioctl+0x96/0xe0 fs/ioctl.c:857
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcf/0x1e0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

Local variable eip created at:
 em_ret_near_imm+0x3a/0x580 arch/x86/kvm/emulate.c:3189
 x86_emulate_insn+0x1d87/0x5880 arch/x86/kvm/emulate.c:5292

CPU: 1 PID: 5263 Comm: syz-executor.0 Not tainted 6.8.0-rc7-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
=====================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/03/05 00:37 upstream 90d35da658da 3717835d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in em_ret_near_imm
2024/02/17 02:55 upstream 0f1dd5e91e2b 578f7538 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in em_ret_near_imm
* Struck through repros no longer work on HEAD.