]> 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>
Wed, 10 Aug 2022 20:25:52 +0000 (23:25 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Aug 2022 09:18:16 +0000 (11:18 +0200)
commite7186f111d5fa75fc2ab7b6a3d4ddeb6bfec6e03
tree671f4a929bc54ce646b94cb219707e453100246f
parent1ebc9e70a0f48236ad586a75c152cadb4c4dc9f4
KVM: x86: Avoid theoretical NULL pointer dereference in kvm_irq_delivery_to_apic_fast()

commit 97b9c9d9f9cbf59d0d30d0c907fb56974b947a13 upstream

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>
Signed-off-by: Stefan Ghinea <stefan.ghinea@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/lapic.c