mtd: partitions: redboot: Added conversion of operands to a larger type
authorDenis Arefev <arefev@swemel.ru>
Fri, 15 Mar 2024 09:37:58 +0000 (12:37 +0300)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 25 Mar 2024 10:17:16 +0000 (11:17 +0100)
commit1162bc2f8f5de7da23d18aa4b7fbd4e93c369c50
tree9088f8ec729b463940e94d7e597395117de8b30f
parent26729dbb53ac575635ef96ece0442165efa9613f
mtd: partitions: redboot: Added conversion of operands to a larger type

The value of an arithmetic expression directory * master->erasesize is
subject to overflow due to a failure to cast operands to a larger data
type before perfroming arithmetic

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Denis Arefev <arefev@swemel.ru>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20240315093758.20790-1-arefev@swemel.ru
drivers/mtd/parsers/redboot.c