]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ASoC: codecs: fix out-of-bounds access on invalid clock config
authorQasim Ijaz <qasdev00@gmail.com>
Mon, 26 May 2025 19:18:20 +0000 (20:18 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 27 May 2025 11:12:17 +0000 (12:12 +0100)
commit16719d48197bbd8cff121b32acec67d954335437
treee313a11b6ba2ef8ad82fe3d32580cef5d901ec00
parentf4ba2ea57da51d616b689c4b8826c517ff5a8523
ASoC: codecs: fix out-of-bounds access on invalid clock config

get_coeff() returns â€“EINVAL when no table entry matches.
The driver then uses that value as an index into coeff_div[],
causing an OOB access.

To fix lets abort the hw_params call instead.

Fixes: de2b3119f9f7 ("ASoC: codecs: add support for ES8375")
Signed-off-by: Qasim Ijaz <qasdev00@gmail.com>
Link: https://patch.msgid.link/20250526191820.72577-1-qasdev00@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/es8375.c