[buildd-tools-devel] Bug#686148: Bug#686148: schroot: Does not unmount /run/shm

Roger Leigh rleigh at codelibre.net
Sun Oct 14 22:11:56 UTC 2012


severity 686148 serious
tags 686148 + fixed-upstream pending
thanks

On Wed, Aug 29, 2012 at 09:42:16AM +0200, Daniel Dehennin wrote:
> I noticed several “/run/shm” in my mount since a moment but did not
> figure out where they came from.
>   tmpfs on /run/shm type tmpfs (rw,relatime)
> 
> After quitting the schroot, the “/run/shm” is still here.

Thanks for reporting this.  I've made this RC severity due to this
giving an end user the ability to mount over the host /run/shm,
which could cause problems on the host system.  They can't alter
the content of the fstab, but if they have root access in the
chroot, they could place symlinks to arbitrary places on the
host.

In git, I've updated schroot-mount to use realpath(3) to
canonicalise the path, which will remove all symlinks.  We then
ensure that any links outside the chroot will be resolved
inside before mounting.  This does have a limitation: we call
realpath(3) on the host, so complex nested symlinks may resolve
differently.  But anyone using complex sets of nested links as
mountpoints is insane!  And even in this case, they will all
get mounted inside the chroot, so there's no danger of
compromising the host.

This will fix the problem you reported.

This might also need backporting to 1.4 and squeeze.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.



More information about the Buildd-tools-devel mailing list