diff options
| author | James Hilliard <james.hilliard1@gmail.com> | 2026-08-11 00:02:01 -0600 |
|---|---|---|
| committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2026-09-04 20:05:58 +0200 |
| commit | a8596bb7148136b9e83980900d508d0ef86507ef (patch) | |
| tree | 7ce66664e71c6e8265b1d0e4a856806ac817b397 /scripts/Makefile.thinlto | |
| parent | bde8fd880d84627072c224729c818306c4b30d58 (diff) | |
| download | linux-next-a8596bb7148136b9e83980900d508d0ef86507ef.tar.gz linux-next-a8596bb7148136b9e83980900d508d0ef86507ef.zip | |
mtd: rawnand: sunxi: use a stack buffer for BBM randomization
Variable protected user-data lengths replaced the original four-byte
stack buffer with a heap allocation before compensating the bad block
marker. The allocation is unchecked, and a zero length returns
ZERO_SIZE_PTR which sunxi_nfc_randomize_bbm() dereferences.
The controller supports at most 32 protected user-data bytes per ECC
step, so use a zero-initialized buffer of that bounded size. This
removes the allocation failure path and keeps zero-sized invalid layouts
from dereferencing ZERO_SIZE_PTR.
Fixes: 54dcd6aa69db ("mtd: rawnand: sunxi: introduce maximize variable user data length")
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
