syzbot


WARNING in __load_segment_descriptor

Status: closed as dup on 2023/07/13 15:57
Subsystems: kvm
[Documentation on labels]
Reported-by: syzbot+5234e75fb68b86fe89e3@syzkaller.appspotmail.com
First crash: 305d, last: 304d
Cause bisection: introduced by (bisect log) :
commit 65966aaca18a5cbf42ac22234cb9cbbf60a4d33c
Author: Sean Christopherson <seanjc@google.com>
Date: Thu Feb 16 20:22:54 2023 +0000

  KVM: x86: Assert that the emulator doesn't load CS with garbage in !RM

Crash: WARNING in __load_segment_descriptor (log)
Repro: C syz .config
  
Duplicate of
Title Repro Cause bisect Fix bisect Count Last Reported
WARNING in kvm_arch_vcpu_ioctl_run (5) kvm C error 343 243d 331d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [kvm?] WARNING in __load_segment_descriptor 1 (2) 2023/07/13 15:57

Sample crash report:
kvm_intel: set kvm_intel.dump_invalid_vmcs=1 to dump internal KVM state.
------------[ cut here ]------------
WARNING: CPU: 0 PID: 5022 at arch/x86/kvm/emulate.c:1648 __load_segment_descriptor+0xf89/0x1200 arch/x86/kvm/emulate.c:1648
Modules linked in:
CPU: 0 PID: 5022 Comm: syz-executor486 Not tainted 6.4.0-syzkaller-12454-g1c7873e33645 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/03/2023
RIP: 0010:__load_segment_descriptor+0xf89/0x1200 arch/x86/kvm/emulate.c:1648
Code: 70 00 44 0f b6 7c 24 37 0f b6 7c 24 30 44 89 fe e8 4c f9 70 00 44 38 7c 24 30 0f 84 96 fb ff ff e9 06 f9 ff ff e8 d7 fd 70 00 <0f> 0b 44 0f b6 7c 24 20 e9 43 f2 ff ff e8 c5 fd 70 00 44 0f b6 7c
RSP: 0018:ffffc90003abf898 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000000
RDX: ffff8880275e5940 RSI: ffffffff8113e3b9 RDI: 0000000000000005
RBP: ffff8880765e8000 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000050
R13: 0000000000000050 R14: ffff8880765e8030 R15: 0000000000000000
FS:  00005555566133c0(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020032008 CR3: 0000000025f5b000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 load_segment_descriptor arch/x86/kvm/emulate.c:1775 [inline]
 __emulate_int_real+0x561/0x6f0 arch/x86/kvm/emulate.c:2061
 emulate_int_real+0x7d/0xd0 arch/x86/kvm/emulate.c:2075
 kvm_inject_realmode_interrupt+0x102/0x340 arch/x86/kvm/x86.c:8435
 vmx_inject_exception+0x33b/0x470 arch/x86/kvm/vmx/vmx.c:1793
 kvm_check_and_inject_events arch/x86/kvm/x86.c:10082 [inline]
 vcpu_enter_guest+0x386/0x6020 arch/x86/kvm/x86.c:10646
 vcpu_run arch/x86/kvm/x86.c:10951 [inline]
 kvm_arch_vcpu_ioctl_run+0xa35/0x2820 arch/x86/kvm/x86.c:11172
 kvm_vcpu_ioctl+0x574/0xe90 arch/x86/kvm/../../../virt/kvm/kvm_main.c:4112
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl fs/ioctl.c:856 [inline]
 __x64_sys_ioctl+0x19d/0x210 fs/ioctl.c:856
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f281d28c749
Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 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 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffced680a68 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007ffced680a78 RCX: 00007f281d28c749
RDX: 0000000000000000 RSI: 000000000000ae80 RDI: 0000000000000005
RBP: 00007ffced680a70 R08: 0000000000000000 R09: 00007f281d24d2d0
R10: 0000000000009120 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/07/09 12:35 upstream 1c7873e33645 668cb1fa .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in __load_segment_descriptor
2023/07/09 06:36 upstream 1c7873e33645 668cb1fa .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in __load_segment_descriptor
2023/07/09 06:11 upstream 8fc3b8f082cc 668cb1fa .config console log report syz C [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in __load_segment_descriptor
2023/07/09 08:37 upstream 1c7873e33645 668cb1fa .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root WARNING in __load_segment_descriptor
2023/07/09 06:10 upstream 8fc3b8f082cc 668cb1fa .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in __load_segment_descriptor
2023/07/09 06:05 upstream 1c7873e33645 668cb1fa .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in __load_segment_descriptor
2023/07/09 06:04 upstream 8fc3b8f082cc 668cb1fa .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in __load_segment_descriptor
2023/07/09 05:55 upstream 8fc3b8f082cc 668cb1fa .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in __load_segment_descriptor
* Struck through repros no longer work on HEAD.