Blob Blame History Raw
From c2a9261d3c438f74553062b4e5d5aa31d7ae5354 Mon Sep 17 00:00:00 2001
Message-Id: <c2a9261d3c438f74553062b4e5d5aa31d7ae5354@dist-git>
From: Peter Krempa <pkrempa@redhat.com>
Date: Wed, 21 Jan 2015 13:07:44 +0100
Subject: [PATCH] CVE-2015-0236: qemu: Check ACLs when dumping security info
 from snapshots

The ACL check didn't check the VIR_DOMAIN_XML_SECURE flag and the
appropriate permission for it. Found via code inspection while fixing
permissions for save images.

(Upstream ID not available yet)

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---
 src/qemu/qemu_driver.c       | 2 +-
 src/remote/remote_protocol.x | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 960bea6..a62e429 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -14344,7 +14344,7 @@ qemuDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot,
     if (!(vm = qemuDomObjFromSnapshot(snapshot)))
         return NULL;
 
-    if (virDomainSnapshotGetXMLDescEnsureACL(snapshot->domain->conn, vm->def) < 0)
+    if (virDomainSnapshotGetXMLDescEnsureACL(snapshot->domain->conn, vm->def, flags) < 0)
         goto cleanup;
 
     if (!(snap = qemuSnapObjFromSnapshot(vm, snapshot)))
diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x
index 1265060..04d842e 100644
--- a/src/remote/remote_protocol.x
+++ b/src/remote/remote_protocol.x
@@ -4434,6 +4434,7 @@ enum remote_procedure {
      * @generate: both
      * @priority: high
      * @acl: domain:read
+     * @acl: domain:read_secure:VIR_DOMAIN_XML_SECURE
      */
     REMOTE_PROC_DOMAIN_SNAPSHOT_GET_XML_DESC = 186,
 
-- 
2.2.1