]> git.ipfire.org Git - thirdparty/linux.git/commit
firmware: cs_dsp: Fix OOB memory read access in KUnit test (wmfw info)
authorJaroslav Kysela <perex@perex.cz>
Fri, 23 May 2025 15:58:14 +0000 (17:58 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 26 May 2025 10:33:51 +0000 (11:33 +0100)
commitd979b783d61f7f1f95664031b71a33afc74627b2
tree8cc46dac1b021fd14761eeec16570e604ccaed4c
parent43a38a0ff8c63ee156d997cd13063c63cd55d812
firmware: cs_dsp: Fix OOB memory read access in KUnit test (wmfw info)

KASAN reported out of bounds access - cs_dsp_mock_wmfw_add_info(),
because the source string length was rounded up to the allocation size.

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/20250523155814.1256762-1-perex@perex.cz
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/firmware/cirrus/test/cs_dsp_mock_wmfw.c