Re: [PATCH 1/2] api: disallow virDomainGetHostname for read-only connections

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/3/19 8:00 AM, Daniel P. Berrangé wrote:
The virDomainGetHostname API is fetching guest information and this may
involve use of an untrusted guest agent. As such its use must be
forbidden on a read-only connection to libvirt.

Fixes CVE-2019-3886
Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---
  src/libvirt-domain.c | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index be5b1f6740..baf21824fe 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -11031,6 +11031,8 @@ virDomainGetHostname(virDomainPtr domain, unsigned int flags)
      virCheckDomainReturn(domain, NULL);
      conn = domain->conn;
+ virCheckReadOnlyGoto(domain->conn->flags, error);
+
      if (conn->driver->domainGetHostname) {
          char *ret;
          ret = conn->driver->domainGetHostname(domain, flags);


Heh, I thought this and 2/2 were pushed already :-).

Reviewed-by: Jim Fehlig <jfehlig@xxxxxxxx>

Regards,
Jim

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux