|
|
83e969 |
From 804925f7bdd8cb7e80a0a76ea3323c55d89193ba Mon Sep 17 00:00:00 2001
|
|
|
83e969 |
Message-Id: <804925f7bdd8cb7e80a0a76ea3323c55d89193ba@dist-git>
|
|
|
83e969 |
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
|
|
|
83e969 |
Date: Tue, 18 Jun 2019 13:30:01 +0200
|
|
|
83e969 |
Subject: [PATCH] api: disallow virConnectGetDomainCapabilities 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 |
This API can be used to execute arbitrary emulators.
|
|
|
83e969 |
Forbid it on read-only connections.
|
|
|
83e969 |
|
|
|
83e969 |
Fixes: CVE-2019-10167
|
|
|
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: <eeefd7cf2afba696bed78582e086bfbd3ed23e00.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 3855dfe0dd..a1c913bd86 100644
|
|
|
83e969 |
--- a/src/libvirt-domain.c
|
|
|
83e969 |
+++ b/src/libvirt-domain.c
|
|
|
83e969 |
@@ -11279,6 +11279,7 @@ virConnectGetDomainCapabilities(virConnectPtr conn,
|
|
|
83e969 |
virResetLastError();
|
|
|
83e969 |
|
|
|
83e969 |
virCheckConnectReturn(conn, NULL);
|
|
|
83e969 |
+ virCheckReadOnlyGoto(conn->flags, error);
|
|
|
83e969 |
|
|
|
83e969 |
if (conn->driver->connectGetDomainCapabilities) {
|
|
|
83e969 |
char *ret;
|
|
|
83e969 |
--
|
|
|
83e969 |
2.22.0
|
|
|
83e969 |
|