[lvc-project] [PATCH] mtd: nand: ecc-mxic: Fix use of uninitialized variable ret
Miquel Raynal
miquel.raynal at bootlin.com
Tue Apr 29 12:26:34 MSK 2025
On Wed, 09 Apr 2025 00:39:06 +0300, Mikhail Arkhipov wrote:
> If ctx->steps is zero, the loop processing ECC steps is skipped,
> and the variable ret remains uninitialized. It is later checked
> and returned, which leads to undefined behavior and may cause
> unpredictable results in user space or kernel crashes.
>
> This scenario can be triggered in edge cases such as misconfigured
> geometry, ECC engine misuse, or if ctx->steps is not validated
> after initialization.
>
> [...]
Applied to nand/next, thanks!
[1/1] mtd: nand: ecc-mxic: Fix use of uninitialized variable ret
commit: d95846350aac72303036a70c4cdc69ae314aa26d
Patche(s) should be available on mtd/linux.git and will be
part of the next PR (provided that no robot complains by then).
Kind regards,
Miquèl
More information about the lvc-project
mailing list