CVE-2013-6456: Avoid unsafe use of /proc/$PID/root in LXC chardev hostdev hotplug
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 30 Jan 2014 17:47:39 +0000 (17:47 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 18 Feb 2014 18:29:46 +0000 (18:29 +0000)
commit0e9fee68b3bff24e4d3ab48de8129946202f3bc0
treee422ec8a1981b953e3dfdc3301e337aaf29ddbd8
parent9849cf6d89e5665667a0df449ddc3fd5582da242
CVE-2013-6456: Avoid unsafe use of /proc/$PID/root in LXC chardev hostdev hotplug

Rewrite lxcDomainAttachDeviceHostdevMiscLive function
to use the virProcessRunInMountNamespace helper. This avoids
risk of a malicious guest replacing /dev with a absolute
symlink, tricking the driver into changing the host OS
filesystem.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
(cherry picked from commit 1cadeafcaa422844a27ef622e2a7041d0235bcb3)

Conflicts:
src/lxc/lxc_driver.c: OOM + cgroups error reporting
src/lxc/lxc_driver.c