a2479f539e
CVE-2019-10161: arbitrary file read/exec via virDomainSaveImageGetXMLDesc API (bz #1722463, bz #1720115) CVE-2019-10166: virDomainManagedSaveDefineXML API exposed to readonly clients (bz #1722462, bz #1720114) CVE-2019-10167: arbitrary command execution via virConnectGetDomainCapabilities API (bz #1722464, bz #1720117) CVE-2019-10168: arbitrary command execution via virConnectBaselineHypervisorCPU and virConnectCompareHypervisorCPU APIs (bz #1722466, bz #1720118)
40 lines
1.3 KiB
Diff
40 lines
1.3 KiB
Diff
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
|
|
Date: Fri, 14 Jun 2019 09:17:39 +0200
|
|
Subject: [PATCH] api: disallow virConnect*HypervisorCPU on read-only
|
|
connections
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
These APIs can be used to execute arbitrary emulators.
|
|
Forbid them on read-only connections.
|
|
|
|
Fixes: CVE-2019-10168
|
|
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
|
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
(cherry picked from commit bf6c2830b6c338b1f5699b095df36f374777b291)
|
|
---
|
|
src/libvirt-host.c | 2 ++
|
|
1 file changed, 2 insertions(+)
|
|
|
|
diff --git a/src/libvirt-host.c b/src/libvirt-host.c
|
|
index e20d6ee250..2978825d22 100644
|
|
--- a/src/libvirt-host.c
|
|
+++ b/src/libvirt-host.c
|
|
@@ -1041,6 +1041,7 @@ virConnectCompareHypervisorCPU(virConnectPtr conn,
|
|
|
|
virCheckConnectReturn(conn, VIR_CPU_COMPARE_ERROR);
|
|
virCheckNonNullArgGoto(xmlCPU, error);
|
|
+ virCheckReadOnlyGoto(conn->flags, error);
|
|
|
|
if (conn->driver->connectCompareHypervisorCPU) {
|
|
int ret;
|
|
@@ -1234,6 +1235,7 @@ virConnectBaselineHypervisorCPU(virConnectPtr conn,
|
|
|
|
virCheckConnectReturn(conn, NULL);
|
|
virCheckNonNullArgGoto(xmlCPUs, error);
|
|
+ virCheckReadOnlyGoto(conn->flags, error);
|
|
|
|
if (conn->driver->connectBaselineHypervisorCPU) {
|
|
char *cpu;
|