aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2019-02-01 11:05:12 -0600
committerMark Brown <broonie@kernel.org>2019-02-02 17:13:09 +0100
commit199ed3e81c49a621ce6fcb630ab9f30d92db6718 (patch)
tree9b0e819eddbf9869c13923d475a7d8aa78ecac81 /include/sound
parentASoC: mediatek: add btcvsd driver (diff)
downloadlinux-dev-199ed3e81c49a621ce6fcb630ab9f30d92db6718.tar.xz
linux-dev-199ed3e81c49a621ce6fcb630ab9f30d92db6718.zip
ASoC: dapm: fix use-after-free issue with dailink sname
Commit 7620fe9161ce ("ASoC: topology: fix memory leak in soc_tplg_dapm_widget_create") fixed a memory leak issue, but additional tests and KASAN reports show a use-after-free in soc-dapm. The widgets are created with a kmemdup operating on a template. The "name" string is also duplicated, but the "sname" string is not. As a result, when the template is freed after widget creation, its sname string is still used. Fix by explicitly duplicating the "sname" string, and freeing it when required. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound')
0 files changed, 0 insertions, 0 deletions