]> git.ipfire.org Git - thirdparty/linux.git/commit
ASoC: tas2562: Validate values for volume writes
authorMark Brown <broonie@kernel.org>
Wed, 15 Jul 2026 20:18:09 +0000 (21:18 +0100)
committerMark Brown <broonie@kernel.org>
Sun, 19 Jul 2026 21:03:22 +0000 (22:03 +0100)
commit8fb41964f7e4e4207c8999af2056894caa7a252a
tree28b9a37460c91038731499b58c4a691a2fe66474
parent1590cf0329716306e948a8fc29f1d3ee87d3989f
ASoC: tas2562: Validate values for volume writes

tas2562_volume_control_put() does not do any validation of the control
value written by userspace, it uses it to look up a value in a fixed
size array which can easily be overflowed and then writes whatever value
it gets back to the device.  Add validation that we are loading a value
we have in the array.

Cc: stable@vger.kernel.org
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20260715-asoc-tas2562-put-retval-v1-1-97bf467c924e@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/tas2562.c