[libvirt] [PATCH 3/8] Avoid unsafe use of /proc/$PID/root in LXC shutdown/reboot code

Eric Blake eblake at redhat.com
Tue Feb 18 04:37:16 UTC 2014


On 02/17/2014 09:38 AM, Daniel P. Berrange wrote:
> From: Eric Blake <eblake at redhat.com>
> 
> 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 at gmail.com> at
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=732394
> 
> Signed-off-by: Eric Blake <eblake at redhat.com>
> ---
>  src/lxc/lxc_driver.c  | 38 ++++++++++++++++++++------------------
>  src/util/virinitctl.c | 26 ++++++++++----------------
>  src/util/virinitctl.h |  5 ++---
>  3 files changed, 32 insertions(+), 37 deletions(-)
> 

ACK (but I'm biased :)

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140217/2d96cce4/attachment-0001.sig>


More information about the libvir-list mailing list