From: Dan Carpenter <dan@pereq.eu>
To: Fabrice Derepas <fabrice.derepas@canonical.com>
Cc: Ignat Korchagin <ignat@linux.win>,
David Howells <dhowells@redhat.com>,
Lukas Wunner <lukas@wunner.de>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
keyrings@vger.kernel.org, linux-crypto@vger.kernel.org,
kexec@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] crypto: asymmetric_keys - bound PE section ranges in pefile_parse_binary
Date: Thu, 3 Dec 2026 11:03:19 +0300 [thread overview]
Message-ID: <axEiRyMvpdd9fN9Z@stanley.mountain> (raw)
In-Reply-To: <20260815114533.2171445-1-fabrice.derepas@canonical.com>
On Sat, Aug 15, 2026 at 01:45:30PM +0200, Fabrice Derepas wrote:
> Since we are now centralising section-table sanity in pefile_parse_binary(),
> the natural fix is to reject n_sections == 0 there as well, e.g. by folding
> it into the existing bound:
>
> if (ctx->n_sections == 0 ||
> ctx->n_sections > (ctx->header_size - cursor) / sizeof(*sec))
> return -ELIBBAD;
>
> A PE with zero sections is malformed (a signed kernel/EFI image always has
> at least one), so rejecting it at parse is safe and closes the
> ZERO_SIZE_PTR write too. I will include that in v3 and cover it in the KUnit
> case.
>
> Do you prefer it folded into this patch, or kept as a separate fix for the
> canon[0] write? Either way I will respin as v3 with the KUnit case once you
> let me know.
>
It's been a few months... What's the status on this?
regards,
dan carpenter
prev parent reply other threads:[~2026-12-03 8:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-13 18:25 [PATCH] crypto: asymmetric_keys - bound section data range in pefile_digest_pe_contents Fabrice Derepas
2026-08-14 13:53 ` Ignat Korchagin
2026-08-14 22:06 ` [PATCH v2] crypto: asymmetric_keys - bound PE section ranges in pefile_parse_binary Fabrice Derepas
2026-08-14 22:29 ` Ignat Korchagin
2026-08-15 11:45 ` Fabrice Derepas
2026-08-26 19:50 ` Ignat Korchagin
2026-12-03 8:03 ` Dan Carpenter [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=axEiRyMvpdd9fN9Z@stanley.mountain \
--to=dan@pereq.eu \
--cc=davem@davemloft.net \
--cc=dhowells@redhat.com \
--cc=fabrice.derepas@canonical.com \
--cc=herbert@gondor.apana.org.au \
--cc=ignat@linux.win \
--cc=kexec@lists.infradead.org \
--cc=keyrings@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas@wunner.de \
/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