KVM: x86: Avoid theoretical NULL pointer dereference in kvm_irq_delivery_to_apic_fast()
authorVitaly Kuznetsov <vkuznets@redhat.com>
Fri, 25 Mar 2022 13:21:39 +0000 (14:21 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 29 Mar 2022 17:22:01 +0000 (13:22 -0400)
commit00b5f37189d24ac3ed46cb7f11742094778c46ce
tree352913dc8484c5ce9b5598b8775619cddb8791df
parent7ec37d1cbe17d8189d9562178d8b29167fe1c31a
KVM: x86: Avoid theoretical NULL pointer dereference in kvm_irq_delivery_to_apic_fast()

When kvm_irq_delivery_to_apic_fast() is called with APIC_DEST_SELF
shorthand, 'src' must not be NULL. Crash the VM with KVM_BUG_ON()
instead of crashing the host.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20220325132140.25650-3-vkuznets@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/lapic.c