Re: [PATCH 0/2] spi: cadence-xspi: two memory-safety fixes in the slave-DMA paths

From: Mark Brown

Date: Thu Oct 15 2026 - 11:40:40 EST


On Tue, 29 Sep 2026 16:11:43 +0800, Weibin Liu wrote:
> spi: cadence-xspi: two memory-safety fixes in the slave-DMA paths
>
> While reviewing the slave-DMA handling of the Cadence XSPI driver I
> found two ways in which memory the SPI core handed to the driver can be
> overrun:
>
> 1/2 both SDMA handlers copy the byte count reported by SDMA_SIZE_REG
> without checking it against the requested transfer length; a
> device reporting more bytes than were programmed makes the
> handlers walk past the end of the transfer buffers
>
> [...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-7.4

Thanks!

[1/2] spi: cadence-xspi: reject SDMA transfers larger than the requested length
https://git.kernel.org/broonie/spi/c/ea9854a169e9
[2/2] spi: cadence-xspi: fix stack buffer overflow in the Marvell b0 path
https://git.kernel.org/broonie/spi/c/ef9690269999

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark