linux/drivers/mtd/nand/onenand
Ivan Stepchenko 70a71f8151 mtd: onenand: Fix uninitialized retlen in do_otp_read()
The function do_otp_read() does not set the output parameter *retlen,
which is expected to contain the number of bytes actually read.
As a result, in onenand_otp_walk(), the tmp_retlen variable remains
uninitialized after calling do_otp_walk() and used to change
the values of the buf, len and retlen variables.

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

Fixes: 49dc08eeda ("[MTD] [OneNAND] fix numerous races")
Cc: stable@vger.kernel.org
Signed-off-by: Ivan Stepchenko <sid@itb.spb.ru>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
2024-12-05 11:11:00 +01:00
..
generic.c mtd: Switch back to struct platform_driver::remove() 2024-10-21 11:58:07 +02:00
Kconfig mtd: onenand: omap2: Drop obsolete dependency on COMPILE_TEST 2023-04-11 15:42:23 +02:00
Makefile
onenand_base.c mtd: onenand: Fix uninitialized retlen in do_otp_read() 2024-12-05 11:11:00 +01:00
onenand_bbt.c
onenand_omap2.c mtd: Switch back to struct platform_driver::remove() 2024-10-21 11:58:07 +02:00
onenand_samsung.c mtd: Switch back to struct platform_driver::remove() 2024-10-21 11:58:07 +02:00
samsung.h