From: Mark Brown Date: Thu, 11 Jun 2026 19:44:46 +0000 (+0100) Subject: ASoC: Validate written enum values in custom controls X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed8676d99fe6a11e9231d70bc4990ad289359765;p=thirdparty%2Flinux.git ASoC: Validate written enum values in custom controls HyeongJun An says: 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. Link: https://patch.msgid.link/20260609124317.38046-1-sammiee5311@gmail.com --- ed8676d99fe6a11e9231d70bc4990ad289359765