From: ebiederm@xmission.com (Eric W. Biederman)
To: Andrey Wagin <avagin@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Serge Hallyn <serge.hallyn@canonical.com>,
linux-fsdevel@vger.kernel.org,
Alexander Viro <viro@zeniv.linux.org.uk>
Subject: Re: Does MNT_LOCKED work as expected?
Date: Mon, 29 Sep 2014 16:32:22 -0700 [thread overview]
Message-ID: <87a95i57g9.fsf@x220.int.ebiederm.org> (raw)
In-Reply-To: <CANaxB-z_h1zDU6Sdj2uAKrK5b_-W4ZWXF4=ti54Rb5QrWPjibQ@mail.gmail.com> (Andrey Wagin's message of "Mon, 29 Sep 2014 13:10:50 +0400")
Andrey Wagin <avagin@gmail.com> writes:
> Hi All,
>
> I think I found a case, when MNT_LOCKED (5ff9d8a65ce8 "vfs: Lock in
> place mounts from more privileged users") doesn't help to hide
> overmounted parts from unprivileged users.
> The problem exists for mounts, which are not overmounted entirely. In
> such cases we can open a directory from a target mount, which is not
> overmounted. Then we do pivot_root to move all mounts in a temporary
> directory. At the final step we deatch all mounts from the temporary
> directory. After that all children mounts are umounted from the target
> mount and we can use our file descriptor to open files, which have
> been overmount before.
>
> Here is a example https://github.com/avagin/userns_vs_mntns.
I am looking at this now to make certain I am understand what you are
seeing but so far it looks like lazy unmounts allow you to bypass
MNT_LOCKED :(
Grumble.
Eric
prev parent reply other threads:[~2014-09-29 23:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-29 9:10 Andrey Wagin
2014-09-29 23:32 ` Eric W. Biederman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a95i57g9.fsf@x220.int.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=avagin@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=serge.hallyn@canonical.com \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®