From 9c54ef7c05dce6b67d6f7ff8ba8b414612bbaed1 Mon Sep 17 00:00:00 2001 Message-Id: <9c54ef7c05dce6b67d6f7ff8ba8b414612bbaed1@dist-git> From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Wed, 30 Sep 2020 17:38:14 +0200 Subject: [PATCH] rpc: require write acl for guest agent in virDomainInterfaceAddresses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CVE-2020-25637 Add a requirement for domain:write if source is set to VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_AGENT. Signed-off-by: Ján Tomko Reported-by: Ilja Van Sprundel (cherry picked from commit e4116eaa44cb366b59f7fe98f4b88d04c04970ad) Signed-off-by: Ján Tomko Conflicts: src/lxc/lxc_driver.c The LXC implementation of the API was introduced in libvirt 6.1.0, so it's not present downstream. src/qemu/qemu_driver.c Commit 5910b180 is not present downstream. Message-Id: <7db63b4388d8b1fd096892e1465abcff99c6696a.1601480224.git.jtomko@redhat.com> Reviewed-by: Jiri Denemark --- src/libxl/libxl_driver.c | 2 +- src/qemu/qemu_driver.c | 2 +- src/remote/remote_protocol.x | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 1eb63c5b64..d157a78bef 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -6199,7 +6199,7 @@ libxlDomainInterfaceAddresses(virDomainPtr dom, if (!(vm = libxlDomObjFromDomain(dom))) goto cleanup; - if (virDomainInterfaceAddressesEnsureACL(dom->conn, vm->def) < 0) + if (virDomainInterfaceAddressesEnsureACL(dom->conn, vm->def, source) < 0) goto cleanup; if (virDomainObjCheckActive(vm) < 0) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 449d869f98..223583b5a7 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -20687,7 +20687,7 @@ qemuDomainInterfaceAddresses(virDomainPtr dom, if (!(vm = qemuDomObjFromDomain(dom))) goto cleanup; - if (virDomainInterfaceAddressesEnsureACL(dom->conn, vm->def) < 0) + if (virDomainInterfaceAddressesEnsureACL(dom->conn, vm->def, source) < 0) goto cleanup; if (virDomainObjCheckActive(vm) < 0) diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x index c370755f68..78208e5855 100644 --- a/src/remote/remote_protocol.x +++ b/src/remote/remote_protocol.x @@ -5997,6 +5997,7 @@ enum remote_procedure { /** * @generate: none * @acl: domain:read + * @acl: domain:write::source:VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_AGENT */ REMOTE_PROC_DOMAIN_INTERFACE_ADDRESSES = 353, -- 2.28.0