ASoC: wm_adsp: Don't overrun firmware file buffer when reading region data
authorRichard Fitzgerald <rf@opensource.wolfsonmicro.com>
Tue, 20 Dec 2016 10:29:12 +0000 (10:29 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Nov 2017 08:39:14 +0000 (08:39 +0000)
commitc6d800b284c56815259ab216445ec63f90b63303
treef94cc2981dd13ce3773264c514d0e232b8bbe5ee
parent79dec0116f8ba872f7d40530c36f3c71d2a839ec
ASoC: wm_adsp: Don't overrun firmware file buffer when reading region data

[ Upstream commit 1cab2a84f470e15ecc8e5143bfe9398c6e888032 ]

Protect against corrupt firmware files by ensuring that the length we
get for the data in a region actually lies within the available firmware
file data buffer.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/soc/codecs/wm_adsp.c