CVE-2013-6456: Avoid unsafe use of /proc/$PID/root in LXC disk hotplug
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 30 Jan 2014 15:59:20 +0000 (15:59 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 18 Feb 2014 13:18:46 +0000 (13:18 +0000)
commitcd48d62aca488a116b47073be2607653a1d3305e
tree7af3ef79fd33c7fad8bca7a72d1ba786e66b0095
parent8fca7a4fa6b40d21723008d2092536349f20517d
CVE-2013-6456: Avoid unsafe use of /proc/$PID/root in LXC disk hotplug

Rewrite lxcDomainAttachDeviceDiskLive 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 4dd3a7d5bc44980135a1b11810ba9aeab42a4a59)
src/lxc/lxc_driver.c