2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/drivers/firmware/cirrus
Jaroslav Kysela f4ba2ea57d
firmware: cs_dsp: Fix OOB memory read access in KUnit test (ctl cache)
KASAN reported out of bounds access - cs_dsp_ctl_cache_init_multiple_offsets().
The code uses mock_coeff_template.length_bytes (4 bytes) for register value
allocations. But later, this length is set to 8 bytes which causes
test code failures.

As fix, just remove the lenght override, keeping the original value 4
for all operations.

Cc: Simon Trimmer <simont@opensource.cirrus.com>
Cc: Charles Keepax <ckeepax@opensource.cirrus.com>
Cc: Richard Fitzgerald <rf@opensource.cirrus.com>
Cc: patches@opensource.cirrus.com
Cc: stable@vger.kernel.org
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20250523154151.1252585-1-perex@perex.cz
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-26 11:33:52 +01:00
..
test firmware: cs_dsp: Fix OOB memory read access in KUnit test (ctl cache) 2025-05-26 11:33:52 +01:00
cs_dsp.c firmware: cs_dsp: Ensure cs_dsp_load[_coeff]() returns 0 on success 2025-03-25 14:21:51 +00:00
Kconfig firmware: cs_dsp: tests: Depend on FW_CS_DSP rather then enabling it 2025-04-13 20:20:30 +01:00
Makefile firmware: cs_dsp: Add mock regmap for KUnit testing 2024-12-13 13:14:37 +00:00