diff options
author | Kees Cook <[email protected]> | 2019-02-18 16:36:48 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2019-02-18 16:49:36 -0800 |
commit | b5372fe5dc84235dbe04998efdede3c4daa866a9 (patch) | |
tree | 75ca80d49613a8daf9b2f59707fb051eb1e545f6 /scripts/gen_compile_commands.py | |
parent | 301e361072e56a6d6afbf952ae5e746dc8bbb865 (diff) |
exec: load_script: Do not exec truncated interpreter path
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 <[email protected]>
Signed-off-by: Kees Cook <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: Samuel Dionne-Riel <[email protected]>
Cc: Richard Weinberger <[email protected]>
Cc: Graham Christensen <[email protected]>
Cc: Michal Hocko <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'scripts/gen_compile_commands.py')
0 files changed, 0 insertions, 0 deletions