Re: [PATCH v2] KVM: x86: Add LAPIC guard in kvm_apic_write_nodecode()
From: Sean Christopherson
Date: Fri Apr 03 2026 - 11:16:44 EST
On Fri, 06 Mar 2026 17:12:32 +0800, xuanqingshi wrote:
> kvm_apic_write_nodecode() dereferences vcpu->arch.apic without first
> checking whether the in-kernel LAPIC has been initialized. If it has
> not (e.g. the vCPU was created without an in-kernel LAPIC), the
> dereference results in a NULL pointer access.
>
> While APIC-write VM-Exits are not expected to occur on a vCPU without
> an in-kernel LAPIC, kvm_apic_write_nodecode() should be robust against
> such a scenario as a defense-in-depth measure, e.g. to guard against
> KVM bugs or CPU errata that could generate a spurious APIC-write
> VM-Exit.
>
> [...]
Applied to kvm-x86 misc. I still want to understand what "Found by a VMCS-targeted
fuzzer based on syzkaller" means, but this is decent hardening regardless.
Thanks!
[1/1] KVM: x86: Add LAPIC guard in kvm_apic_write_nodecode()
https://github.com/kvm-x86/linux/commit/26c9bfc0fac2
--
https://github.com/kvm-x86/linux/tree/next