Thread (11 messages) 11 messages, 3 authors, 2017-07-08

[PATCH 0/2] exec: Use sane stack rlimit for setuid exec

flat view

From: Kees Cook <hidden>
Date: 2017-07-07 22:13:37
Also in: linux-fsdevel, lkml

On Fri, Jul 7, 2017 at 1:04 PM, Linus Torvalds
[off-list ref] wrote:
On Fri, Jul 7, 2017 at 12:56 PM, Kees Cook [off-list ref] wrote:
quoted
As discussed with Linus and Andy, we need to reset the stack rlimit
before we do memory layouts when execing a privilege-gaining (e.g.
setuid) program. This moves security_bprm_secureexec() earlier (with
required changes), and then lowers the stack limit when appropriate.
Looks sane to me, and that first patch looks like a nice cleanup
regardless - the old semantics were insane.
I wonder if we could collapse all the secureexec logic in
setup_new_exec. There are three places (?). I was shy to consolidate
those in this patch in case there were weird dependencies on
dumpability ordering. But I'll go see if I can clean those up too...

-Kees

-- 
Kees Cook
Pixel Security
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help