From: Dan Carpenter <dan.carpenter@oracle.com>
To: Jaroslav Kysela <perex@perex.cz>
Cc: security@kernel.org, Vinod Koul <vkoul@kernel.org>,
Takashi Iwai <tiwai@suse.com>,
alsa-devel@alsa-project.org
Subject: [PATCH] ALSA: cs46xx: Potential NULL dereference in probe
Date: Tue, 8 Jan 2019 10:43:30 +0300 [thread overview]
Message-ID: <20190108074330.GA20166@kadam> (raw)
In-Reply-To: <1546895293273.10834@ece.ufl.edu>
The "chip->dsp_spos_instance" can be NULL on some of the ealier error
paths in snd_cs46xx_create().
Reported-by: "Yavuz, Tuba" <tuba@ece.ufl.edu>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
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(+)
diff --git a/sound/pci/cs46xx/dsp_spos.c b/sound/pci/cs46xx/dsp_spos.c
index 598d140bb7cb..5fc497c6d738 100644
--- a/sound/pci/cs46xx/dsp_spos.c
+++ b/sound/pci/cs46xx/dsp_spos.c
@@ -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;
--
2.17.1
next parent reply other threads:[~2019-01-08 7:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1546895293273.10834@ece.ufl.edu>
2019-01-08 7:43 ` Dan Carpenter [this message]
2019-01-08 8:03 ` [PATCH] ALSA: cs46xx: Potential NULL dereference in probe Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190108074330.GA20166@kadam \
--to=dan.carpenter@oracle.com \
--cc=alsa-devel@alsa-project.org \
--cc=perex@perex.cz \
--cc=security@kernel.org \
--cc=tiwai@suse.com \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.