All of lore.kernel.org
 help / color / mirror / Atom feed
* CLONE_NEWUSER|CLONE_FS root exploit
@ 2013-03-13 17:57 Kees Cook
       [not found] ` <20130313175729.GH12501-oSa+0FWJbaXR7s880joybQ@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Kees Cook @ 2013-03-13 17:57 UTC (permalink / raw)
  To: ebiederm; +Cc: Sebastian Krahmer, linux-kernel

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-03-14 21:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-13 17:57 CLONE_NEWUSER|CLONE_FS root exploit Kees Cook
     [not found] ` <20130313175729.GH12501-oSa+0FWJbaXR7s880joybQ@public.gmane.org>
2013-03-13 18:35   ` Eric W. Biederman
2013-03-13 18:35     ` Eric W. Biederman
     [not found]     ` <87r4jjkv18.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2013-03-14  1:48       ` Andy Lutomirski
2013-03-14  1:48         ` Andy Lutomirski
     [not found]         ` <51412C67.30908-3s7WtUTddSA@public.gmane.org>
2013-03-14 20:29           ` Eric W. Biederman
2013-03-14 20:29             ` Eric W. Biederman
     [not found]             ` <87hakdrai1.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2013-03-14 21:32               ` Andy Lutomirski
2013-03-14 21:32                 ` Andy Lutomirski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.