Re: [PATCH v2] mtd: rawnand: validate ONFI extended parameter page sections
From: Miquel Raynal
Date: Fri Aug 07 2026 - 10:28:23 EST
On Mon, 20 Jul 2026 19:57:25 +0800, Pengpeng Hou wrote:
> nand_flash_detect_ext_param_page() allocates the length declared by the
> ONFI parameter page, then treats the data as a fixed header followed by
> variable-length sections. It reads that header and advances over sections
> without first proving that the fixed page and each current section fit in
> the allocation.
>
> Reject pages shorter than the fixed header, track the remaining variable
> area while walking sections, and require the ECC section to contain every
> field read from struct onfi_ext_ecc_info. Use device-scoped diagnostics
> that identify the malformed ONFI section.
>
> [...]
Applied to nand/next, thanks!
[1/1] mtd: rawnand: validate ONFI extended parameter page sections
commit: e5e415262330bd70f983e091d8919d9dcd99e475
Patche(s) should be available on mtd/linux.git and will be
part of the next PR (provided that no robot complains by then).
Kind regards,
Miquèl