2023-07-13 08:15:46

by Miquel Raynal

[permalink] [raw]
Subject: Re: [PATCH v4 4/5] mtd: rawnand: brcmnand: Fix potential out-of-bounds access in oob write

On Thu, 2023-07-06 at 18:29:08 UTC, William Zhang wrote:
> When the oob buffer length is not in multiple of words, the oob write
> function does out-of-bounds read on the oob source buffer at the last
> iteration. Fix that by always checking length limit on the oob buffer
> read and fill with 0xff when reaching the end of the buffer to the oob
> registers.
>
> Fixes: 27c5b17cd1b1 ("mtd: nand: add NAND driver "library" for Broadcom STB NAND controller")
> Signed-off-by: William Zhang <[email protected]>
> Reviewed-by: Florian Fainelli <[email protected]>
> Cc: [email protected]

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

Miquel