CVE-2013-6456: Avoid unsafe use of /proc/$PID/root in LXC shutdown/reboot code
authorEric Blake <eblake@redhat.com>
Tue, 24 Dec 2013 05:55:51 +0000 (22:55 -0700)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 18 Feb 2014 16:00:09 +0000 (16:00 +0000)
commit21368274a9aa91e8a5f0addb3a6bba8dad91e334
tree479410b4462a0998c5234f1023a38fe3f2341fbc
parentf7b4d314c734908ca4f45e74aac10e7c2d711918
CVE-2013-6456: Avoid unsafe use of /proc/$PID/root in LXC shutdown/reboot code

Use helper virProcessRunInMountNamespace in lxcDomainShutdownFlags and
lxcDomainReboot.  Otherwise, a malicious guest could use symlinks
to force the host to manipulate the wrong file in the host's namespace.

Idea by Dan Berrange, based on an initial report by Reco
<recoverym4n@gmail.com> at
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=732394

Signed-off-by: Eric Blake <eblake@redhat.com>
(cherry picked from commit aebbcdd33c8c18891f0bdbbf8924599a28152c9c)
src/lxc/lxc_driver.c
src/util/virinitctl.c
src/util/virinitctl.h