]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitf36ff1cd62f49ca0f72c805fd3cf552c5818d5ce
tree352913dc8484c5ce9b5598b8775619cddb8791df
parenta7757a396fba2125923b4d2425cfaa78146721ec
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