From: Herbert Xu <herbert@gondor.apana.org.au>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Su Hui <suhui@nfschina.com>,
davem@davemloft.net, linux-crypto@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-hardening@vger.kernel.org
Subject: Re: [PATCH] crypto: using size_add() for kmalloc()
Date: Tue, 22 Apr 2025 22:16:09 +0800 [thread overview]
Message-ID: <aAekqQH3yWk_GhMN@gondor.apana.org.au> (raw)
In-Reply-To: <2169828c-127c-4bf7-b953-2f1194b72830@stanley.mountain>
On Tue, Apr 22, 2025 at 01:24:22PM +0300, Dan Carpenter wrote:
>
> This is exactly what Kees did with the mass conversion to
> struct_size(). I occasionally run across places where Kees's mass
> conversion patches did fix real integer overflow bugs.
The point is that the reqsize shouldn't even exceed a page in size,
let alone be anywhere near 2^32.
Cheers,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
prev parent reply other threads:[~2025-04-22 14:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-21 5:51 Su Hui
2025-04-21 6:27 ` Su Hui
2025-04-21 7:10 ` Christophe JAILLET
2025-04-21 7:43 ` Su Hui
2025-04-21 8:32 ` Christophe JAILLET
2025-04-21 8:46 ` Su Hui
2025-04-21 8:50 ` Su Hui
2025-04-21 12:05 ` Herbert Xu
2025-04-22 1:30 ` Su Hui
2025-04-22 10:24 ` Dan Carpenter
2025-04-22 14:16 ` Herbert Xu [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=aAekqQH3yWk_GhMN@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=dan.carpenter@linaro.org \
--cc=davem@davemloft.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=suhui@nfschina.com \
/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
all inboxes | Powered by JetHome®