[PATCH 0/4] ASoC: Validate written enum values in custom controls
From: HyeongJun An
Date: Tue Jun 09 2026 - 08:51:58 EST
Some custom ASoC kcontrol put() handlers use the written enum value
(ucontrol->value.enumerated.item[0]) to index a table or compute a bit
shift before validating that the value is within the control's enum range.
An out-of-range value written from userspace is therefore consumed before
it is rejected.
This is the same class addressed for the Meson codecs in commit
1e001206804b ("ASoC: meson: g12a-tohdmitx: Validate written enum values")
and commit 3150b70e944e ("ASoC: meson: g12a-toacodec: Validate written
enum values").
Fix four more instances:
- hdac_hdmi reads e->texts[item] before validation.
- aiu converts the item before validating it.
- fsl_audmix converts the item and uses the result before validation.
- tegra210_ahub reads e->values[item] before validation.
HyeongJun An (4):
ASoC: codecs: hdac_hdmi: Validate written enum value
ASoC: meson: aiu: Validate written enum values
ASoC: fsl: fsl_audmix: Validate written enum values
ASoC: tegra: tegra210_ahub: Validate written enum value
sound/soc/codecs/hdac_hdmi.c | 4 +++-
sound/soc/fsl/fsl_audmix.c | 6 ++++++
sound/soc/meson/aiu-acodec-ctrl.c | 3 +++
sound/soc/meson/aiu-codec-ctrl.c | 3 +++
sound/soc/tegra/tegra210_ahub.c | 4 +++-
5 files changed, 18 insertions(+), 2 deletions(-)
--
2.43.0