From: Pavel Machek <pavel@ucw.cz>
To: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, Kees Cook <keescook@chromium.org>,
linux-kernel@vger.kernel.org, Takashi Iwai <tiwai@suse.com>,
Liam Girdwood <lgirdwood@gmail.com>
Subject: Re: [PATCH] ASoC: soc-core: Add missing NULL check
Date: Fri, 9 Mar 2018 21:19:57 +0100 [thread overview]
Message-ID: <20180309201957.GA7069@amd> (raw)
In-Reply-To: <20180309125050.GD5252@sirena.org.uk>
[-- Attachment #1.1: Type: text/plain, Size: 1086 bytes --]
On Fri 2018-03-09 12:50:50, Mark Brown wrote:
> On Thu, Mar 08, 2018 at 12:06:53PM -0800, Kees Cook wrote:
>
> > If a codec is not attached to the sound soc, a NULL deref is possible as a
> > regular user in /sys.
>
> I can't parse this, sorry. What is the "sound soc"?
>
> > +++ b/sound/soc/soc-core.c
> > @@ -137,6 +137,9 @@ static ssize_t soc_codec_reg_show(struct snd_soc_codec *codec, char *buf,
> > size_t total = 0;
> > loff_t p = 0;
> >
> > + if (!codec || !codec->driver)
> > + return 0;
> > +
>
> How are we managing to create a sysfs file for a CODEC which doesn't
> have a CODEC struct associated with it? That is obviously nonsensical
> and suggests we've got some more serious problem going on here - if
> there's no CODEC those sysfs attributes simply shouldn't be there.
Look for "linux-next on n900: oops in codec_reg_show() when grepping
sysfs" ... should be in your inbox.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
prev parent reply other threads:[~2018-03-09 20:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-08 20:06 [PATCH] ASoC: soc-core: Add missing NULL check Kees Cook
2018-03-09 12:50 ` Mark Brown
2018-03-09 18:45 ` Kees Cook
2018-03-09 19:35 ` Pavel Machek
2018-03-09 20:22 ` Mark Brown
2018-03-12 10:31 ` Charles Keepax
2018-03-12 16:02 ` Mark Brown
2018-03-09 20:19 ` Pavel Machek [this message]
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=20180309201957.GA7069@amd \
--to=pavel@ucw.cz \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=keescook@chromium.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tiwai@suse.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).