]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ASoC: dapm: fix out-of-bounds accesses to DAPM lookup tables
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Tue, 5 Feb 2019 16:22:27 +0000 (10:22 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Mar 2019 13:35:11 +0000 (14:35 +0100)
commitf290aa86d93a9d77dd97a8ff7408d6445d116a25
tree7b8b9754eaab44b617b317c6d21292531021cffe
parent456697542ed15a781326907445f472486a34da83
ASoC: dapm: fix out-of-bounds accesses to DAPM lookup tables

[ Upstream commit c16e12010060c6c7a31f08b4a99513064cb53b7d ]

KASAN reports and additional traces point to out-of-bounds accesses to
the dapm_up_seq and dapm_down_seq lookup tables. The indices used are
larger than the array definition.

Fix by adding missing entries for the new widget types in these two
lookup tables, and align them with PGA values.

Also the sequences for the following widgets were not defined. Since
their values defaulted to zero, assign them explicitly

 snd_soc_dapm_input
 snd_soc_dapm_output
 snd_soc_dapm_vmid
 snd_soc_dapm_siggen
 snd_soc_dapm_sink

Fixes: 8a70b4544ef4 ('ASoC: dapm: Add new widget type for constructing DAPM graphs on DSPs.').
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/soc-dapm.c