lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250428-fixup-of-sof-topology-v2-1-7966515a81b7@collabora.com>
Date: Mon, 28 Apr 2025 15:32:24 +0200
From: Julien Massot <julien.massot@...labora.com>
To: kernel@...labora.com, Liam Girdwood <lgirdwood@...il.com>, 
 Peter Ujfalusi <peter.ujfalusi@...ux.intel.com>, 
 Bard Liao <yung-chuan.liao@...ux.intel.com>, 
 Ranjani Sridharan <ranjani.sridharan@...ux.intel.com>, 
 Daniel Baluta <daniel.baluta@....com>, 
 Kai Vehmanen <kai.vehmanen@...ux.intel.com>, 
 Pierre-Louis Bossart <pierre-louis.bossart@...ux.dev>, 
 Mark Brown <broonie@...nel.org>, Jaroslav Kysela <perex@...ex.cz>, 
 Takashi Iwai <tiwai@...e.com>
Cc: Liam Girdwood <liam.r.girdwood@...el.com>, 
 sound-open-firmware@...a-project.org, linux-sound@...r.kernel.org, 
 linux-kernel@...r.kernel.org, Julien Massot <julien.massot@...labora.com>
Subject: [PATCH v2] ASoC: SOF: topology: Fix null pointer dereference

Prevent null pointer dereference in snd_sof_load_topology()

Signed-off-by: Julien Massot <julien.massot@...labora.com>
Fixes: 6d5997c412cc ("ASoC: SOF: topology: load multiple topologies")
---
Changes in v2:
- Better commit message as suggested
- Link to v1: https://lore.kernel.org/r/20250428-fixup-of-sof-topology-v1-1-dc14376da258@collabora.com
---
 sound/soc/sof/topology.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c
index e19ba94f2c80a43731b90351bacfde2720db50ed..5d3ee3a86392c5a3fbfd05f83acc99b102c8cf61 100644
--- a/sound/soc/sof/topology.c
+++ b/sound/soc/sof/topology.c
@@ -2481,7 +2481,7 @@ int snd_sof_load_topology(struct snd_soc_component *scomp, const char *file)
 	if (!tplg_files)
 		return -ENOMEM;
 
-	if (sof_pdata->machine->get_function_tplg_files) {
+	if (sof_pdata->machine && sof_pdata->machine->get_function_tplg_files) {
 		tplg_cnt = sof_pdata->machine->get_function_tplg_files(scomp->card,
 								       sof_pdata->machine,
 								       tplg_filename_prefix,

---
base-commit: 80626102e730787e2cdcab0e36d267bedcd1a63e
change-id: 20250428-fixup-of-sof-topology-50886568a785

Best regards,
-- 
Julien Massot <julien.massot@...labora.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ