Re: [PATCH] ALSA: hda: Validate codec address before executing verb
From: Takashi Iwai
Date: Sun Dec 06 2026 - 06:10:29 EST
On Sat, 05 Dec 2026 11:17:35 +0100,
Sreeraj S Kurup wrote:
>
> snd_hdac_bus_exec_verb_unlocked() receives a codec address
> that is later passed to the response handling operation.
>
> An invalid codec address can lead to an out-of-bounds array
> access in the response handling path.
>
> Add a check using snd_BUG_ON() and return -EINVAL when the
> address is greater than or equal to HDA_MAX_CODECS.
>
> This protects verb execution from invalid addresses passed
> by existing callers as well as future callers, including
> paths that use custom get_response operations.
>
> Signed-off-by: Sreeraj S Kurup <sreekuttan2156239@xxxxxxxxx>
Applied to for-next branch. Thanks.
Takashi