android_kernel_motorola_sm6375/drivers/mtd
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ivan Stepchenko a0d2de5561 mtd: fix possible integer overflow in erase_xfer()
[ Upstream commit 9358bdb9f9f54d94ceafc650deffefd737d19fdd ]

The expression '1 << EraseUnitSize' is evaluated in int, which causes
a negative result when shifting by 31 - the upper bound of the valid
range [10, 31], enforced by scan_header(). This leads to incorrect
extension when storing the result in 'erase->len' (uint64_t), producing
a large unexpected value.

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

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Ivan Stepchenko <[email protected]>
Signed-off-by: Miquel Raynal <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2025-08-28 16:21:20 +02:00
..
chips mtd: cfi_cmdset_0001: Byte swap OTP info 2023-12-08 08:44:27 +01:00
devices mtd: powernv: Add check devm_kasprintf() returned value 2024-11-08 16:20:28 +01:00
hyperbus
lpddr
maps mtd: maps: physmap-core: fix flash size larger than 32-bit 2024-03-26 18:22:21 -04:00
nand mtd: nand: sunxi: Add randomizer configuration before randomizer enable 2025-06-27 11:02:52 +01:00
parsers mtd: partitions: redboot: Added conversion of operands to a larger type 2024-07-05 09:08:27 +02:00
spi-nor
tests mtd: make mtd_test.c a separate module 2024-08-19 05:33:33 +02:00
ubi ubi: fastmap: Fix duplicate slab cache names while attaching 2024-12-14 19:44:40 +01:00
ftl.c mtd: fix possible integer overflow in erase_xfer() 2025-08-28 16:21:20 +02:00
inftlcore.c mtd: inftlcore: Add error check for inftl_read_oob() 2025-05-02 07:39:16 +02:00
inftlmount.c
Kconfig
Makefile
mtd_blkdevs.c mtd: Fix gluebi NULL pointer dereference caused by ftl notifier 2024-01-25 14:34:23 -08:00
mtdblock.c
mtdblock_ro.c
mtdchar.c
mtdconcat.c
mtdcore.c
mtdcore.h
mtdoops.c
mtdpart.c
mtdsuper.c
mtdswap.c
nftlcore.c
nftlmount.c
rfd_ftl.c
sm_ftl.c
sm_ftl.h
ssfdc.c