Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 502232 (CVE-2013-6456) - <app-emulation/libvirt-{,1.2.3}: vulnerability in virInitctlSetRunLevel (CVE-2013-6456)
Summary: <app-emulation/libvirt-{,1.2.3}: vulnerability in virInitctlSetRunLeve...
Alias: CVE-2013-6456
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Gentoo Security
Whiteboard: B4 [glsa]
Depends on: 508268
  Show dependency tree
Reported: 2014-02-23 11:43 UTC by Agostino Sarubbo
Modified: 2014-12-08 23:48 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2014-02-23 11:43:04 UTC
From ${URL} :

Public debian bug #732394 points out a vulnerability where a malicious guest can use symlinks to 
cause the LXC driver to manipulate unintended files in the host during the virDomainShutdown, 
virDomainReboot, virDomainDeviceAttach, and virDomainDeviceDettach APIs.

The libvirt-security list has been notified (private archives:, and we are 
now awaiting assignment of a CVE to cover this issue.  Public patches are underway for the 
virDomainShutdown/virDomainReboot issues (v4 is incomplete, v5 not posted yet:, at the time of this BZ, 
the virDomainDevice{Attach,Dettach} issue still needs work.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:

Actual results:

Expected results:

Additional info:


The LXC driver will open paths under /proc/$PID/root for some
operations it performs on running guests. For the virDomainShutdown
and virDomainReboot APIs it will use this to access the /dev/initctl
path in the container. For the virDomainDeviceAttach /
virDomainDeviceDettach APIs it will use this to create device nodes
in the container's /dev filesystem. If any of the path components
under control of the container are symlinks the container can cause
the libvirtd daemon to access the incorrect files.


A container can cause the administrator to shutdown or reboot the
host OS if /dev/initctl in the container is made to be an absolute
symlink back to itself or /run/initctl. A container can cause the
host administrator to mknod in an arbitrary host directory when
invoking the virDomainDeviceAttach API by replacing '/dev' with an
absolute symlink. A container can cause the host administrator to
delete host device when invoking the virDomainDeviceDettach API by
replacing '/dev' with an absolute symlink.


Do not use the virDomainShutdown or virDomainReboot APIs without
also passing the VIR_DOMAIN_SHUTDOWN_SIGNAL or
VIR_DOMAIN_REBOOT_SIGNAL flags respectively. These will cause the
LXC driver to send a SIGTERM or SIGHUP signal respectively, to the
init process instead of using /dev/initct.. Do not use the
virDomainDeviceAttach or virDomainDeviceDetach APIs at all unless
the guest OS is trusted.

@maintainer(s): after the bump, in case we need to stabilize the package, please let us know if it is ready for the stabilization or not.
Comment 1 Doug Goldstein (RETIRED) gentoo-dev 2014-04-20 17:29:59 UTC
This was fixed for the 1.2.2 release and the release.

The following need to go stable to fix this:
- 1.2.3
Comment 2 Agostino Sarubbo gentoo-dev 2014-04-21 08:00:08 UTC
amd64 stable
Comment 3 Agostino Sarubbo gentoo-dev 2014-04-21 08:00:20 UTC
x86 stable.

Maintainer(s), please cleanup.
Security, please vote.
Comment 4 Yury German Gentoo Infrastructure gentoo-dev 2014-05-15 04:44:04 UTC
Arches, Thank you for your work
Maintainer(s), please drop the vulnerable version.
Comment 5 Yury German Gentoo Infrastructure gentoo-dev 2014-05-20 03:31:36 UTC
Maintainer(s), Thank you for cleanup!
Comment 6 GLSAMaker/CVETool Bot gentoo-dev 2014-06-17 17:41:31 UTC
CVE-2013-6456 (
  The LXC driver (lxc/lxc_driver.c) in libvirt 1.0.1 through 1.2.1 allows
  local users to (1) delete arbitrary host devices via the
  virDomainDeviceDettach API and a symlink attack on /dev in the container;
  (2) create arbitrary nodes (mknod) via the virDomainDeviceAttach API and a
  symlink attack on /dev in the container; and cause a denial of service
  (shutdown or reboot host OS) via the (3) virDomainShutdown or (4)
  virDomainReboot API and a symlink attack on /dev/initctl in the container,
  related to "paths under /proc/$PID/root" and the virInitctlSetRunLevel
Comment 7 GLSAMaker/CVETool Bot gentoo-dev 2014-12-08 23:48:31 UTC
This issue was resolved and addressed in
 GLSA 201412-04 at
by GLSA coordinator Kristian Fiskerstrand (K_F).