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 16:34:07 +0000 (16:34 +0000)
commit72e379ed93b4707e26bbc5e3457a85833f50eb1a
treecec3800ff06e54de85c12d012ebb23e0104e5035
parentfcf05c194cb1cca6b5c703073b97ed1408a2c546
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