lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140926233125.GA6918@hobo.lan>
Date:	Sat, 27 Sep 2014 00:31:25 +0100
From:	Ross Lagerwall <rosslagerwall@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	linux-fsdevel@...r.kernel.org
Subject: Mount propagation issue

Hi,

I have encountered a strange bug (on 3.14, 3.16.3 and master) regarding
mount namespaces and a particular directory.  Somehow, mounts are being
mounted successfully but disappearing when the process dies, but only
for /mnt/puppy, not for any other directory in the system:

# grep puppy /proc/mounts            # nothing mounted yet
# mount -t tmpfs tmpfs /mnt/puppy
# grep puppy /proc/mounts            # no output

# mount -t tmpfs tmpfs /mnt/puppy2
# grep puppy /proc/mounts
tmpfs /mnt/puppy2 tmpfs rw,relatime 0 0

Furthermore, I wrote a program to mount /mnt/puppy and immediately
read /proc/mounts:
# grep puppy /proc/mounts            # no output
# ./mounter
tmpfs /mnt/puppy tmpfs rw,relatime 0 0
# grep puppy /proc/mounts            # no output

Finally, I note that the problem seems to occur if the mount needs to be
propagated to the default namespace (note that systemd causes namespaces
to be shared by default):
# unshare -m

subshell # mount -t tmpfs tmpfs /mnt/puppy
subshell # grep puppy /proc/mounts   # no output
subshell # mount --make-rprivate /
subshell # mount -t tmpfs tmpfs /mnt/puppy
subshell # grep puppy /proc/mounts   # success!
tmpfs /mnt/puppy tmpfs rw,relatime 0 0
subshell # umount /mnt/puppy
subshell # exit

# mount --make-rprivate /            # back in the default namespace
# mount -t tmpfs tmpfs /mnt/puppy
# grep puppy /proc/mounts            # no output

I hope someone has an idea of what's going on or how to debug this
because I've run out of ideas...

Thanks!
-- 
Ross Lagerwall
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ