]> git.hungrycats.org Git - linux/commit
exec: Limit arg stack to at most 75% of _STK_LIM
authorKees Cook <keescook@chromium.org>
Fri, 7 Jul 2017 18:57:29 +0000 (11:57 -0700)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 3 Oct 2018 03:10:08 +0000 (04:10 +0100)
commit3c270e64a394ea5e52be9e371f5676fa974f6deb
tree4e896af6cd19507376f9ca9be6d9280f9f398d04
parentaba97ce870f92835fa3385861f850e3e992dc42a
exec: Limit arg stack to at most 75% of _STK_LIM

commit da029c11e6b12f321f36dac8771e833b65cec962 upstream.

To avoid pathological stack usage or the need to special-case setuid
execs, just limit all arg stack usage to at most 75% of _STK_LIM (6MB).

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[bwh: Backported to 3.16: replaced code is slightly different]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
fs/exec.c