Messages in this thread | | | From | Miquel Raynal <> | Subject | Re: [PATCH] mtd: physmap: physmap-bt1-rom: Fix unintentional stack access | Date | Tue, 2 Mar 2021 18:14:50 +0100 |
| |
On Fri, 2021-02-12 at 10:40:22 UTC, "Gustavo A. R. Silva" wrote: > Cast &data to (char *) in order to avoid unintentionally accessing > the stack. > > Notice that data is of type u32, so any increment to &data > will be in the order of 4-byte chunks, and this piece of code > is actually intended to be a byte offset. > > Fixes: b3e79e7682e0 ("mtd: physmap: Add Baikal-T1 physically mapped ROM support") > Addresses-Coverity-ID: 1497765 ("Out-of-bounds access") > Cc: stable@vger.kernel.org > Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> > Acked-by: Serge Semin <fancer.lancer@gmail.com>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel
| |