linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] exec: Avoid pathological argc, envc, and bprm->p values
@ 2024-06-21 20:50 Kees Cook
  2024-06-21 20:50 ` [PATCH v2 1/2] execve: Keep bprm->argmin behind CONFIG_MMU Kees Cook
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Kees Cook @ 2024-06-21 20:50 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Kees Cook, Eric Biederman, Al Viro, Christian Brauner, Jan Kara,
	Alexey Dobriyan, Laurent Vivier, Lukas Bulwahn, Justin Stitt,
	linux-kernel, linux-fsdevel, linux-mm, linux-hardening

Hi,

This pair of patches replaces the last patch in this[1] series.

Perform bprm argument overflow checking but only do argmin checks for MMU
systems. To avoid tripping over this again, argmin is explicitly defined
only for CONFIG_MMU. Thank you to Guenter Roeck for finding this issue
(again)!

-Kees

[1] https://lore.kernel.org/all/20240520021337.work.198-kees@kernel.org/

Kees Cook (2):
  execve: Keep bprm->argmin behind CONFIG_MMU
  exec: Avoid pathological argc, envc, and bprm->p values

 fs/exec.c               | 36 +++++++++++++++++++++++++++++-------
 fs/exec_test.c          | 30 +++++++++++++++++++++++++++++-
 include/linux/binfmts.h |  2 +-
 3 files changed, 59 insertions(+), 9 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-06-27 19:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-21 20:50 [PATCH v2 0/2] exec: Avoid pathological argc, envc, and bprm->p values Kees Cook
2024-06-21 20:50 ` [PATCH v2 1/2] execve: Keep bprm->argmin behind CONFIG_MMU Kees Cook
2024-06-21 20:50 ` [PATCH v2 2/2] exec: Avoid pathological argc, envc, and bprm->p values Kees Cook
2024-06-21 21:44 ` [PATCH v2 0/2] " Guenter Roeck
2024-06-27 19:49   ` Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).