summaryrefslogtreecommitdiff
path: root/scripts/objdiff
diff options
context:
space:
mode:
authorPengpeng Hou <pengpeng@iscas.ac.cn>2026-07-08 09:49:06 +0800
committerMiquel Raynal <miquel.raynal@bootlin.com>2026-07-17 17:49:18 +0200
commite9290031f736e99ad17c25c00311c92c266843b7 (patch)
tree6e899f150e65035b46914c39bffcb6418accbda3 /scripts/objdiff
parentdf6f582df3377af316a60ca8ee0d590b2d03924d (diff)
downloadlinux-e9290031f736e99ad17c25c00311c92c266843b7.tar.gz
linux-e9290031f736e99ad17c25c00311c92c266843b7.zip
mtd: afs: validate v2 image info bounds
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 are 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. Fixes: b7cf5e2830bb ("mtd: afs: add v2 partition parsing") Cc: stable@vger.kernel.org Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn> Acked-by: Linus Walleij <linusw@kernel.org> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'scripts/objdiff')
0 files changed, 0 insertions, 0 deletions