mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
x86: validate VM assist value in arch_set_info_guest()
While I can't spot anything that would go wrong, just like the
respective hypercall only permits applicable bits to be set, we should
also do so when loading guest context.
Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
master commit: a62c6fe05c
master date: 2020-04-22 13:01:10 +0200
This commit is contained in:
1 parent
8d2ea0f4c8
commit
d32cbbc141
1 file changed
+3
@@ -868,6 +868,9 @@ int arch_set_info_guest(
|
||||
}
|
||||
}
|
||||
|
||||
if ( v->vcpu_id == 0 && (c(vm_assist) & ~arch_vm_assist_valid_mask(d)) )
|
||||
return -EINVAL;
|
||||
|
||||
if ( is_hvm_domain(d) )
|
||||
{
|
||||
for ( i = 0; i < ARRAY_SIZE(v->arch.dr); ++i )
|
||||
|
||||