render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
6bf708
From 4843e53175b76c8a3676756db314354a696e2785 Mon Sep 17 00:00:00 2001
6bf708
Message-Id: <4843e53175b76c8a3676756db314354a696e2785@dist-git>
6bf708
From: Pavel Hrdina <phrdina@redhat.com>
6bf708
Date: Tue, 23 Sep 2014 15:43:37 +0200
6bf708
Subject: [PATCH] domain_conf: fix domain deadlock
6bf708
6bf708
CVE-2014-3657
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>
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
6bf708
index d1617b8..bb2e7ef 100644
6bf708
--- a/src/conf/domain_conf.c
6bf708
+++ b/src/conf/domain_conf.c
6bf708
@@ -18748,7 +18748,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
-- 
6bf708
2.1.0
6bf708