Re: [PATCH] ASoC: rsnd: Fix potential out-of-bounds access of component_dais[]
From: Kuninori Morimoto
Date: Wed Apr 01 2026 - 23:02:03 EST
Hi
> From: Denis Rastyogin <gerben@xxxxxxxxxxxx>
>
> component_dais[RSND_MAX_COMPONENT] is initially zero-initialized
> and later populated in rsnd_dai_of_node(). However, the existing boundary check:
> if (i >= RSND_MAX_COMPONENT)
>
> does not guarantee that the last valid element remains zero. As a result,
> the loop can rely on component_dais[RSND_MAX_COMPONENT] being zero,
> which may lead to an out-of-bounds access.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Fixes: 547b02f74e4a ("ASoC: rsnd: enable multi Component support for Audio Graph Card/Card2")
> Signed-off-by: Denis Rastyogin <gerben@xxxxxxxxxxxx>
> ---
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
# I'm not sure why, but sometimes the mail is not comming to my mailbox
# even though it has To/Cc to me.
# I couldn't find it on spam folder either...
# I have noticed this patch via lore.kernel.org
Thank you for your help !!
Best regards
---
Kuninori Morimoto