linux/sound/soc/amd
Gaosheng Cui 3420fdb8ae
ASoC: amd: acp: Fix possible UAF in acp_dma_open
Smatch report warning as follows:

sound/soc/amd/acp/acp-platform.c:199 acp_dma_open() warn:
  '&stream->list' not removed from list

If snd_pcm_hw_constraint_integer() fails in acp_dma_open(),
stream will be freed, but stream->list will not be removed from
adata->stream_list, then list traversal may cause UAF.

Fix by adding the newly allocated stream to the list once it's fully
initialised.

Fixes: 7929985cfe ("ASoC: amd: acp: Initialize list to store acp_stream during pcm_open")
Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
Link: https://lore.kernel.org/r/20221118030056.3135960-1-cuigaosheng1@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-18 11:50:29 +00:00
..
acp ASoC: amd: acp: Fix possible UAF in acp_dma_open 2022-11-18 11:50:29 +00:00
include
ps ASoC: amd: ps: Move acp63_dev_data strcture from PCI driver 2022-11-16 13:29:12 +00:00
raven ASoC: amd: Migrate to new style legacy DAI naming flag 2022-06-27 13:16:30 +01:00
renoir ASoC: amd: Migrate to new style legacy DAI naming flag 2022-06-27 13:16:30 +01:00
rpl ASoC: amd: enable RPL Platform acp drivers build 2022-07-21 23:25:19 +01:00
vangogh ASoC: soc.h: remove num_cpus/codecs 2022-09-20 12:19:30 +01:00
yc ASoC: amd: yc: Add Lenovo Thinkbook 14+ 2022 21D0 to quirks table 2022-10-21 13:04:13 +01:00
acp3x-rt5682-max9836.c ASoC: soc-card: Create jack kcontrol without pins 2022-04-14 17:37:21 +01:00
acp-config.c ASoC: amd: acp: Add support for rt5682s and rt1019 card with hs instance 2022-06-06 12:35:01 +01:00
acp-da7219-max98357a.c ASoC: amd: Drop da7219_aad_jack_det() usage 2022-11-07 13:58:17 +00:00
acp-es8336.c ASoC: amd: Fix error pointer dereference 2022-07-13 13:48:53 +01:00
acp-pcm-dma.c ASoC: amd: add I2S MICSP instance support 2022-07-05 13:00:44 +01:00
acp-rt5645.c ASoC: soc-card: Create jack kcontrol without pins 2022-04-14 17:37:21 +01:00
acp.h ASoC: amd: add I2S MICSP instance support 2022-07-05 13:00:44 +01:00
Kconfig ASoC: amd: fix ACP version typo mistake 2022-11-04 12:25:08 +00:00
mach-config.h ASoC: amd: acp: Add support for nau8825 and max98360 card 2022-06-06 12:35:00 +01:00
Makefile ASoC: amd: enable Pink Sardine acp6.2 drivers build 2022-08-29 23:14:14 +01:00