summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2019-02-18 16:36:48 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-06 12:18:04 +0100
commit8023398fb0a91662a142a471ada95ddfd72d0686 (patch)
tree5293cf490abf1d33c30ba2f4a7acdab9f8138a3d /tools
parent6ec056496b8690539abd9c1c22d300071ab4a6c3 (diff)
exec: load_script: Do not exec truncated interpreter path
[ Upstream commit b5372fe5dc84235dbe04998efdede3c4daa866a9 ] Commit 8099b047ecc4 ("exec: load_script: don't blindly truncate shebang string") was trying to protect against a confused exec of a truncated interpreter path. However, it was overeager and also refused to truncate arguments as well, which broke userspace, and it was reverted. This attempts the protection again, but allows arguments to remain truncated. In an effort to improve readability, helper functions and comments have been added. Co-developed-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Kees Cook <keescook@chromium.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Samuel Dionne-Riel <samuel@dionne-riel.com> Cc: Richard Weinberger <richard.weinberger@gmail.com> Cc: Graham Christensen <graham@grahamc.com> Cc: Michal Hocko <mhocko@suse.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions