From: "Eric W. Biederman" <ebiederm@xmission.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul Moore <paul@paul-moore.com>,
linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [GIT PULL] LSM patches for v6.1
Date: Wed, 05 Oct 2022 07:59:24 -0500 [thread overview]
Message-ID: <87czb6h1eb.fsf@email.froward.int.ebiederm.org> (raw)
In-Reply-To: <CAHk-=wjjKsSmNVLa1e22Q29-YUEXWtS39d7EDkcN8v_E7SoKGA@mail.gmail.com> (Linus Torvalds's message of "Tue, 4 Oct 2022 14:30:35 -0700")
Linus Torvalds <torvalds@linux-foundation.org> writes:
> On Tue, Oct 4, 2022 at 1:55 PM Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
>>
>> So this whole "don't do this" approach you have is not acceptable.
>
> Side note: if we have a security hook for "create random file", then
> the notion that creating a whole new namespace somehow must not have
> any security hooks because it's *so* special is just ridiculous.
>
> I also note that right now USER_NS is both "default n" and "if not
> sure, say 'n'" in the Kconfig files, even though obviously that ship
> has sailed long ago.
Definitely. I did try and slow the up take as long as I could when
the code was maturing.
> So originally it might have been a reasonable expectation to say "only
> enable this if you're doing containers in servers", but that clearly
> isn't the case any more. So we basically take USER_NS for granted, but
> the fact that people might want chrome to use it for sandboxing does
> *not* mean that randomly we want any CLONE_NEWNS to just be ok,
> regardless of how trusted (or not) the case is.
Most importantly chrome shows how the mechanism this patch is using to
deny user space applications is one that ``breaks'' userspace. AKA
causing to silently fall back on less tested code paths that existed
before user namespaces were common. Any application that does this
uses less trusted code paths.
I am pretty certain that the code should be sending a fatal signal
instead of returning an error code on user namespace creation. I
unfortunately hadn't realized the implications until this conversation.
That said Chrome and sandboxing I think is a reasonable case to look at
to demonstrate the trade-offs. This is not all about increased kernel
attack surface, user namespaces also enable reduced attack surface in
sandboxes, which can make applications safer.
Eric
next prev parent reply other threads:[~2022-10-05 12:59 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-03 22:37 Paul Moore
2022-10-04 1:03 ` pr-tracker-bot
2022-10-04 20:36 ` Eric W. Biederman
2022-10-04 20:55 ` Linus Torvalds
2022-10-04 21:30 ` Linus Torvalds
2022-10-05 12:59 ` Eric W. Biederman [this message]
2022-10-05 12:38 ` Eric W. Biederman
2022-10-05 13:38 ` Paul Moore
2022-10-05 15:32 ` Eric W. Biederman
2022-10-05 16:04 ` Paul Moore
2022-10-05 21:27 ` Eric W. Biederman
2022-10-05 22:39 ` Paul Moore
2022-10-05 18:54 ` Linus Torvalds
2022-10-06 12:52 ` Eric W. Biederman
2022-10-06 14:42 ` Theodore Ts'o
2022-10-06 8:29 ` Vegard Nossum
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=87czb6h1eb.fsf@email.froward.int.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=paul@paul-moore.com \
--cc=torvalds@linux-foundation.org \
/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®