render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
9119d9
From 75b4e447d3543c275de196c48569139ee2ecb50c Mon Sep 17 00:00:00 2001
9119d9
Message-Id: <75b4e447d3543c275de196c48569139ee2ecb50c@dist-git>
6bf708
From: Pavel Hrdina <phrdina@redhat.com>
9119d9
Date: Mon, 6 Oct 2014 16:52:24 +0200
6bf708
Subject: [PATCH] domain_conf: fix domain deadlock
6bf708
6bf708
If you use public api virConnectListAllDomains() with second parameter
6bf708
set to NULL to get only the number of domains you will lock out all
6bf708
other operations with domains.
6bf708
6bf708
Introduced by commit 2c680804.
6bf708
6bf708
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
9119d9
(cherry picked from commit fc22b2e74890873848b43fffae43025d22053669)
9119d9
9119d9
CVE-2014-3657
6bf708
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
6bf708
---
6bf708
 src/conf/domain_conf.c | 2 +-
6bf708
 1 file changed, 1 insertion(+), 1 deletion(-)
6bf708
6bf708
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
9119d9
index b109330..d1d816d 100644
6bf708
--- a/src/conf/domain_conf.c
6bf708
+++ b/src/conf/domain_conf.c
9119d9
@@ -20690,7 +20690,7 @@ virDomainListPopulate(void *payload,
6bf708
     /* just count the machines */
6bf708
     if (!data->domains) {
6bf708
         data->ndomains++;
6bf708
-        return;
6bf708
+        goto cleanup;
6bf708
     }
6bf708
 
6bf708
     if (!(dom = virGetDomain(data->conn, vm->def->name, vm->def->uuid))) {
6bf708
-- 
9119d9
2.1.2
6bf708