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

Kees Cook posted 2 patches 1 year, 8 months ago
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
[PATCH 0/2] exec: Add KUnit test for bprm_stack_limits()
Posted by Kees Cook 1 year, 8 months ago
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

-- 
2.34.1