]> xenbits.xensource.com Git - xen.git/commitdiff
tmem: only allow tmem control operations from privileged domains
authorIan Campbell <ian.campbell@citrix.com>
Tue, 11 Sep 2012 12:06:30 +0000 (14:06 +0200)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 11 Sep 2012 12:06:30 +0000 (14:06 +0200)
This is part of XSA-15 / CVE-2012-3497.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
xen/common/tmem.c

index 1a8777c2842a3fd9fec4d092bc98ce141e8aaab6..aedac551d364296aa64c2937104f0877cabac413 100644 (file)
@@ -2541,10 +2541,8 @@ static NOINLINE int do_tmem_control(struct tmem_op *op)
     OID *oidp = (OID *)(&op->u.ctrl.oid[0]);
 
     if (!tmh_current_is_privileged())
-    {
-        /* don't fail... mystery: sometimes dom0 fails here */
-        /* return -EPERM; */
-    }
+        return -EPERM;
+
     switch(subop)
     {
     case TMEMC_THAW: