Libvirt provides a portable, long term stable C API for managing the virtualization technologies provided by many operating systems. It includes support for QEMU, KVM, Xen, LXC, bhyve, Virtuozzo, VMware vCenter and ESX, VMware Desktop, Hyper-V, VirtualBox and the POWER Hypervisor.
Go to file
Jiri Denemark 938ef6e611 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.

(cherry picked from commit db86da5ca2)

Conflicts:
	src/qemu/qemu_driver.c - context: no ACLs
2014-01-15 10:17:36 -07:00
.gnulib@a363f4ed4a build: update to latest gnulib, for syntax-check 2013-05-10 20:52:57 -06:00
build-aux syntax-check: mandate space after mid-line semicolon 2013-05-28 08:26:05 -06:00
daemon Fix max stream packet size for old clients 2013-10-01 13:59:12 +01:00
docs LXC: Fix handling of RAM filesystem size units 2013-10-15 16:29:34 +02:00
examples syntax: prefer space after semicolon in for loop 2013-05-28 07:56:07 -06:00
gnulib maint: use LGPL correctly 2013-05-20 14:03:48 -06:00
include Change virConnectDomainEventGraphicsCallback signature 2013-05-22 18:53:59 +02:00
m4 FreeBSD: disable buggy -fstack-protector-all 2013-05-15 15:20:52 -06:00
po Release of libvirt 1.0.6 2013-06-03 12:09:56 +02:00
python syntax: prefer space after semicolon in for loop 2013-05-28 07:56:07 -06:00
src qemu: Do not access stale data in virDomainBlockStats 2014-01-15 10:17:36 -07:00
tests tests: be more explicit on qcow2 versions in virstoragetest 2014-01-15 10:16:25 -07:00
tools virsh: Fix debugging 2013-10-18 08:24:55 +02:00
.dir-locals.el build: avoid tabs that failed syntax-check 2012-09-06 09:43:46 -06:00
.gitignore maint: follow recommended practice for using LGPL 2013-05-20 14:15:21 -06:00
.gitmodules
.mailmap Autogenerate AUTHORS 2012-10-19 12:44:56 -04:00
AUTHORS.in Add John Ferlan to the committers list 2013-02-05 10:59:32 -05:00
autobuild.sh Set PKG_CONFIG_LIBDIR in autobuild.sh 2013-05-17 17:09:29 +01:00
autogen.sh build: fix incremental autogen.sh when no AUTHORS is present 2012-12-03 14:59:09 -07:00
bootstrap maint: update to latest gnulib 2013-05-08 14:54:04 -06:00
bootstrap.conf Include GNULIB mkdtemp module 2013-05-17 17:09:29 +01:00
cfg.mk syntax: fix broken error message in previous patch 2013-05-28 09:52:03 -06:00
ChangeLog-old virterror.c: Fix several spelling mistakes 2012-02-03 11:32:51 -07:00
configure.ac Add support for using 3-arg pkcheck syntax for process (CVE-2013-4311) 2013-09-18 16:30:47 +01:00
COPYING maint: follow recommended practice for using LGPL 2013-05-20 14:15:21 -06:00
COPYING.LESSER maint: follow recommended practice for using LGPL 2013-05-20 14:15:21 -06:00
HACKING syntax-check: mandate space after mid-line semicolon 2013-05-28 08:26:05 -06:00
libvirt.pc.in build: silence warning from autoconf 2012-05-30 09:22:02 -06:00
libvirt.spec.in Add support for using 3-arg pkcheck syntax for process (CVE-2013-4311) 2013-09-18 16:30:47 +01:00
Makefile.am maint: use LGPL correctly 2013-05-20 14:03:48 -06:00
Makefile.nonreentrant maint: use LGPL correctly 2013-05-20 14:03:48 -06:00
mingw-libvirt.spec.in test: Return Libvirt logo as domain screenshot 2013-04-02 14:38:56 +02:00
README
README-hacking
run.in run: license as LGPL 2013-02-23 14:03:19 -07:00
TODO

         LibVirt : simple API for virtualization

  Libvirt is a C toolkit to interact with the virtualization capabilities
of recent versions of Linux (and other OSes). It is free software
available under the GNU Lesser General Public License. Virtualization of
the Linux Operating System means the ability to run multiple instances of
Operating Systems concurrently on a single hardware system where the basic
resources are driven by a Linux instance. The library aim at providing
long term stable C API initially for the Xen paravirtualization but
should be able to integrate other virtualization mechanisms if needed.

Daniel Veillard <veillard@redhat.com>