From: Jiri Denemark <jdenemar(a)redhat.com>
CVE-2013-6458
Every API that is going to begin a job should do that before fetching
data from vm->def.
Conflicts:
src/qemu/qemu_driver.c
(cherry picked from commit 3b56425938e2f97208d5918263efa0d6439e4ecd)
---
src/qemu/qemu_driver.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index f810275..30b703a 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -12157,12 +12157,6 @@ qemuDomainGetBlockIoTune(virDomainPtr dom,
goto cleanup;
}
- device = qemuDiskPathToAlias(vm, disk, NULL);
-
- if (!device) {
- goto cleanup;
- }
-
if (qemuDomainObjBeginJobWithDriver(driver, vm, QEMU_JOB_MODIFY) < 0)
goto cleanup;
@@ -12170,6 +12164,11 @@ qemuDomainGetBlockIoTune(virDomainPtr dom,
&persistentDef) < 0)
goto endjob;
+ device = qemuDiskPathToAlias(vm, disk, NULL);
+ if (!device) {
+ goto endjob;
+ }
+
if (flags & VIR_DOMAIN_AFFECT_LIVE) {
priv = vm->privateData;
qemuDomainObjEnterMonitorWithDriver(driver, vm);
--
1.8.5.2