Re: [PATCH] mtd: afs: validate v2 image info bounds

Miquel Raynal <[email protected]>
Newsgroups org.infradead.lists.linux-mtd,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On 06/07/2026 at 17:40:59 +08, Pengpeng Hou <[email protected]> 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 <[email protected]>

I'll let you guess what is missing in this contribution?

Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.