Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 12 Apr 2012 21:40:13 -0700
From: Andy Lutomirski <luto@...capital.net>
To: James Morris <jmorris@...ei.org>
Cc: Andrew Lutomirski <luto@....edu>, Will Drewry <wad@...omium.org>, linux-kernel@...r.kernel.org, 
	linux-man@...r.kernel.org, linux-security-module@...r.kernel.org, 
	linux-arch@...r.kernel.org, linux-doc@...r.kernel.org, 
	kernel-hardening@...ts.openwall.com, netdev@...r.kernel.org, x86@...nel.org, 
	arnd@...db.de, "David S. Miller" <davem@...emloft.net>, hpa@...or.com, mingo@...hat.com, 
	Oleg Nesterov <oleg@...hat.com>, peterz@...radead.org, rdunlap@...otime.net, 
	mcgrathr@...omium.org, tglx@...utronix.de, Eric Paris <eparis@...hat.com>, 
	Serge Hallyn <serge.hallyn@...onical.com>, djm@...drot.org, scarybeasts@...il.com, 
	indan@....nu, pmoore@...hat.com, Andrew Morton <akpm@...ux-foundation.org>, 
	Jonathan Corbet <corbet@....net>, eric.dumazet@...il.com, markus@...omium.org, 
	coreyb@...ux.vnet.ibm.com, Kees Cook <keescook@...omium.org>, 
	Stephen Smalley <sds@...ho.nsa.gov>
Subject: Re: [PATCH v18 01/15] Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve
 from granting privs

On Thu, Apr 12, 2012 at 9:34 PM, James Morris <jmorris@...ei.org> wrote:
> On Thu, 12 Apr 2012, Andrew Lutomirski wrote:
>
>> > What about dynamic transitions in SELinux ?
>> >
>>
>> What's a dynamic transition?
>
> The security label can be changed without an exec:
>
> See selinux_setprocattr(), for "current".

Ah.

I see nothing wrong with that, for the same reason I see nothing wrong
with setuid (the system call) after PR_SET_NO_NEW_PRIVS.  The
privileges granted by writing to /proc/self/attr/current were already
available in the sense that you could have written to current whenever
you wanted to.

(FWIW, I think that selinux should have made that the only way to
change contexts, full stop.  And I think that the setuid and setgid
bits were mistakes.  Water under the bridge...)

--Andy

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.