]> git.ipfire.org Git - thirdparty/libvirt.git/commit
api: disallow virDomainSaveImageGetXMLDesc on read-only connections
authorJán Tomko <jtomko@redhat.com>
Fri, 14 Jun 2019 06:47:42 +0000 (08:47 +0200)
committerJán Tomko <jtomko@redhat.com>
Mon, 24 Jun 2019 08:22:01 +0000 (10:22 +0200)
commita8ae178438be285b91c4871251ad1482c4e396df
treed87d181978d203cd33184662b6491900aa9b80fa
parent303047146eab95969985e7c9dfda0e41037c7dd1
api: disallow virDomainSaveImageGetXMLDesc on read-only connections

The virDomainSaveImageGetXMLDesc API is taking a path parameter,
which can point to any path on the system. This file will then be
read and parsed by libvirtd running with root privileges.

Forbid it on read-only connections.

Fixes: CVE-2019-10161
Reported-by: Matthias Gerstner <mgerstner@suse.de>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
(cherry picked from commit aed6a032cead4386472afb24b16196579e239580)
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Conflicts:
  src/libvirt-domain.c
  src/remote/remote_protocol.x

Upstream commit 12a51f372 which introduced the VIR_DOMAIN_SAVE_IMAGE_XML_SECURE
alias for VIR_DOMAIN_XML_SECURE is not backported.
Just skip the commit since we now disallow the whole API on read-only
connections, regardless of the flag.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
src/libvirt-domain.c
src/qemu/qemu_driver.c
src/remote/remote_protocol.x