* [PATCH 6.10] ASoC: SOF: ipc4-topology: Fix input format query of process modules without base extension
@ 2024-05-29 12:12 Peter Ujfalusi
2024-05-29 17:11 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Peter Ujfalusi @ 2024-05-29 12:12 UTC (permalink / raw)
To: lgirdwood, broonie
Cc: linux-sound, pierre-louis.bossart, kai.vehmanen,
ranjani.sridharan, stable, seppo.ingalsuo
If a process module does not have base config extension then the same
format applies to all of it's inputs and the process->base_config_ext is
NULL, causing NULL dereference when specifically crafted topology and
sequences used.
Fixes: 648fea128476 ("ASoC: SOF: ipc4-topology: set copier output format for process module")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Cc: stable@vger.kernel.org
---
Hi Mark,
Can you please pick this patch for 6.10 as it can fix a potential NULL
pointer dereference bug.
Thank you,
Peter
sound/soc/sof/ipc4-topology.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/sound/soc/sof/ipc4-topology.c b/sound/soc/sof/ipc4-topology.c
index beff10989324..33e8c5f7d9ca 100644
--- a/sound/soc/sof/ipc4-topology.c
+++ b/sound/soc/sof/ipc4-topology.c
@@ -217,6 +217,14 @@ sof_ipc4_get_input_pin_audio_fmt(struct snd_sof_widget *swidget, int pin_index)
}
process = swidget->private;
+
+ /*
+ * For process modules without base config extension, base module config
+ * format is used for all input pins
+ */
+ if (process->init_config != SOF_IPC4_MODULE_INIT_CONFIG_TYPE_BASE_CFG_WITH_EXT)
+ return &process->base_config.audio_fmt;
+
base_cfg_ext = process->base_config_ext;
/*
--
2.45.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 6.10] ASoC: SOF: ipc4-topology: Fix input format query of process modules without base extension
2024-05-29 12:12 [PATCH 6.10] ASoC: SOF: ipc4-topology: Fix input format query of process modules without base extension Peter Ujfalusi
@ 2024-05-29 17:11 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2024-05-29 17:11 UTC (permalink / raw)
To: lgirdwood, Peter Ujfalusi
Cc: linux-sound, pierre-louis.bossart, kai.vehmanen,
ranjani.sridharan, stable, seppo.ingalsuo
On Wed, 29 May 2024 15:12:01 +0300, Peter Ujfalusi wrote:
> If a process module does not have base config extension then the same
> format applies to all of it's inputs and the process->base_config_ext is
> NULL, causing NULL dereference when specifically crafted topology and
> sequences used.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: SOF: ipc4-topology: Fix input format query of process modules without base extension
commit: ffa077b2f6ad124ec3d23fbddc5e4b0ff2647af8
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-05-29 17:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-29 12:12 [PATCH 6.10] ASoC: SOF: ipc4-topology: Fix input format query of process modules without base extension Peter Ujfalusi
2024-05-29 17:11 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox