qemu: Do not access stale data in virDomainBlockStats
CVE-2013-6458 https://bugzilla.redhat.com/show_bug.cgi?id=1043069 When virDomainDetachDeviceFlags is called concurrently to virDomainBlockStats: libvirtd may crash because qemuDomainBlockStats finds a disk in vm->def before getting a job on a domain and uses the disk pointer after getting the job. However, the domain in unlocked while waiting on a job condition and thus data behind the disk pointer may disappear. This happens when thread 1 runs virDomainDetachDeviceFlags and enters monitor to actually remove the disk. Then another thread starts running virDomainBlockStats, finds the disk in vm->def, and while it's waiting on the job condition (owned by the first thread), the first thread finishes the disk removal. When the second thread gets the job, the memory pointed to be the disk pointer is already gone. That said, every API that is going to begin a job should do that before fetching data from vm->def.
Showing
-
mentioned in commit 5f5e9eb2
-
mentioned in commit c430c002
-
mentioned in commit 561b03f9
-
mentioned in commit 59d46c6c
-
mentioned in commit d003b8f2
-
mentioned in commit c67b0de0
-
mentioned in commit 938ef6e6
-
mentioned in commit 5efb9963
-
mentioned in commit 84c251fa
-
mentioned in commit 17db7e28
-
mentioned in commit c8fa19d9
-
mentioned in commit 13051a86
想要评论请 注册 或 登录