All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] ASoC: Validate written enum values in custom controls
@ 2026-06-09 12:43 HyeongJun An
  2026-06-09 12:43 ` [PATCH 1/4] ASoC: codecs: hdac_hdmi: Validate written enum value HyeongJun An
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: HyeongJun An @ 2026-06-09 12:43 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Jaroslav Kysela, Takashi Iwai, linux-sound, linux-kernel,
	HyeongJun An

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-06-09 12:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-09 12:43 [PATCH 0/4] ASoC: Validate written enum values in custom controls HyeongJun An
2026-06-09 12:43 ` [PATCH 1/4] ASoC: codecs: hdac_hdmi: Validate written enum value HyeongJun An
2026-06-09 12:43 ` [PATCH 2/4] ASoC: meson: aiu: Validate written enum values HyeongJun An
2026-06-09 12:43   ` HyeongJun An
2026-06-09 12:57   ` sashiko-bot
2026-06-09 12:43 ` [PATCH 3/4] ASoC: fsl: fsl_audmix: " HyeongJun An
2026-06-09 12:43 ` [PATCH 4/4] ASoC: tegra: tegra210_ahub: Validate written enum value HyeongJun An

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.