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:53:09 +0000 (15:53 +0000)
commit212414281f0001da78f2312d7f52dcf124317fc9
tree7f35a2894d4b04f7b5aae9b495282487154b0b7a
parentc17dd7ede2affd147ffdc5e8daef85939bda0dd0
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)

Conflicts:
src/lxc/lxc_driver.c: OOM + cgroups error reporting
src/lxc/lxc_driver.c