]> 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:02:26 +0000 (10:02 +0200)
commitfb8c9f1305d108e5a43e83b72a86e41abfdeda86
tree2953d8b033506856ab3f54f4f61c3fd993111bdb
parent16daadc708be65c2681f54d33ac4004ccaf6e82d
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