Skip to contentSkip to conversation

ALSA: cs46xx: Potential NULL dereference in probe

PATCH Applied Dan Carpenter 2 participants 2 messages Jan 8, 2019 1 message not in the archive Sound

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 ALSA: cs46xx: Potential NULL dereference in probe

The "chip->dsp_spos_instance" can be NULL on some of the ealier error paths in snd_cs46xx_create().

---
We don't really consider NULL derefences as security bugs unless they can be triggered remotely, but it's definitely worth fixing.

 sound/pci/cs46xx/dsp_spos.c | 3 +++
 1 file changed, 3 insertions(+)
sound/pci/cs46xx/dsp_spos.c +3 -0
index 598d140bb7cb..5fc497c6d738 100644
@@ -903,6 +903,9 @@ int cs46xx_dsp_proc_done (struct snd_cs46xx *chip)
 	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 	int i;
 
+	if (!ins)
+		return 0;
+
 	snd_info_free_entry(ins->proc_sym_info_entry);
 	ins->proc_sym_info_entry = NULL;
 
Signature · 1 line
2.17.1
Applied
#2 lore raw
Quoted 6 lines · Dan Carpenter

The "chip->dsp_spos_instance" can be NULL on some of the ealier error paths in snd_cs46xx_create().

Applied, thanks.

Quoted 3 lines

---
We don't really consider NULL derefences as security bugs unless they can be triggered remotely, but it's definitely worth fixing.

Right, I put Cc-to-stable tag as well.

Takashi