public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Matthias Maier" <tamiko@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/libvirt/, app-emulation/libvirt/files/
Date: Thu, 30 Jun 2016 18:02:37 +0000 (UTC)	[thread overview]
Message-ID: <1467309750.376e22508ab65ce5ebe3e1f1b977d013a860f84e.tamiko@gentoo> (raw)

commit:     376e22508ab65ce5ebe3e1f1b977d013a860f84e
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 30 17:59:59 2016 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Thu Jun 30 18:02:30 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=376e2250

app-emulation/libvirt: Apply upstream patch for CVE-2016-5008, bug #587570

Package-Manager: portage-2.2.28

 .../files/libvirt-1.3.5-CVE-2016-5008.patch        | 72 ++++++++++++++++++++++
 ...ibvirt-1.3.5.ebuild => libvirt-1.3.5-r1.ebuild} |  3 +-
 2 files changed, 74 insertions(+), 1 deletion(-)

diff --git a/app-emulation/libvirt/files/libvirt-1.3.5-CVE-2016-5008.patch b/app-emulation/libvirt/files/libvirt-1.3.5-CVE-2016-5008.patch
new file mode 100644
index 0000000..a47b408
--- /dev/null
+++ b/app-emulation/libvirt/files/libvirt-1.3.5-CVE-2016-5008.patch
@@ -0,0 +1,72 @@
+From bb848feec0f3f10e92dd8e5231ae7aa89b5598f3 Mon Sep 17 00:00:00 2001
+From: Jiri Denemark <jdenemar@redhat.com>
+Date: Tue, 28 Jun 2016 14:39:58 +0200
+Subject: [PATCH] qemu: Let empty default VNC password work as documented
+
+CVE-2016-5008
+
+Setting an empty graphics password is documented as a way to disable
+VNC/SPICE access, but QEMU does not always behaves like that. VNC would
+happily accept the empty password. Let's enforce the behavior by setting
+password expiration to "now".
+
+https://bugzilla.redhat.com/show_bug.cgi?id=1180092
+
+Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
+---
+ src/qemu/qemu_hotplug.c | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
+index e0b8230..bf6430d 100644
+--- a/src/qemu/qemu_hotplug.c
++++ b/src/qemu/qemu_hotplug.c
+@@ -3933,6 +3933,7 @@ qemuDomainChangeGraphicsPasswords(virQEMUDriverPtr driver,
+     time_t now = time(NULL);
+     char expire_time [64];
+     const char *connected = NULL;
++    const char *password;
+     int ret = -1;
+     virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
+ 
+@@ -3940,16 +3941,14 @@ qemuDomainChangeGraphicsPasswords(virQEMUDriverPtr driver,
+         ret = 0;
+         goto cleanup;
+     }
++    password = auth->passwd ? auth->passwd : defaultPasswd;
+ 
+     if (auth->connected)
+         connected = virDomainGraphicsAuthConnectedTypeToString(auth->connected);
+ 
+     if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0)
+         goto cleanup;
+-    ret = qemuMonitorSetPassword(priv->mon,
+-                                 type,
+-                                 auth->passwd ? auth->passwd : defaultPasswd,
+-                                 connected);
++    ret = qemuMonitorSetPassword(priv->mon, type, password, connected);
+ 
+     if (ret == -2) {
+         if (type != VIR_DOMAIN_GRAPHICS_TYPE_VNC) {
+@@ -3957,14 +3956,15 @@ qemuDomainChangeGraphicsPasswords(virQEMUDriverPtr driver,
+                            _("Graphics password only supported for VNC"));
+             ret = -1;
+         } else {
+-            ret = qemuMonitorSetVNCPassword(priv->mon,
+-                                            auth->passwd ? auth->passwd : defaultPasswd);
++            ret = qemuMonitorSetVNCPassword(priv->mon, password);
+         }
+     }
+     if (ret != 0)
+         goto end_job;
+ 
+-    if (auth->expires) {
++    if (password[0] == '\0') {
++        snprintf(expire_time, sizeof(expire_time), "now");
++    } else if (auth->expires) {
+         time_t lifetime = auth->validTo - now;
+         if (lifetime <= 0)
+             snprintf(expire_time, sizeof(expire_time), "now");
+-- 
+2.7.3
+

diff --git a/app-emulation/libvirt/libvirt-1.3.5.ebuild b/app-emulation/libvirt/libvirt-1.3.5-r1.ebuild
similarity index 99%
rename from app-emulation/libvirt/libvirt-1.3.5.ebuild
rename to app-emulation/libvirt/libvirt-1.3.5-r1.ebuild
index dc601a4..dcff0fd 100644
--- a/app-emulation/libvirt/libvirt-1.3.5.ebuild
+++ b/app-emulation/libvirt/libvirt-1.3.5-r1.ebuild
@@ -222,7 +222,8 @@ src_prepare() {
 		"${FILESDIR}"/${PN}-1.2.16-fix_paths_in_libvirt-guests_sh.patch \
 		"${FILESDIR}"/${PN}-1.3.1-fix_paths_for_apparmor.patch \
 		"${FILESDIR}"/${PN}-1.2.21-avoid_deprecated_pc_file.patch \
-		"${FILESDIR}"/${PN}-1.3.4-glibc-2.23.patch
+		"${FILESDIR}"/${PN}-1.3.4-glibc-2.23.patch \
+		"${FILESDIR}"/${P}-CVE-2016-5008.patch
 
 	[[ -n ${BACKPORTS} ]] &&
 		EPATCH_FORCE=yes EPATCH_SUFFIX="patch" \


             reply	other threads:[~2016-06-30 18:02 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-30 18:02 Matthias Maier [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-02-08  1:33 [gentoo-commits] repo/gentoo:master commit in: app-emulation/libvirt/, app-emulation/libvirt/files/ Sam James
2025-02-08  1:33 Sam James
2024-04-14  0:43 Sam James
2024-04-14  0:43 Sam James
2024-03-04 10:28 Sam James
2024-02-29  0:22 Sam James
2023-10-31 16:25 Matthias Maier
2023-06-21 21:48 Matthias Maier
2023-06-18  1:54 Matthias Maier
2023-06-10 16:59 Sam James
2022-09-23  1:06 Sam James
2022-08-03 18:21 Sam James
2022-03-02 17:36 Joonas Niilola
2022-02-21 23:14 Sam James
2022-01-04 16:33 Matthias Maier
2021-04-04 17:49 Matthias Maier
2020-12-07  8:53 Sergei Trofimovich
2020-11-10  0:34 Matthias Maier
2020-07-21 18:11 Marek Szuba
2020-04-06 17:46 Matthias Maier
2020-04-05 17:19 Matthias Maier
2020-03-15 21:14 Matthias Maier
2020-02-06 15:52 Matthias Maier
2020-02-03  3:07 Matthias Maier
2019-08-05 15:03 Matthias Maier
2019-07-09 19:06 Matthias Maier
2019-07-09 18:54 Matthias Maier
2019-07-01 15:07 Matthias Maier
2019-07-01 14:27 Matthias Maier
2019-05-19 23:42 Matthias Maier
2019-03-17  7:27 Matthias Maier
2018-12-26  3:27 Matthias Maier
2018-08-19 19:08 Matthias Maier
2018-07-03 15:30 Matthias Maier
2018-06-29  4:50 Matthias Maier
2018-06-29  4:50 Matthias Maier
2018-03-23 14:16 Matthias Maier
2017-12-07 16:08 Matthias Maier
2017-09-01  2:01 Matthias Maier
2017-09-01  2:01 Matthias Maier
2017-05-06 18:27 Matthias Maier
2017-01-22 15:34 Matthias Maier
2016-07-09 15:10 Matthias Maier
2016-05-01 19:15 Matthias Maier
2016-03-11  7:45 Matthias Maier
2016-01-07  8:18 Matthias Maier
2015-12-22 16:13 Matthias Maier
2015-10-05  6:32 Matthias Maier
2015-08-14  3:48 Matthias Maier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1467309750.376e22508ab65ce5ebe3e1f1b977d013a860f84e.tamiko@gentoo \
    --to=tamiko@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox