Files
linux/drivers/mtd
Ivan Stepchenko 1cda594dfa mtd: onenand: Fix uninitialized retlen in do_otp_read()
commit 70a71f8151 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-02-17 10:05:41 +01:00
..
2025-02-17 10:05:24 +01:00
2022-09-19 18:14:53 +02:00
2023-06-22 23:00:43 +02:00