Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1354369

Re: Thoughts on tightening up user namespace creation

From Kees Cook <keescook@chromium.org>
Newsgroups linux.kernel
Subject Re: Thoughts on tightening up user namespace creation
Date 2016-03-09 20:20 +0100
Message-ID <raROh-3VS-3@gated-at.bofh.it> (permalink)
References <raidP-4Nk-3@gated-at.bofh.it> <raQSe-3kQ-17@gated-at.bofh.it> <raREC-3Sz-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Mar 9, 2016 at 11:07 AM, Serge E. Hallyn <serge@hallyn.com> wrote:
> Quoting Kees Cook (keescook@chromium.org):
>> On Mon, Mar 7, 2016 at 9:15 PM, Andy Lutomirski <luto@amacapital.net> wrote:
>> > Hi all-
>> >
>> > There are several users and distros that are nervous about user
>> > namespaces from an attack surface point of view.
>> >
>> >  - RHEL and Arch have userns disabled.
>> >
>> >  - Ubuntu requires CAP_SYS_ADMIN
>> >
>> >  - Kees periodically proposes to upstream some sysctl to control
>> > userns creation.
>>
>> And here's another ring0 escalation flaw, made available to
>> unprivileged users because of userns:
>>
>> https://code.google.com/p/google-security-research/issues/detail?id=758
>
> Kees, I think you think this makes your point, but all it does is make
> me want to argue with you and start flinging back cves against kvm,
> af_unix, sctp, etc.

I can run a distro kernel without kvm and sctp, because I can leave
their modules unloaded. There is no such option for userns.

The last af_unix CVEs I see were 2 from 2013, and before that, 2010.
There's no comparison here on frequency.

>> > I think there are three main types of concerns.  First, there might be
>> > some as-yet-unknown semantic issues that would allow privilege
>> > escalation by users who create user namespaces and then confuse
>> > something else in the system.  Second, enabling user namespaces
>> > exposes a lot of attack surface to unprivileged users.  Third,
>> > allowing tasks to create user namespaces exposes the kernel to various
>> > resource exhaustion attacks that wouldn't be possible otherwise.
>> >
>> > Since I doubt we'll ever fully address the attack surface issue at
>> > least, would it make sense to try to come up with an upstreamable way
>> > to limit who can create new user namespaces and/or do various
>> > dangerous things with them?
>>
>> The change in attack surface is _substantial_. We must have a way to
>> globally disable userns.
>
> I'm confused.  Didn't we agree a few months ago, somewhat reluctantly,
> on a sysctl?

No, Eric refused it and wanted finer-grained controls.

-Kees

-- 
Kees Cook
Chrome OS & Brillo Security

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Thoughts on tightening up user namespace creation Andy Lutomirski <luto@amacapital.net> - 2016-03-08 06:20 +0100
  Re: Thoughts on tightening up user namespace creation "Serge E. Hallyn" <serge.hallyn@ubuntu.com> - 2016-03-08 07:10 +0100
    Re: Thoughts on tightening up user namespace creation Andy Lutomirski <luto@amacapital.net> - 2016-03-08 19:40 +0100
      Re: Thoughts on tightening up user namespace creation "Serge E. Hallyn" <serge@hallyn.com> - 2016-03-08 23:50 +0100
  Re: Thoughts on tightening up user namespace creation Alexander Larsson <alexl@redhat.com> - 2016-03-08 11:10 +0100
  Re: Thoughts on tightening up user namespace creation ebiederm@xmission.com (Eric W. Biederman) - 2016-03-08 17:50 +0100
  Re: Thoughts on tightening up user namespace creation Kees Cook <keescook@chromium.org> - 2016-03-09 19:20 +0100
    Re: Thoughts on tightening up user namespace creation Colin Walters <walters@verbum.org> - 2016-03-09 20:00 +0100
      Re: Thoughts on tightening up user namespace creation "Austin S. Hemmelgarn" <ahferroin7@gmail.com> - 2016-03-09 20:10 +0100
      Re: Thoughts on tightening up user namespace creation "Serge E. Hallyn" <serge@hallyn.com> - 2016-03-09 20:30 +0100
        Re: Thoughts on tightening up user namespace creation Kees Cook <keescook@chromium.org> - 2016-03-09 20:30 +0100
    Re: Thoughts on tightening up user namespace creation "Serge E. Hallyn" <serge@hallyn.com> - 2016-03-09 20:10 +0100
      Re: Thoughts on tightening up user namespace creation Kees Cook <keescook@chromium.org> - 2016-03-09 20:20 +0100

csiph-web