WSL2-Linux-Kernel/sound/soc/sof
Pierre-Louis Bossart 180a1632b6 ASoC: SOF: Intel: hda-dai: fix possible stream_tag leak
commit 1f810d2b6b upstream.

The HDaudio stream allocation is done first, and in a second step the
LOSIDV parameter is programmed for the multi-link used by a codec.

This leads to a possible stream_tag leak, e.g. if a DisplayAudio link
is not used. This would happen when a non-Intel graphics card is used
and userspace unconditionally uses the Intel Display Audio PCMs without
checking if they are connected to a receiver with jack controls.

We should first check that there is a valid multi-link entry to
configure before allocating a stream_tag. This change aligns the
dma_assign and dma_cleanup phases.

Complements: b0cd60f3e9 ("ALSA/ASoC: hda: clarify bus_get_link() and bus_link_get() helpers")
Link: https://github.com/thesofproject/linux/issues/4151
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230216162340.19480-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-02-22 12:57:11 +01:00
..
imx ASoC: SOF: Add missing of_node_put() in imx8m_probe 2022-04-08 14:23:21 +02:00
intel ASoC: SOF: Intel: hda-dai: fix possible stream_tag leak 2023-02-22 12:57:11 +01:00
xtensa ASoC: SOF: Fix DSP oops stack dump output contents 2021-09-15 13:07:51 +01:00
Kconfig ASoC: SOF: add Kconfig option for probe workqueues 2021-04-12 17:05:50 +01:00
Makefile ASoC: SOF: pci: split PCI into different drivers 2021-03-02 15:32:00 +01:00
compress.c ASoC: SOF: Intel: Constify sof_probe_compressed_ops 2021-06-01 14:05:15 +01:00
compress.h ASoC: SOF: Intel: Constify sof_probe_compressed_ops 2021-06-01 14:05:15 +01:00
control.c ASoC: SOF: control: override volume info callback 2020-11-20 13:49:05 +00:00
core.c ASoC: SOF: loader: release_firmware() on load failure to avoid batching 2021-09-16 14:01:54 +01:00
debug.c ASoC: SOF: debug: Fix potential buffer overflow by snprintf() 2022-08-25 11:40:19 +02:00
ipc.c ASoC: SOF: relax ABI checks and avoid unnecessary warnings 2021-02-11 17:31:56 +00:00
loader.c ASoC: SOF: loader: Re-phrase the missing firmware error to avoid duplication 2021-09-16 14:01:55 +01:00
nocodec.c ASOC: SOF: simplify nocodec mode 2021-04-12 17:05:55 +01:00
ops.c ASoC: SOF: modify the SOF_DBG flags 2020-12-11 13:22:57 +00:00
ops.h ASoC: SOF: ops: don't return void value 2021-05-21 13:13:40 +01:00
pcm.c ASoC: SOF: pcm: export snd_pcm_dai_link_fixup 2021-04-12 17:05:54 +01:00
pm.c ASoC: SOF: reset enabled_cores state at suspend 2021-06-01 14:03:01 +01:00
probe.c ASoC: SOF/Intel: clarify SPDX license with GPL-2.0-only 2020-05-01 17:45:24 +01:00
probe.h ASoC: SOF: Replace zero-length array with flexible-array 2020-06-15 23:08:32 -05:00
sof-acpi-dev.c ASoC: SOF: Check desc->ops directly in acpi/pci/of probe functions 2021-05-21 13:13:35 +01:00
sof-acpi-dev.h ASoC: SOF: ACPI: avoid reverse module dependency 2021-03-02 15:31:40 +01:00
sof-audio.c ASoC: SOF: add a helper to get topology configured bclk 2021-07-11 23:48:30 +01:00
sof-audio.h ASoC: SOF: parse multiple SSP DAI and hw configs 2021-03-29 17:28:17 +01:00
sof-of-dev.c ASoC: SOF: Check desc->ops directly in acpi/pci/of probe functions 2021-05-21 13:13:35 +01:00
sof-pci-dev.c ASoC: SOF: pci: Change DMI match info to support all Chrome platforms 2022-10-26 12:35:41 +02:00
sof-pci-dev.h ASoC: SOF: pci: split PCI into different drivers 2021-03-02 15:32:00 +01:00
sof-priv.h ASoC: SOF: change signature of set_mach_params() callback 2021-04-12 17:05:52 +01:00
topology.c ASoC: SOF: topology: do not power down primary core during topology removal 2021-11-18 19:16:50 +01:00
trace.c ASoC: SOF: trace: Omit error print when waking up trace sleepers 2021-09-17 13:16:36 +01:00
utils.c ASoC: SOF/Intel: clarify SPDX license with GPL-2.0-only 2020-05-01 17:45:24 +01:00