ASoC: SOF: ipc4-topology: Fix input format query of process modules without base extension
Subsystems (2)
PATCH 1/1 ASoC: SOF: ipc4-topology: Fix input format query of process modules without base extension
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.
---
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(+)
sound/soc/sof/ipc4-topology.c +8 -0
@@ -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;/*
Signature · 1 line
2.45.1
Quoted 6 lines · Peter Ujfalusi
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_extis 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