]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commitf256fc525c2ec33f59174f0a7056a9772fe9866c
tree8126ef913158fdd4de95470b905f7a8008ef099d
parent4e97317a3bae7a7d51d4afada3fcf54f334f6b00
ASoC: dapm: fix out-of-bounds accesses to DAPM lookup tables

BugLink: https://bugs.launchpad.net/bugs/1837952
[ 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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
sound/soc/soc-dapm.c