linux/drivers/firmware/cirrus/test
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
..
cs_dsp_mock_bin.c firmware: cs_dsp: Fix OOB memory read access in KUnit test 2025-05-23 15:03:48 +01:00
cs_dsp_mock_mem_maps.c ASoC: Merge up fixes 2025-04-24 12:55:06 +01:00
cs_dsp_mock_regmap.c
cs_dsp_mock_utils.c
cs_dsp_mock_wmfw.c firmware: cs_dsp: Fix OOB memory read access in KUnit test (wmfw info) 2025-05-26 11:33:51 +01:00
cs_dsp_test_bin.c firmware: cs_dsp: test_bin_error: Fix uninitialized data used as fw version 2025-04-10 14:47:14 +01:00
cs_dsp_test_bin_error.c firmware: cs_dsp: test_bin_error: Fix uninitialized data used as fw version 2025-04-10 14:47:14 +01:00
cs_dsp_test_callbacks.c firmware: cs_dsp: Add KUnit testing of client callbacks 2024-12-13 13:14:48 +00:00
cs_dsp_test_control_cache.c firmware: cs_dsp: Fix OOB memory read access in KUnit test (ctl cache) 2025-05-26 11:33:52 +01:00
cs_dsp_test_control_parse.c firmware: cs_dsp: test_control_parse: null-terminate test strings 2025-02-19 23:08:31 +00:00
cs_dsp_test_control_rw.c firmware: cs_dsp: Add KUnit testing of control read/write 2024-12-13 13:14:45 +00:00
cs_dsp_test_wmfw.c firmware: cs_dsp: Add KUnit testing of wmfw download 2024-12-13 13:14:42 +00:00
cs_dsp_test_wmfw_error.c firmware: cs_dsp: Add KUnit testing of wmfw error cases 2024-12-13 13:14:47 +00:00
cs_dsp_tests.c firmware: cs_dsp: Add KUnit testing of bin file download 2024-12-13 13:14:41 +00:00
Makefile firmware: cs_dsp: Add KUnit testing of client callbacks 2024-12-13 13:14:48 +00:00