mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
x86/viridian: avoid NULL pointer dereference in viridian_synic_deliver_timer_msg()
The function is called unconditionally, regardless of whether the SIM page is mapped. Avoid a NULL pointer dereference in viridian_synic_deliver_timer_msg() by checking whether the SIM page is mapped. This is CVE-2025-58142 / part of XSA-472. Fixes:26fba3c855('viridian: add implementation of synthetic timers') Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Reviewed-by: Jan Beulich <jbeulich@suse.com> master commit:3a7b4f2897master date: 2025-09-09 14:11:34 +0200
This commit is contained in:
1 parent
8924243e5f
commit
7fa5a9d64f
1 file changed
+4
@@ -338,6 +338,10 @@ bool viridian_synic_deliver_timer_msg(struct vcpu *v, unsigned int sintx,
|
||||
.DeliveryTime = delivery,
|
||||
};
|
||||
|
||||
/* Don't assume SIM page to be mapped. */
|
||||
if ( !msg )
|
||||
return false;
|
||||
|
||||
/*
|
||||
* To avoid using an atomic test-and-set, and barrier before calling
|
||||
* vlapic_set_irq(), this function must be called in context of the
|
||||
|
||||