From: Miquel Raynal <miquel.raynal@bootlin.com>
To: henrymei <ljp1205831794@gmail.com>
Cc: linux-mtd@lists.infradead.org, richard@nod.at, vigneshr@ti.com,
linux-kernel@vger.kernel.org, Aohan Mei <henrymei@tencent.com>,
TencentOS Corvus AI <corvus@tencent.com>,
stable@vger.kernel.org
Subject: Re: [PATCH] mtd: inftl: validate MediaHeader partition geometry before allocating tables
Date: Thu, 03 Sep 2026 10:04:18 +0200 [thread overview]
Message-ID: <87h5k67ocd.fsf@bootlin.com> (raw)
In-Reply-To: <20260902124044.3942821-1-henrymei@tencent.com> (henrymei's message of "Wed, 2 Sep 2026 20:40:19 +0800")
Hi Henry,
On 02/09/2026 at 20:40:19 +08, henrymei <ljp1205831794@gmail.com> wrote:
> From: Aohan Mei <henrymei@tencent.com>
>
> find_boot_record() trusts the on-flash INFTL MediaHeader partition
> fields without validating their relationship to each other or to the
> device geometry.
>
> The sanity check
>
> if ((ip->lastUnit - ip->firstUnit + 1) < ip->virtualUnits)
>
> is evaluated in unsigned 32-bit arithmetic. With lastUnit < firstUnit
lastUnit < firstUnit? Did you even read that sentence?
Sorry but, no.
Thanks,
Miquèl
next prev parent reply other threads:[~2026-09-03 8:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-02 12:40 henrymei
2026-09-03 8:04 ` Miquel Raynal [this message]
2026-09-03 9:43 ` 林佳鹏
2026-09-03 10:01 ` Miquel Raynal
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=87h5k67ocd.fsf@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=corvus@tencent.com \
--cc=henrymei@tencent.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=ljp1205831794@gmail.com \
--cc=richard@nod.at \
--cc=stable@vger.kernel.org \
--cc=vigneshr@ti.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®