Skip to content

Commit

Permalink
rpc: require write acl for guest agent in virDomainInterfaceAddresses
Browse files Browse the repository at this point in the history
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 <jtomko@redhat.com>
Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
  • Loading branch information
janotomko committed Sep 30, 2020
1 parent 50864dc commit e4116ea
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/libxl/libxl_driver.c
Expand Up @@ -6428,7 +6428,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)
Expand Down
2 changes: 1 addition & 1 deletion src/lxc/lxc_driver.c
Expand Up @@ -1700,7 +1700,7 @@ lxcDomainInterfaceAddresses(virDomainPtr dom,
if (!(vm = lxcDomObjFromDomain(dom)))
goto cleanup;

if (virDomainInterfaceAddressesEnsureACL(dom->conn, vm->def) < 0)
if (virDomainInterfaceAddressesEnsureACL(dom->conn, vm->def, source) < 0)
goto cleanup;

if (virDomainObjCheckActive(vm) < 0)
Expand Down
2 changes: 1 addition & 1 deletion src/qemu/qemu_driver.c
Expand Up @@ -19004,7 +19004,7 @@ qemuDomainInterfaceAddresses(virDomainPtr dom,
if (!(vm = qemuDomainObjFromDomain(dom)))
goto cleanup;

if (virDomainInterfaceAddressesEnsureACL(dom->conn, vm->def) < 0)
if (virDomainInterfaceAddressesEnsureACL(dom->conn, vm->def, source) < 0)
goto cleanup;

if (virDomainObjCheckActive(vm) < 0)
Expand Down
1 change: 1 addition & 0 deletions src/remote/remote_protocol.x
Expand Up @@ -6211,6 +6211,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,

Expand Down

0 comments on commit e4116ea

Please sign in to comment.