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 16:00:09 +0000 (16:00 +0000)
commita06bdfcb446f182e490f70422a8431c3bcb2c801
tree908bfd517243bc5eca7f616a6466c18db13a3923
parent77ddbad2a9272239a09673c5d6993793308514e9
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)
src/lxc/lxc_driver.c