提交 95836cb2 编写于 作者: J Jiri Denemark 提交者: Eric Blake

qemu: Fix job usage in qemuDomainBlockJobImpl

CVE-2013-6458

Every API that is going to begin a job should do that before fetching
data from vm->def.

(cherry picked from commit f93d2caa)

Conflicts:
	src/qemu/qemu_driver.c - older style BeginJobWithDriver, context
上级 7a9bcfa1
......@@ -12619,11 +12619,6 @@ qemuDomainBlockJobImpl(virDomainPtr dom, const char *path, const char *base,
goto cleanup;
}
device = qemuDiskPathToAlias(vm, path, &idx);
if (!device)
goto cleanup;
disk = vm->def->disks[idx];
if (qemuDomainObjBeginJobWithDriver(driver, vm, QEMU_JOB_MODIFY) < 0)
goto cleanup;
......@@ -12633,6 +12628,11 @@ qemuDomainBlockJobImpl(virDomainPtr dom, const char *path, const char *base,
goto endjob;
}
device = qemuDiskPathToAlias(vm, path, &idx);
if (!device)
goto endjob;
disk = vm->def->disks[idx];
qemuDomainObjEnterMonitorWithDriver(driver, vm);
/* XXX - libvirt should really be tracking the backing file chain
* itself, and validating that base is on the chain, rather than
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册