OSDN Git Service

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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Jul 2017 05:44:57 +0000 (07:44 +0200)
commit86949eb96466ec182303afc3c386bd70cc67b991
tree4fc667631009a26124962c8e0d7e9ccaf1b8a4e7
parent7888c0296c87a6c83bf2a0311c8e929f5f11832f
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/exec.c