[Pkg-libvirt-commits] [libvirt] 02/03: CVE-2017-2635: qemu: Don't update physical storage size of empty drives

Guido Guenther agx at moszumanska.debian.org
Mon Feb 27 19:56:21 UTC 2017


This is an automated email from the git hooks/post-receive script.

agx pushed a commit to branch debian/sid
in repository libvirt.

commit cb216b540a834fdc29cae55d330a2c2eb3c0bbd4
Author: Guido Günther <agx at sigxcpu.org>
Date:   Mon Feb 27 20:07:37 2017 +0100

    CVE-2017-2635: qemu: Don't update physical storage size of empty drives
---
 ...mu-Don-t-update-physical-storage-size-of-.patch | 33 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 34 insertions(+)

diff --git a/debian/patches/CVE-2017-2635-qemu-Don-t-update-physical-storage-size-of-.patch b/debian/patches/CVE-2017-2635-qemu-Don-t-update-physical-storage-size-of-.patch
new file mode 100644
index 0000000..7040d75
--- /dev/null
+++ b/debian/patches/CVE-2017-2635-qemu-Don-t-update-physical-storage-size-of-.patch
@@ -0,0 +1,33 @@
+From: Peter Krempa <pkrempa at redhat.com>
+Date: Thu, 23 Feb 2017 10:07:30 +0100
+Subject: CVE-2017-2635: qemu: Don't update physical storage size of empty
+ drives
+
+Previously the code called virStorageSourceUpdateBlockPhysicalSize which
+did not do anything on empty drives since it worked only on block
+devices. After the refactor in c5f6151390 it's called for all devices
+and thus attempts to deref the NULL path of empty drives.
+
+Add a check that skips the update of the physical size if the storage
+source is empty.
+
+Upstream-Commit: c3de387380f6057ee0e46cd9f2f0a092e8070875
+Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1420718
+---
+ src/qemu/qemu_driver.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
+index d4422f3..2bb5906 100644
+--- a/src/qemu/qemu_driver.c
++++ b/src/qemu/qemu_driver.c
+@@ -11644,6 +11644,9 @@ qemuDomainStorageUpdatePhysical(virQEMUDriverPtr driver,
+     int fd = -1;
+     struct stat sb;
+ 
++    if (virStorageSourceIsEmpty(src))
++        return 0;
++
+     if (qemuDomainStorageOpenStat(driver, cfg, vm, src, &fd, &sb) < 0)
+         return -1;
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 2cd5c33..a5eeda3 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -19,3 +19,4 @@ openpty-Skip-test-if-no-pty-is-available.patch
 test-posix_openpt-don-t-fail-on-EACCESS.patch
 Disable-use-of-namespaces-by-default.patch
 debian/Debianize-virtlogd.patch
+CVE-2017-2635-qemu-Don-t-update-physical-storage-size-of-.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libvirt.git



More information about the Pkg-libvirt-commits mailing list