diff options
| author | Pengpeng Hou <pengpeng@iscas.ac.cn> | 2026-07-20 19:57:25 +0800 |
|---|---|---|
| committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2026-08-07 15:59:22 +0200 |
| commit | e5e415262330bd70f983e091d8919d9dcd99e475 (patch) | |
| tree | 03e533ce1894602dd9997522b362d647d3feab52 /scripts/Makefile.thinlto | |
| parent | 5ee37db34637ca6e33ce01d7062cb31275484404 (diff) | |
| download | linux-stable-e5e415262330bd70f983e091d8919d9dcd99e475.tar.gz linux-stable-e5e415262330bd70f983e091d8919d9dcd99e475.zip | |
mtd: rawnand: validate ONFI extended parameter page sections
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.
Fixes: 6dcbe0cdd83f ("mtd: get the ECC info from the Extended Parameter Page")
Cc: stable@vger.kernel.org
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
