forked from pool/libvirt
2d3b4f44f0
Fixes for CVE's made public today. - api: disallow virConnect*HypervisorCPU, virConnectGetDomainCapabilities, virDomainManagedSaveDefineXML, and virDomainSaveImageGetXMLDesc on read-only connections CVE-2019-10161-api-disallow-virDomainSaveImageGetXMLDesc.patch, CVE-2019-10166-api-disallow-virDomainManagedSaveDefineXML.patch, CVE-2019-10167-api-disallow-virConnectGetDomainCapabilities.patch, CVE-2019-10168-api-disallow-virConnect-HypervisorCPU.patch CVE-2019-10161, CVE-2019-10166, CVE-2019-10167, CVE-2019-10168 bsc#1138301, bsc#1138302, bsc#1138303, bsc#1138305 OBS-URL: https://build.opensuse.org/request/show/711148 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=765
28 lines
1.0 KiB
Diff
28 lines
1.0 KiB
Diff
commit db0b78457f183e4c7ac45bc94de86044a1e2056a
|
|
Author: Ján Tomko <jtomko@redhat.com>
|
|
Date: Fri Jun 14 09:14:53 2019 +0200
|
|
|
|
api: disallow virDomainManagedSaveDefineXML on read-only connections
|
|
|
|
The virDomainManagedSaveDefineXML can be used to alter the domain's
|
|
config used for managedsave or even execute arbitrary emulator binaries.
|
|
Forbid it on read-only connections.
|
|
|
|
Fixes: CVE-2019-10166
|
|
Reported-by: Matthias Gerstner <mgerstner@suse.de>
|
|
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
|
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
Index: libvirt-5.4.0/src/libvirt-domain.c
|
|
===================================================================
|
|
--- libvirt-5.4.0.orig/src/libvirt-domain.c
|
|
+++ libvirt-5.4.0/src/libvirt-domain.c
|
|
@@ -9563,6 +9563,7 @@ virDomainManagedSaveDefineXML(virDomainP
|
|
|
|
virCheckDomainReturn(domain, -1);
|
|
conn = domain->conn;
|
|
+ virCheckReadOnlyGoto(conn->flags, error);
|
|
|
|
if (conn->driver->domainManagedSaveDefineXML) {
|
|
int ret;
|