Skip to contentSkip to conversation

'WARNING in vcpu_enter_guest' bug in arch/x86/kvm/x86.c:9877

DISCUSSION Sean Christopherson 1 participant 1 message Apr 15, 2022 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Sean Christopherson

author reviewer
#1 lore raw
Quoted 7 lines · 潘高宁

Hello, This is Gaoning Pan and Yongkang Jia from Zhejiang University. We found a 'WARNING in vcpu_enter_guest' bug by syzkaller. This flaw allows a malicious user in a Local DOS condition. The following program triggers Local DOS in vcpu_enter_guest in arch/x86/kvm/x86.c:9877 in latest release linux-5.16.13, this bug can be reproducible stably by the C reproducer:

------------[ cut here ]------------

...

Quoted 11 lines

Syzkaller reproducer:
# {Threaded:true Repeat:true RepeatTimes:0 Procs:16 Slowdown:1 Sandbox:
r0 = openat$kvm(0xffffffffffffff9c, &(0x7f0000000000), 0x0, 0x0)
r1 = ioctl$KVM_CREATE_VM(r0, 0xae01, 0x0) ioctl$KVM_CAP_SPLIT_IRQCHIP(r1, 0x4068aea3, &(0x7f0000000000)) (async) r2 = ioctl$KVM_CREATE_VCPU(r1, 0xae41, 0x0) (async)
r3 = ioctl$KVM_CREATE_VCPU(r1, 0xae41, 0x400000000000002) ioctl$KVM_SET_GUEST_DEBUG(r3, 0x4048ae9b, &(0x7f00000000c0)={0x5dda9c14aa95f5c5}) ioctl$KVM_RUN(r2, 0xae80, 0x0)

C repro and kernel config are attached.

Reproduced, should have a fix posted shortly, thanks!