mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
x86/viridian: Enforce bounds check in vpmask_set()
Callers can pass vp/mask values which exceed the size of vpmask->mask. Ensure
we only set bits which are within bounds.
This is XSA-475 / CVE-2025-58147.
Fixes: b4124682db ("viridian: add ExProcessorMasks variants of the flush hypercalls")
Signed-off-by: Teddy Astie <teddy.astie@vates.tech>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
1 parent
ad8d3d7f40
commit
36e90c4ef1
1 file changed
+2
-1
@@ -562,7 +562,8 @@ static void vpmask_set(struct hypercall_vpmask *vpmask, unsigned int vp,
|
||||
|
||||
if ( mask & 1 )
|
||||
{
|
||||
ASSERT(vp < HVM_MAX_VCPUS);
|
||||
if ( vp >= HVM_MAX_VCPUS )
|
||||
break;
|
||||
__set_bit(vp, vpmask->mask);
|
||||
}
|
||||
|
||||
|
||||