From: HyeongJun An <sammiee5311@gmail.com>
To: Mark Brown <broonie@kernel.org>, Liam Girdwood <lgirdwood@gmail.com>
Cc: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
HyeongJun An <sammiee5311@gmail.com>
Subject: [PATCH 0/4] ASoC: Validate written enum values in custom controls
Date: Tue, 9 Jun 2026 21:43:12 +0900 [thread overview]
Message-ID: <20260609124317.38046-1-sammiee5311@gmail.com> (raw)
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
next reply other threads:[~2026-06-09 12:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-09 12:43 HyeongJun An [this message]
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 ` [PATCH 3/4] ASoC: fsl: fsl_audmix: " HyeongJun An
2026-06-12 10:36 ` Shengjiu Wang
2026-06-09 12:43 ` [PATCH 4/4] ASoC: tegra: tegra210_ahub: Validate written enum value HyeongJun An
2026-06-11 19:44 ` [PATCH 0/4] ASoC: Validate written enum values in custom controls Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260609124317.38046-1-sammiee5311@gmail.com \
--to=sammiee5311@gmail.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®