LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: alban.crequy@gmail.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [RFC][WIP] namespace.c: Allow some unprivileged proc mounts when not fully visible
Date: Wed, 04 Apr 2018 18:59:08 -0500	[thread overview]
Message-ID: <87k1tmed6b.fsf@xmission.com> (raw)
In-Reply-To: <20180404174909.GB2540@avx2> (Alexey Dobriyan's message of "Wed, 4 Apr 2018 20:49:09 +0300")

Alexey Dobriyan <adobriyan@gmail.com> writes:

>> The only option I have seen proposed that might qualify as something
>> general purpose and simple is a new filesystem that is just the process
>> directories of proc.
>
> While "mount -t pid" and "mount -t sysctl" are decades overdue, I don't
> think they cover everything.
>
> IIRC some gcc versions read /proc/meminfo on every invocation. Now
> imagine such program doesn't have a fallback if /proc/ doesn't exist
> (how many thousands such programs are there?) So user is going to ask
> for /proc with just /proc/meminfo only. At this point it is back to
> nearly full /proc.

To avoid falling susceptible to the kinds of checks in fs_fully_visible we
can only offer information about objects that root in the user namespace
has privilege over.  So "mount -t pid" good.  A "/proc/meminfo" bad.

Which in short means if "mount -t pid" isn't good enough.  There really
isn't anything the kernel can do.

Eric

  reply	other threads:[~2018-04-05  0:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-04 17:49 Alexey Dobriyan
2018-04-04 23:59 ` Eric W. Biederman [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-04-04 17:45 Alexey Dobriyan
2018-04-04 11:53 Alban Crequy
2018-04-04 14:45 ` Eric W. Biederman
2018-04-04 15:34   ` Aleksa Sarai
2018-04-04 18:42   ` Serge E. Hallyn
2018-04-04 22:02     ` Eric W. Biederman
2018-04-05 14:19   ` Christian Brauner
2018-04-13 22:41   ` Djalal Harouni
2018-04-16 14:16     ` Alexey Gladkov

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=87k1tmed6b.fsf@xmission.com \
    --to=ebiederm@xmission.com \
    --cc=adobriyan@gmail.com \
    --cc=alban.crequy@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [PATCH] [RFC][WIP] namespace.c: Allow some unprivileged proc mounts when not fully visible' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).