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
Eric Blake 9a1145a987 security: provide supplemental groups even when parsing label (CVE-2013-4291)
Commit 29fe5d7 (released in 1.1.1) introduced a latent problem
for any caller of virSecurityManagerSetProcessLabel and where
the domain already had a uid:gid label to be parsed.  Such a
setup would collect the list of supplementary groups during
virSecurityManagerPreFork, but then ignores that information,
and thus fails to call setgroups() to adjust the supplementary
groups of the process.

Upstream does not use virSecurityManagerSetProcessLabel for
qemu (it uses virSecurityManagerSetChildProcessLabel instead),
so this problem remained latent until backporting the initial
commit into v0.10.2-maint (commit c061ff5, released in 0.10.2.7),
where virSecurityManagerSetChildProcessLabel has not been
backported.  As a result of using a different code path in the
backport, attempts to start a qemu domain that runs as qemu:qemu
will end up with supplementary groups unchanged from the libvirtd
parent process, rather than the desired supplementary groups of
the qemu user.  This can lead to failure to start a domain
(typical Fedora setup assigns user 107 'qemu' to both group 107
'qemu' and group 36 'kvm', so a disk image that is only readable
under kvm group rights is locked out).  Worse, it is a security
hole (the qemu process will inherit supplemental group rights
from the parent libvirtd process, which means it has access
rights to files owned by group 0 even when such files should
not normally be visible to user qemu).

LXC does not use the DAC security driver, so it is not vulnerable
at this time.  Still, it is better to plug the latent hole on
the master branch first, before cherry-picking it to the only
vulnerable branch v0.10.2-maint.

* src/security/security_dac.c (virSecurityDACGetIds): Always populate
groups and ngroups, rather than only when no label is parsed.

Signed-off-by: Eric Blake <eblake@redhat.com>
(cherry picked from commit 745aa55fbf)
2013-08-29 09:17:31 -06:00
.gnulib@644c40496c maint: update to latest gnulib 2013-07-29 15:59:14 -06:00
build-aux Document bracket whitespace rules & add syntax-check rule 2012-11-02 14:00:32 +00:00
daemon daemon: fix leak after listing all volumes 2013-05-16 16:07:43 +02:00
docs build: honor autogen.sh --no-git 2013-07-29 15:58:59 -06:00
examples examples: fix mingw build vs. printf 2013-07-29 16:20:29 -06:00
gnulib maint: update to latest gnulib 2013-01-02 09:38:30 -07:00
include Add a virGetLastErrorMessage() function 2013-06-12 16:37:55 -04:00
m4 Fix build with clang 2013-07-29 15:59:21 -06:00
po Prep for release 1.0.5.5 2013-08-01 17:48:53 -04:00
python python: return dictionary without value in case of no blockjob 2013-08-20 11:44:55 -06:00
src security: provide supplemental groups even when parsing label (CVE-2013-4291) 2013-08-29 09:17:31 -06:00
tests caps: use -device for primary video when qemu >=1.6 2013-07-29 16:43:05 -06:00
tools virsh: edit: don't leak XML string on reedit or redefine 2013-06-26 17:31:16 +02:00
.dir-locals.el build: avoid tabs that failed syntax-check 2012-09-06 09:43:46 -06:00
.gitignore Add a test suite for cgroups functionality 2013-04-15 17:35:31 +01: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 Disable static libraries by default 2013-04-03 11:02:27 +01:00
autogen.sh build: honor autogen.sh --no-git 2013-07-29 15:58:59 -06:00
bootstrap maint: update to latest gnulib 2013-07-29 15:59:14 -06:00
bootstrap.conf maint: update to latest gnulib 2013-07-29 15:59:14 -06:00
cfg.mk build: honor autogen.sh --no-git 2013-07-29 15:58:59 -06:00
ChangeLog-old virterror.c: Fix several spelling mistakes 2012-02-03 11:32:51 -07:00
configure.ac Prep for release 1.0.5.5 2013-08-01 17:48:53 -04:00
COPYING.LIB Update to COPYING.LIB to latest LGPLv2.1 copy 2013-03-15 10:50:32 +01:00
HACKING build: honor autogen.sh --no-git 2013-07-29 15:58:59 -06:00
libvirt.pc.in build: silence warning from autoconf 2012-05-30 09:22:02 -06:00
libvirt.spec.in Prep for release 1.0.5.5 2013-08-01 17:48:53 -04:00
Makefile.am build: Fix AUTHORS generation 2012-12-17 21:17:55 +01:00
Makefile.nonreentrant Ban use of all inet_* functions 2010-10-22 11:59:23 +01:00
mingw-libvirt.spec.in test: Return Libvirt logo as domain screenshot 2013-04-02 14:38:56 +02:00
README
README-hacking maint: relax git minimum version 2010-02-24 14:29:27 -05:00
run.in run: license as LGPL 2013-02-23 14:03:19 -07:00
TODO Update todo list file to point at bugzilla/website 2010-10-13 16:45:26 +01:00

         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>