CVE-2013-6456: Avoid unsafe use of /proc/$PID/root in LXC block hostdev hotplug
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 30 Jan 2014 17:45:08 +0000 (17:45 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 18 Feb 2014 15:52:23 +0000 (15:52 +0000)
commit83f83508e128275bd1b74988162dc6b9f86e00ee
tree0a808e49e47ff63d6479529e0fd66509a423aed3
parent398c88edfaef50b9b59eb2d9a61b07c9c940a661
CVE-2013-6456: Avoid unsafe use of /proc/$PID/root in LXC block hostdev hotplug

Rewrite lxcDomainAttachDeviceHostdevStorageLive 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 1754c7f0ab1407dcf7c89636a35711dd9b1febe1)
src/lxc/lxc_driver.c