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: 3a7b4f2897
master date: 2025-09-09 14:11:34 +0200
This commit is contained in:
Roger Pau Monné authored and Jan Beulich committed 2025-09-09 14:22:58 +02:00
1 parent 8924243e5f
commit 7fa5a9d64f
1 file changed
+4
+4
View File
@@ -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
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.