From: Kees Cook <kees@kernel.org>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Kees Cook <kees@kernel.org>,
Eric Biederman <ebiederm@xmission.com>,
Al Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
Alexey Dobriyan <adobriyan@gmail.com>,
Laurent Vivier <laurent@vivier.eu>,
Lukas Bulwahn <lukas.bulwahn@gmail.com>,
Justin Stitt <justinstitt@google.com>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-mm@kvack.org, linux-hardening@vger.kernel.org
Subject: [PATCH v2 0/2] exec: Avoid pathological argc, envc, and bprm->p values
Date: Fri, 21 Jun 2024 13:50:42 -0700 [thread overview]
Message-ID: <20240621204729.it.434-kees@kernel.org> (raw)
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
next reply other threads:[~2024-06-21 20:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-21 20:50 Kees Cook [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240621204729.it.434-kees@kernel.org \
--to=kees@kernel.org \
--cc=adobriyan@gmail.com \
--cc=brauner@kernel.org \
--cc=ebiederm@xmission.com \
--cc=jack@suse.cz \
--cc=justinstitt@google.com \
--cc=laurent@vivier.eu \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux@roeck-us.net \
--cc=lukas.bulwahn@gmail.com \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).