From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Pengpeng Hou <pengpeng@iscas.ac.cn>
Cc: Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mtd: afs: validate v2 image info bounds
Date: Mon, 06 Jul 2026 16:47:01 +0200 [thread overview]
Message-ID: <87se5wjhui.fsf@bootlin.com> (raw)
In-Reply-To: <20260706094059.82323-1-pengpeng@iscas.ac.cn> (Pengpeng Hou's message of "Mon, 6 Jul 2026 17:40:59 +0800")
On 06/07/2026 at 17:40:59 +08, Pengpeng Hou <pengpeng@iscas.ac.cn> wrote:
> The AFS v2 parser uses footer[8] to locate the image information block
> inside the current erase block, then uses the image information
> region_count to walk entries from a fixed local array. The footer offset
> and region count come from flash contents and were not checked against the
> erase block or the local image-info array before use.
>
> Reject v2 entries whose image information offset would underflow the erase
> block calculation, and reject region counts that cannot fit in the local
> image-info array before walking region entries.
>
> Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
I'll let you guess what is missing in this contribution?
Thanks,
Miquèl
prev parent reply other threads:[~2026-07-06 14:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-06 9:40 [PATCH] mtd: afs: validate v2 image info bounds Pengpeng Hou
2026-07-06 14:47 ` Miquel Raynal [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=87se5wjhui.fsf@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=pengpeng@iscas.ac.cn \
--cc=richard@nod.at \
--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