From 60172eff1eacf9fff67ee80857f8735a3664c831 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Tue, 11 Sep 2012 14:06:30 +0200 Subject: [PATCH] tmem: only allow tmem control operations from privileged domains This is part of XSA-15 / CVE-2012-3497. Signed-off-by: Ian Campbell Committed-by: Jan Beulich --- xen/common/tmem.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/xen/common/tmem.c b/xen/common/tmem.c index 1a8777c284..aedac551d3 100644 --- a/xen/common/tmem.c +++ b/xen/common/tmem.c @@ -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: -- 2.30.2