linux/sound/soc/renesas/rcar
Denis Rastyogin f9e437cddf
ASoC: rsnd: Fix potential out-of-bounds access of component_dais[]
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: 547b02f74e ("ASoC: rsnd: enable multi Component support for Audio Graph Card/Card2")
Signed-off-by: Denis Rastyogin <gerben@altlinux.org>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/20260327103311.459239-1-gerben@altlinux.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-03 13:37:20 +01:00
..
adg.c ASoC: renesas: rsnd: enable to use "adg" clock 2025-04-26 02:17:36 +01:00
cmd.c
core.c ASoC: rsnd: Fix potential out-of-bounds access of component_dais[] 2026-04-03 13:37:20 +01:00
ctu.c ASoC: renesas: Use helper function for_each_child_of_node_scoped() 2025-06-08 23:30:48 +01:00
debugfs.c
dma.c ASoC: renesas: Use helper function for_each_child_of_node_scoped() 2025-06-08 23:30:48 +01:00
dvc.c ASoC: renesas: Use helper function for_each_child_of_node_scoped() 2025-06-08 23:30:48 +01:00
gen.c
Makefile ASoC: renesas: add MSIOF sound support 2025-04-26 02:17:37 +01:00
mix.c ASoC: renesas: Use helper function for_each_child_of_node_scoped() 2025-06-08 23:30:48 +01:00
msiof.c ASoC: renesas: name back to pcm_new()/pcm_free() 2026-03-16 13:37:58 +00:00
rsnd.h ASoC: rsnd: don't indicate warning on rsnd_kctrl_accept_runtime() 2025-02-05 12:28:13 +00:00
src.c ASoC: renesas: rsnd: Use guard() for spin locks 2025-09-08 15:42:04 +01:00
ssi.c ASoC: renesas: rsnd: Use guard() for spin locks 2025-09-08 15:42:04 +01:00
ssiu.c ASoC: rsnd: fix OF node reference leak in rsnd_ssiu_probe() 2025-11-13 00:36:01 +00:00