diff options
author | 2024-06-21 13:50:44 -0700 | |
---|---|---|
committer | 2024-07-13 21:31:58 -0700 | |
commit | 21f93108306026b8066db31c24a097192c8c36c7 (patch) | |
tree | eeab89c91b56534dfc7af8dcbc048a6a30677d39 /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | execve: Keep bprm->argmin behind CONFIG_MMU (diff) | |
download | wireguard-linux-21f93108306026b8066db31c24a097192c8c36c7.tar.xz wireguard-linux-21f93108306026b8066db31c24a097192c8c36c7.zip |
exec: Avoid pathological argc, envc, and bprm->p values
Make sure nothing goes wrong with the string counters or the bprm's
belief about the stack pointer. Add checks and matching self-tests.
Take special care for !CONFIG_MMU, since argmin is not exposed there.
For 32-bit validation, 32-bit UML was used:
$ tools/testing/kunit/kunit.py run \
--make_options CROSS_COMPILE=i686-linux-gnu- \
--make_options SUBARCH=i386 \
exec
For !MMU validation, m68k was used:
$ tools/testing/kunit/kunit.py run \
--arch m68k --make_option CROSS_COMPILE=m68k-linux-gnu- \
exec
Link: https://lore.kernel.org/r/20240520021615.741800-2-keescook@chromium.org
Link: https://lore.kernel.org/r/20240621205046.4001362-2-kees@kernel.org
Signed-off-by: Kees Cook <kees@kernel.org>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions