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 15:53:09 +0000 (15:53 +0000)
commit43720035b7f4c175ef2594296d874bc1910840b3
tree4ffc7c31a75f0efdd1b0c45abdeb3578747e64c9
parent212414281f0001da78f2312d7f52dcf124317fc9
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