[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110715152641.GA6286@albatros>
Date: Fri, 15 Jul 2011 19:26:41 +0400
From: Vasiliy Kulikov <segoon@...nwall.com>
To: Stephen Smalley <sds@...ho.nsa.gov>
Cc: NeilBrown <neilb@...e.de>, kernel-hardening@...ts.openwall.com,
Solar Designer <solar@...nwall.com>,
James Morris <jmorris@...ei.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
linux-kernel@...r.kernel.org, Greg Kroah-Hartman <gregkh@...e.de>,
Andrew Morton <akpm@...ux-foundation.org>,
"David S. Miller" <davem@...emloft.net>,
Jiri Slaby <jslaby@...e.cz>,
Alexander Viro <viro@...iv.linux.org.uk>,
linux-fsdevel@...r.kernel.org,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
Eric Paris <eparis@...hat.com>, Willy Tarreau <w@....eu>,
Sebastian Krahmer <krahmer@...e.de>
Subject: Re: [kernel-hardening] Re: [PATCH] move RLIMIT_NPROC check from
set_user() to do_execve_common()
Hi Stephen,
On Fri, Jul 15, 2011 at 09:58 -0400, Stephen Smalley wrote:
> Does this have implications for Android's zygote model? There you have
> a long running uid 0 / all caps process (the zygote), which forks itself
> upon receiving a request to spawn an app and then calls
> setgroups();
> setrlimit(); setgid(); setuid();
Is RLIMIT_NPROC forced in your model and setuid() is expected to fail
because of NPROC exceeding? If no, then it is not touched at all.
> Also, can't setuid() fail under other conditions, e.g. ENOMEM upon
> prepare_creds() allocation failure? Is it ever reasonable for a program
> to not check setuid() for failure? Certainly there are plenty of
> examples of programs not doing that, but it isn't clear that this is a
> bug in the kernel.
This thing is better to discuss separately, after the patch is applied.
Shorter, in current implementation it is not possible as mm layer tries
to alloc small structures (less than 8 pages) indefinitely. cred and
user_struct are less than 64kb, so ENOMEM is impossible.
Thanks,
--
Vasiliy Kulikov
http://www.openwall.com - bringing security into open computing environments
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists