From: Kees Cook <kees@kernel.org>
To: Nicolas Pitre <npitre@baylibre.com>,
Dan Carpenter <dan.carpenter@linaro.org>
Cc: Kees Cook <kees@kernel.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
Eric Biederman <ebiederm@xmission.com>,
linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] binfmt_flat: Fix integer overflow bug on 32 bit systems
Date: Fri, 10 Jan 2025 08:49:47 -0800 [thread overview]
Message-ID: <173652778610.3103415.15796406713093643015.b4-ty@kernel.org> (raw)
In-Reply-To: <5be17f6c-5338-43be-91ef-650153b975cb@stanley.mountain>
On Wed, 04 Dec 2024 15:07:15 +0300, Dan Carpenter wrote:
> Most of these sizes and counts are capped at 256MB so the math doesn't
> result in an integer overflow. The "relocs" count needs to be checked
> as well. Otherwise on 32bit systems the calculation of "full_data"
> could be wrong.
>
> full_data = data_len + relocs * sizeof(unsigned long);
>
> [...]
Applied to for-next/topic/execve/core, thanks!
[1/1] binfmt_flat: Fix integer overflow bug on 32 bit systems
https://git.kernel.org/kees/c/55cf2f4b945f
Take care,
--
Kees Cook
prev parent reply other threads:[~2025-01-10 16:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-04 12:07 Dan Carpenter
2025-01-10 11:51 ` Dan Carpenter
2025-01-10 15:55 ` Nicolas Pitre
2025-01-10 16:49 ` Kees Cook [this message]
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=173652778610.3103415.15796406713093643015.b4-ty@kernel.org \
--to=kees@kernel.org \
--cc=brauner@kernel.org \
--cc=dan.carpenter@linaro.org \
--cc=ebiederm@xmission.com \
--cc=jack@suse.cz \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=npitre@baylibre.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