anolis-cloud-kernel/drivers/mtd
Richard Weinberger 4bad2cd190 ubi: Check for too small LEB size in VTBL code
ANBZ: #15901

commit 68a24aba7c upstream.

If the LEB size is smaller than a volume table record we cannot
have volumes.
In this case abort attaching.

Cc: Chenyuan Yang <cy54@illinois.edu>
Cc: stable@vger.kernel.org
Fixes: 801c135ce7 ("UBI: Unsorted Block Images")
Reported-by: Chenyuan Yang <cy54@illinois.edu>
Closes: https://lore.kernel.org/linux-mtd/1433EB7A-FC89-47D6-8F47-23BE41B263B3@illinois.edu/
Signed-off-by: Richard Weinberger <richard@nod.at>
Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com>
Fixes: CVE-2024-25739
Signed-off-by: Wang Yaxin <wang.yaxin@zte.com.cn>
Reviewed-by: Guixin Liu <kanie@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/5143
2025-04-24 11:20:59 +00:00
..
chips mtd: cfi_cmdset_0002: Use chip_ready() for write on S29GL064N 2022-06-09 10:21:25 +02:00
devices
hyperbus mtd: hyperbus: rpc-if: fix bug in rpcif_hb_remove 2022-01-27 10:53:50 +01:00
lpddr
maps mtd: physmap-core: Fix NULL pointer dereferencing in of_select_probe_type() 2023-02-15 02:53:21 +00:00
nand anolis: nand: add phytium 5.10 nand controller driver 2023-10-07 04:37:01 +00:00
parsers
spi-nor spi: intel-pci: Add support for Granite Rapids SPI serial flash 2024-03-07 02:16:42 +00:00
tests
ubi ubi: Check for too small LEB size in VTBL code 2025-04-24 11:20:59 +00:00
Kconfig
Makefile
ftl.c
inftlcore.c
inftlmount.c
mtd_blkdevs.c
mtdblock.c
mtdblock_ro.c
mtdchar.c
mtdconcat.c mtd: mtdconcat: Check _read, _write callbacks existence before assignment 2021-09-22 12:28:03 +02:00
mtdcore.c mtd: call bdi_unregister explicitly 2023-11-17 06:50:20 +00:00
mtdcore.h
mtdoops.c
mtdpart.c mtd: Fixed breaking list in __mtd_del_partition. 2022-01-27 10:53:41 +01:00
mtdpstore.c
mtdsuper.c
mtdswap.c
nftlcore.c
nftlmount.c
rfd_ftl.c
sm_ftl.c
sm_ftl.h
ssfdc.c