mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
domctl: don't allow a toolstack domain to call domain_pause() on itself
These DOMCTL subops were accidentally declared safe for disaggregation in the wake of XSA-77. This is XSA-127 / CVE-2015-2751. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Jan Beulich <jbeulich@suse.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
1 parent
f5bca8110b
commit
9246d2e070
2 files changed
+12
-2
No files matched your search
@@ -888,6 +888,10 @@ long arch_do_domctl(
|
||||
{
|
||||
xen_guest_tsc_info_t info;
|
||||
|
||||
ret = -EINVAL;
|
||||
if ( d == current->domain ) /* no domain_pause() */
|
||||
break;
|
||||
|
||||
domain_pause(d);
|
||||
tsc_get_info(d, &info.tsc_mode,
|
||||
&info.elapsed_nsec,
|
||||
@@ -903,6 +907,10 @@ long arch_do_domctl(
|
||||
|
||||
case XEN_DOMCTL_settscinfo:
|
||||
{
|
||||
ret = -EINVAL;
|
||||
if ( d == current->domain ) /* no domain_pause() */
|
||||
break;
|
||||
|
||||
domain_pause(d);
|
||||
tsc_set_info(d, domctl->u.tsc_info.info.tsc_mode,
|
||||
domctl->u.tsc_info.info.elapsed_nsec,
|
||||
|
||||
+4
-2
@@ -522,8 +522,10 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl)
|
||||
|
||||
case XEN_DOMCTL_resumedomain:
|
||||
{
|
||||
domain_resume(d);
|
||||
ret = 0;
|
||||
if ( d == current->domain ) /* no domain_pause() */
|
||||
ret = -EINVAL;
|
||||
else
|
||||
domain_resume(d);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||