]> git.baikalelectronics.ru Git - kernel.git/commit
spi: spi-zynqmp-gqspi: Resolved slab-out-of-bounds bug
authorAmit Kumar Mahapatra <amit.kumar-mahapatra@xilinx.com>
Fri, 16 Apr 2021 00:46:50 +0000 (08:46 +0800)
committerMark Brown <broonie@kernel.org>
Fri, 16 Apr 2021 12:44:13 +0000 (13:44 +0100)
commit30ef067077323f2a4f53481d5dd2eaa2ffce0480
tree0d2d7ac6658c973f96fbe78a43fc34c9fb8016b3
parent075fdc26992d5a80453991e70137029d3416572f
spi: spi-zynqmp-gqspi: Resolved slab-out-of-bounds bug

During a transfer the driver filled the fifo with 4bytes,
even if the data that needs to be transfer is less that 4bytes.
This resulted in slab-out-of-bounds bug in KernelAddressSanitizer.

This patch resolves slab-out-of-bounds bug by filling the fifo
with the number of bytes that needs to transferred.

Signed-off-by: Amit Kumar Mahapatra <amit.kumar-mahapatra@xilinx.com>
Link: https://lore.kernel.org/r/20210416004652.2975446-4-quanyang.wang@windriver.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-zynqmp-gqspi.c