From: Takashi Iwai <tiwai@suse.de>
To: Tommi Rantala <tt.rantala@gmail.com>
Cc: Jaroslav Kysela <perex@perex.cz>,
alsa-devel@alsa-project.org, LKML <linux-kernel@vger.kernel.org>,
Dave Jones <davej@redhat.com>
Subject: Re: snd_seq_timer_open() NULL pointer dereference
Date: Mon, 11 Mar 2013 09:53:03 +0100 [thread overview]
Message-ID: <s5hehfml3m8.wl%tiwai@suse.de> (raw)
In-Reply-To: <CA+ydwtriiYSkT5fN_VOw4kHodoadgC80dDg4K3iydjaT5c5jAA@mail.gmail.com>
At Fri, 8 Mar 2013 20:59:11 +0200,
Tommi Rantala wrote:
>
> 2013/3/8 Takashi Iwai <tiwai@suse.de>:
> > At Thu, 7 Mar 2013 21:59:32 +0200,
> > Tommi Rantala wrote:
> >>
> >> Hello,
> >>
> >> I'm hitting this while fuzzing the kernel with Trinity:
> >
> > The patch below fixes a clear bug in the code path.
> > Could you check whether it'll fit?
> >
> >
> > thanks,
> >
> > Takashi
> >
> > ---
> > From: Takashi Iwai <tiwai@suse.de>
> > Subject: [PATCH] ALSA: seq: Fix missing error handling in snd_seq_timer_open()
> >
> > snd_seq_timer_open() didn't catch the whole error path but let through
> > if the timer id is a slave. This may lead to Oops by accessing the
> > uninitialized pointer.
> >
> > Signed-off-by: Takashi Iwai <tiwai@suse.de>
>
> Confirmed, this fixes the bug. Thanks!
>
> Reported-and-tested-by: Tommi Rantala <tt.rantala@gmail.com>
Thanks for a quick check! I merged the patch now.
Takashi
> > ---
> > sound/core/seq/seq_timer.c | 8 ++++----
> > 1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/sound/core/seq/seq_timer.c b/sound/core/seq/seq_timer.c
> > index 160b1bd..24d44b2 100644
> > --- a/sound/core/seq/seq_timer.c
> > +++ b/sound/core/seq/seq_timer.c
> > @@ -290,10 +290,10 @@ int snd_seq_timer_open(struct snd_seq_queue *q)
> > tid.device = SNDRV_TIMER_GLOBAL_SYSTEM;
> > err = snd_timer_open(&t, str, &tid, q->queue);
> > }
> > - if (err < 0) {
> > - snd_printk(KERN_ERR "seq fatal error: cannot create timer (%i)\n", err);
> > - return err;
> > - }
> > + }
> > + if (err < 0) {
> > + snd_printk(KERN_ERR "seq fatal error: cannot create timer (%i)\n", err);
> > + return err;
> > }
> > t->callback = snd_seq_timer_interrupt;
> > t->callback_data = q;
> > --
> > 1.8.1.4
> >
>
prev parent reply other threads:[~2013-03-11 8:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-07 19:59 Tommi Rantala
2013-03-08 17:31 ` Takashi Iwai
2013-03-08 18:59 ` Tommi Rantala
2013-03-11 8:53 ` Takashi Iwai [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=s5hehfml3m8.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tt.rantala@gmail.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
all inboxes | Powered by JetHome®