kernel_optimize_test/sound/soc
Xiaomeng Tong 43a2a3734a ASoC: soc-dapm: fix two incorrect uses of list iterator
commit f730a46b931d894816af34a0ff8e4ad51565b39f upstream.

These two bug are here:
	list_for_each_entry_safe_continue(w, n, list,
					power_list);
	list_for_each_entry_safe_continue(w, n, list,
					power_list);

After the list_for_each_entry_safe_continue() exits, the list iterator
will always be a bogus pointer which point to an invalid struct objdect
containing HEAD member. The funciton poniter 'w->event' will be a
invalid value which can lead to a control-flow hijack if the 'w' can be
controlled.

The original intention was to continue the outer list_for_each_entry_safe()
loop with the same entry if w->event is NULL, but misunderstanding the
meaning of list_for_each_entry_safe_continue().

So just add a 'continue;' to fix the bug.

Cc: stable@vger.kernel.org
Fixes: 163cac061c ("ASoC: Factor out DAPM sequence execution")
Signed-off-by: Xiaomeng Tong <xiam0nd.tong@gmail.com>
Link: https://lore.kernel.org/r/20220329012134.9375-1-xiam0nd.tong@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-27 13:53:55 +02:00
..
adi
amd ASoC: amd: Fix reference to PCM buffer address 2021-08-18 08:59:05 +02:00
atmel ASoC: atmel: Remove system clock tree configuration for at91sam9g20ek 2022-04-27 13:53:47 +02:00
au1x
bcm
cirrus
codecs ASoC: codecs: wcd934x: do not switch off SIDO Buck when codec is in use 2022-04-27 13:53:48 +02:00
dwc ASoC: dwc-i2s: Handle errors for clk_enable 2022-04-08 14:40:09 +02:00
fsl ASoC: imx-es8328: Fix error return code in imx_es8328_probe() 2022-04-08 14:40:11 +02:00
generic ASoC: generic: simple-card-utils: remove useless assignment 2022-04-08 14:40:05 +02:00
hisilicon ASoC: hisilicon: fix missing clk_disable_unprepare() on error in hi6210_i2s_startup() 2021-07-14 16:56:37 +02:00
img ASoC: img: Fix PM reference leak in img_i2s_in_probe() 2021-07-20 16:05:42 +02:00
intel ASoC: Intel: catpt: Test dmaengine_submit() result before moving on 2022-01-27 10:54:08 +01:00
jz4740 ASoC: jz4740-i2s: add missed checks for clk_get() 2020-12-30 11:53:35 +01:00
kirkwood
mediatek ASoC: mediatek: mt8183: fix device_node leak 2022-01-27 10:54:24 +01:00
meson ASoC: meson: aiu: Move AIU_I2S_MISC hold setting to aiu-fifo-i2s 2021-12-29 12:26:01 +01:00
mxs ASoC: mxs: Fix error handling in mxs_sgtl5000_probe 2022-04-08 14:40:10 +02:00
pxa
qcom ASoC: qdsp6: q6routing: Fix return value from msm_routing_put_audio_mixer 2021-12-14 11:32:41 +01:00
rockchip ASoC: rockchip: i2s: Fix missing clk_disable_unprepare() in rockchip_i2s_probe 2022-04-08 14:40:10 +02:00
samsung ASoC: samsung: idma: Check of ioremap return value 2022-01-27 10:54:08 +01:00
sh ASoC: fsi: Add check for clk_enable 2022-04-08 14:40:10 +02:00
sirf
sof ASoC: SOF: Intel: Fix NULL ptr dereference when ENOMEM 2022-04-08 14:40:39 +02:00
spear
sprd
sti ASoC: sti: Fix deadlock via snd_pcm_stop_xrun() call 2022-03-28 09:57:08 +02:00
stm ASoC: stm32: dfsdm: change rate limits 2020-10-08 20:44:40 +01:00
sunxi ASoC: sunxi: sun4i-codec: fill ASoC card owner 2021-04-14 08:42:08 +02:00
tegra ASoC: tegra: Fix kcontrol put callback in AHUB 2021-12-08 09:03:25 +01:00
ti ASoC: ti: davinci-i2s: Add check for clk_enable() 2022-04-08 14:40:08 +02:00
txx9
uniphier ASoC: uniphier: drop selecting non-existing SND_SOC_UNIPHIER_AIO_DMA 2022-01-27 10:54:05 +01:00
ux500
xilinx ASoC: xilinx: xlnx_formatter_pcm: Handle sysclk setting 2022-04-08 14:40:05 +02:00
xtensa
zte
Kconfig
Makefile
soc-ac97.c
soc-acpi.c
soc-card.c
soc-component.c ASoC: component: Remove misplaced prefix handling in pin control functions 2021-09-03 10:09:21 +02:00
soc-compress.c ASoC: soc-compress: Change the check for codec_dai 2022-04-08 14:40:42 +02:00
soc-core.c ASoC: soc-core: skip zero num_dai component in searching dai name 2022-04-08 14:40:35 +02:00
soc-dai.c ASoC: soc-dai: add mark for snd_soc_dai_startup/shutdown() 2020-09-28 17:01:42 +01:00
soc-dapm.c ASoC: soc-dapm: fix two incorrect uses of list iterator 2022-04-27 13:53:55 +02:00
soc-devres.c
soc-generic-dmaengine-pcm.c ASoC: dmaengine: do not use a NULL prepare_slave_config() callback 2022-04-08 14:40:10 +02:00
soc-jack.c
soc-link.c ASoC: soc-link: add mark for snd_soc_link_startup/shutdown() 2020-09-28 17:01:43 +01:00
soc-ops.c ASoC: ops: Shift tested values in snd_soc_put_volsw() by +min 2022-03-08 19:09:31 +01:00
soc-pcm.c ASoC: soc-pcm: fix the return value in dpcm_apply_symmetry() 2021-07-20 16:05:43 +02:00
soc-topology.c ASoC: topology: Allow TLV control to be either read or write 2022-04-08 14:40:44 +02:00
soc-utils.c