mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: ebiederm@xmission.com
Cc: Sebastian Krahmer <krahmer@suse.de>, linux-kernel@vger.kernel.org
Subject: CLONE_NEWUSER|CLONE_FS root exploit
Date: Wed, 13 Mar 2013 10:57:29 -0700	[thread overview]
Message-ID: <20130313175729.GH12501@outflux.net> (raw)

Hi,

It seem like we should block (at least) this combination. On 3.9, this
exploit works once uidmapping is added.

http://www.openwall.com/lists/oss-security/2013/03/13/10

-Kees

----- Forwarded message from Sebastian Krahmer <krahmer@suse.de> -----

Date: Wed, 13 Mar 2013 16:39:56 +0100
From: Sebastian Krahmer <krahmer@suse.de>
To: oss-security@lists.openwall.com
Subject: [oss-security] CLONE_NEWUSER|CLONE_FS root exploit
Envelope-To: kees@outflux.net

Hi,

Seems like CLONE_NEWUSER|CLONE_FS might be a forbidden
combination.
During evaluating the new user namespace thingie, it turned out
that its trivially exploitable to get a (real) uid 0,
as demonstrated here:

http://stealth.openwall.net/xSports/clown-newuser.c

The trick is to setup a chroot in your CLONE_NEWUSER,
but also affecting the parent, which is running
in the init_user_ns, but with the chroot shared.
Then its trivial to get a rootshell from that.

Tested on a openSUSE12.1 with a custom build 3.8.2 (x86_64).

I hope I didnt make anything wrong, mixing up the UIDs,
or disabled important checks during kernel build on my test
system. ;)

regards,
Sebastian

-- 

~ perl self.pl
~ $_='print"\$_=\47$_\47;eval"';eval
~ krahmer@suse.de - SuSE Security Team

----- End forwarded message -----

-- 
Kees Cook
Chrome OS Security

             reply	other threads:[~2013-03-13 17:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-13 17:57 Kees Cook [this message]
2013-03-13 18:35 ` Eric W. Biederman
2013-03-14  1:48   ` Andy Lutomirski
2013-03-14 20:29     ` Eric W. Biederman
2013-03-14 21:32       ` Andy Lutomirski

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=20130313175729.GH12501@outflux.net \
    --to=keescook@chromium.org \
    --cc=ebiederm@xmission.com \
    --cc=krahmer@suse.de \
    --cc=linux-kernel@vger.kernel.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®