]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Don't update physical storage size of empty drives CVE-2017-2635
authorPeter Krempa <pkrempa@redhat.com>
Thu, 23 Feb 2017 09:07:30 +0000 (10:07 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 24 Feb 2017 08:19:54 +0000 (09:19 +0100)
commitc3de387380f6057ee0e46cd9f2f0a092e8070875
treee04beb79e316afd857edfddf823050ac4fd32ebe
parenteca76884ea7f75fb1dd015337ed1f5039b5b6c56
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.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1420718
src/qemu/qemu_driver.c