[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrWWKpU3RHu25BO9sEWPZbBbemahfF9sjb8c_UfRrLcqVg@mail.gmail.com>
Date: Sun, 15 Jan 2012 17:04:17 -0800
From: Andy Lutomirski <luto@...capital.net>
To: Casey Schaufler <casey@...aufler-ca.com>,
Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Jamie Lokier <jamie@...reable.org>, Will Drewry <wad@...omium.org>,
linux-kernel@...r.kernel.org, keescook@...omium.org,
john.johansen@...onical.com, serge.hallyn@...onical.com,
coreyb@...ux.vnet.ibm.com, pmoore@...hat.com, eparis@...hat.com,
djm@...drot.org, segoon@...nwall.com, rostedt@...dmis.org,
jmorris@...ei.org, scarybeasts@...il.com, avi@...hat.com,
penberg@...helsinki.fi, viro@...iv.linux.org.uk, mingo@...e.hu,
akpm@...ux-foundation.org, khilman@...com, borislav.petkov@....com,
amwang@...hat.com, oleg@...hat.com, ak@...ux.intel.com,
eric.dumazet@...il.com, gregkh@...e.de, dhowells@...hat.com,
daniel.lezcano@...e.fr, linux-fsdevel@...r.kernel.org,
linux-security-module@...r.kernel.org, olofj@...omium.org,
mhalcrow@...gle.com, dlaor@...hat.com, corbet@....net,
alan@...rguk.ukuu.org.uk, Andy Lutomirski <luto@...capital.net>
Subject: Re: [PATCH v2 0/4] PR_SET_NO_NEW_PRIVS, unshare, and chroot
On Sun, Jan 15, 2012 at 4:37 PM, Andy Lutomirski <luto@...capital.net> wrote:
> To make the no_new_privs discussion more concrete, here is an updated
> series that is actually useful. It adds PR_SET_NO_NEW_PRIVS with the
> same semantics as before (plus John Johansen's AppArmor fix and with
> improved bisectability). It then allows some unshare flags and chroot
> (sometimes) when no_new_privs is set.
Here's another reason to allow setuid/setresuid when no_new_privs is set:
I'd like a pam_no_new_privs module that lets me set no_new_privs for
certain highly untrusted users. The way to do it is:
PR_SET_NO_NEW_PRIVS
setuid(uid)
execve(the user's shell)
If setuid were disallowed, it would have to be:
setuid(uid)
PR_SET_NO_NEW_PRIVS
execve(the user's shell)
The latter is racy: the user can log in once, then log in a second
time and ptrace the login or sshd process between setuid and
PR_SET_NO_NEW_PRIVS.
--Andy
--
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