|
|
83e969 |
From 0f8966e0ce1887610b5eb9d955780662fc854094 Mon Sep 17 00:00:00 2001
|
|
|
83e969 |
Message-Id: <0f8966e0ce1887610b5eb9d955780662fc854094@dist-git>
|
|
|
83e969 |
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
|
|
|
83e969 |
Date: Tue, 18 Jun 2019 13:30:00 +0200
|
|
|
83e969 |
Subject: [PATCH] api: disallow virDomainManagedSaveDefineXML on read-only
|
|
|
83e969 |
connections
|
|
|
83e969 |
MIME-Version: 1.0
|
|
|
83e969 |
Content-Type: text/plain; charset=UTF-8
|
|
|
83e969 |
Content-Transfer-Encoding: 8bit
|
|
|
83e969 |
|
|
|
83e969 |
The virDomainManagedSaveDefineXML can be used to alter the domain's
|
|
|
83e969 |
config used for managedsave or even execute arbitrary emulator binaries.
|
|
|
83e969 |
Forbid it on read-only connections.
|
|
|
83e969 |
|
|
|
83e969 |
Fixes: CVE-2019-10166
|
|
|
83e969 |
Reported-by: Matthias Gerstner <mgerstner@suse.de>
|
|
|
83e969 |
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
|
|
83e969 |
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
83e969 |
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
|
|
83e969 |
Message-Id: <352bf5e963a6482d426f97b0ef36ca019e69280b.1560857354.git.jtomko@redhat.com>
|
|
|
83e969 |
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
83e969 |
---
|
|
|
83e969 |
src/libvirt-domain.c | 1 +
|
|
|
83e969 |
1 file changed, 1 insertion(+)
|
|
|
83e969 |
|
|
|
83e969 |
diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
|
|
|
83e969 |
index 0ba85b9360..3855dfe0dd 100644
|
|
|
83e969 |
--- a/src/libvirt-domain.c
|
|
|
83e969 |
+++ b/src/libvirt-domain.c
|
|
|
83e969 |
@@ -9487,6 +9487,7 @@ virDomainManagedSaveDefineXML(virDomainPtr domain, const char *dxml,
|
|
|
83e969 |
|
|
|
83e969 |
virCheckDomainReturn(domain, -1);
|
|
|
83e969 |
conn = domain->conn;
|
|
|
83e969 |
+ virCheckReadOnlyGoto(conn->flags, error);
|
|
|
83e969 |
|
|
|
83e969 |
if (conn->driver->domainManagedSaveDefineXML) {
|
|
|
83e969 |
int ret;
|
|
|
83e969 |
--
|
|
|
83e969 |
2.22.0
|
|
|
83e969 |
|