mbox series

[0/2] exec: Add KUnit test for bprm_stack_limits()

Message ID 20240520021337.work.198-kees@kernel.org (mailing list archive)
Headers show
Series exec: Add KUnit test for bprm_stack_limits() | expand

Message

Kees Cook May 20, 2024, 2:16 a.m. UTC
Hi,

This adds a first KUnit test to the core exec code. With the ability to
manipulate userspace memory from KUnit coming[1], I wanted to at least
get the KUnit framework in place in exec.c. Most of the coming tests
will likely be to binfmt_elf.c, but still, this serves as a reasonable
first step.

-Kees

[1] https://lore.kernel.org/linux-hardening/20240519190422.work.715-kees@kernel.org/

Kees Cook (2):
  exec: Add KUnit test for bprm_stack_limits()
  exec: Avoid pathological argc, envc, and bprm->p values

 MAINTAINERS       |   2 +
 fs/Kconfig.binfmt |   8 +++
 fs/exec.c         |  24 +++++++-
 fs/exec_test.c    | 137 ++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 170 insertions(+), 1 deletion(-)
 create mode 100644 fs/exec_test.c