From: ebiederm@xmission.com (Eric W. Biederman)
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Linux Containers <containers@lists.linux-foundation.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
astrachan@google.com, Andrew Morton <akpm@linux-foundation.org>,
Al Viro <viro@zeniv.linux.org.uk>,
David Howells <dhowells@redhat.com>,
Oleg Nesterov <oleg@redhat.com>,
Alexey Dobriyan <adobriyan@gmail.com>
Subject: Re: [GIT PULL] userns fixes for 4.17-rc2
Date: Mon, 25 Jun 2018 15:14:49 -0500 [thread overview]
Message-ID: <87d0wetyh2.fsf@xmission.com> (raw)
In-Reply-To: <CA+55aFxTtemhGJweOKfATojapGzD-riaowDUSh65OA2pCB+w6Q@mail.gmail.com> (Linus Torvalds's message of "Wed, 20 Jun 2018 10:16:43 +0900")
Linus Torvalds <torvalds@linux-foundation.org> writes:
> On Tue, Jun 19, 2018 at 8:24 PM Eric W. Biederman <ebiederm@xmission.com> wrote:
>>
>> I stared at this code for quite a while and I finally concluded that the
>> best course forward is to simply things and remove the internal kernel
>> mount of proc. The internal mount of proc is directly responsible for
>> this regression and it has been the source of pain over the years.
>
> This is not the kind of patch that I'm willing to take outside the
> merge window. This is *way* too subtle, and making sysctl do a
> kern_mount()/kern_umount() seems odd.
I understand the feedback about breaking up the patch and the concern
about the race with pid->count.
I don't understand the feedback about only accepting something like this
during the merge window. The entire point of my change was to remove
subtlety. The code was very straight forward to test.
This is a silent regression of a security feature so it is possible some
people have upgraded their kernel and not noticed the regression but are
affected by the information leak not honoring hidepid introduces. That
seems to me to be a candidate for stable and thus an rc kernel.
Would you prefer a patch that does less towards fixing the root cause
for now and to be backported to stable?
> The pid->count test also looks potentially racy to me.
The function proc_flush_task is already racy, it is just an optimization
that needs to work the vast majority of the time or we get lots of stale
useless cached dentries in proc. So I don't think a little race
between testing pid->count and someone accessing a proc inode matters.
They could always perform the access after proc_flush_task is done
and before unhash_process runs, and achieve the same effect.
Though in retrospect my testing showed processes acessing proc self
from libc or something so the pid->count optimization never really
hit. So it is probably better just to remove it.
The kern_mount/kern_umount are definitely odd and not my favorite. But
the code does work. It is my intention and hope that they can both the
uml and the sysctl(2) code can both be removed. I need to double check
but I don't think there are even any enterprise kernels that enable
sysctl(2) support in the kernel any more.
Eric
next prev parent reply other threads:[~2018-06-25 20:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-19 11:23 [GIT PULL] userns fixes for 4.17-rc2 Eric W. Biederman
2018-06-20 1:16 ` Linus Torvalds
2018-06-25 20:14 ` Eric W. Biederman [this message]
2018-06-25 22:39 ` Linus Torvalds
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=87d0wetyh2.fsf@xmission.com \
--to=ebiederm@xmission.com \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=astrachan@google.com \
--cc=containers@lists.linux-foundation.org \
--cc=dhowells@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=torvalds@linux-foundation.org \
--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