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:00:09 +0000 (16:00 +0000)
commit77ddbad2a9272239a09673c5d6993793308514e9
tree8168e17f066bacbb07a2efc764251a0171e48a6c
parenta6e9270ec79924fabd5a872984bb5d38eaf3df8a
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