commit db0b78457f183e4c7ac45bc94de86044a1e2056a Author: Ján Tomko 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 Signed-off-by: Ján Tomko Reviewed-by: Daniel P. Berrangé 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;