CVE-2014-3633: qemu: blkiotune: Use correct definition when looking up disk
authorPeter Krempa <pkrempa@redhat.com>
Thu, 11 Sep 2014 14:35:53 +0000 (16:35 +0200)
committerEric Blake <eblake@redhat.com>
Wed, 17 Sep 2014 23:03:25 +0000 (17:03 -0600)
commitfdde9d6a1b8a559f5fa18a68cc8e8a35354b3ae9
tree722059d269d608435aab3bd1c2d82799d5e582c8
parenta73122a4ab911b7e18fb2837a9173b67beaf8edb
CVE-2014-3633: qemu: blkiotune: Use correct definition when looking up disk

Live definition was used to look up the disk index while persistent one
was indexed leading to a crash in qemuDomainGetBlockIoTune. Use the
correct def and report a nice error.

Unfortunately it's accessible via read-only connection, though it can
only crash libvirtd in the cases where the guest is hot-plugging disks
without reflecting those changes to the persistent definition.  So
avoiding hotplug, or doing hotplug where persistent is always modified
alongside live definition, will avoid the out-of-bounds access.

Introduced in: eca96694a7f992be633d48d5ca03cedc9bbc3c9aa (v0.9.8)
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1140724
Reported-by: Luyao Huang <lhuang@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>

(cherry picked from commit 3e745e8f775dfe6f64f18b5c2fe4791b35d3546b)
src/qemu/qemu_driver.c