linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Vyukov <dvyukov@google.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Greg KH <greg@kroah.com>, Kees Cook <keescook@chromium.org>,
	Alexey Dobriyan <adobriyan@gmail.com>,
	security@kernel.org, Akinobu Mita <akinobu.mita@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Josh Poimboeuf <jpoimboe@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	syzkaller-bugs@googlegroups.com,
	Vegard Nossum <vegard.nossum@oracle.com>
Subject: Re: general protection fault in show_timer
Date: Thu, 14 Dec 2017 15:34:24 +0100	[thread overview]
Message-ID: <CACT4Y+Yu1csMLNa0P=RfEtWC+f0VbnX8Q8L63doWqRJU0c5KLA@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1712141525300.4998@nanos>

On Thu, Dec 14, 2017 at 3:26 PM, Thomas Gleixner <tglx@linutronix.de> wrote:
> On Tue, 12 Dec 2017, Greg KH wrote:
>
>> On Tue, Dec 05, 2017 at 11:58:07AM -0800, Kees Cook wrote:
>> > On Thu, Nov 30, 2017 at 4:57 AM, Thomas Gleixner <tglx@linutronix.de> wrote:
>> > > On Thu, 30 Nov 2017, Alexey Dobriyan wrote:
>> > >
>> > >> [cc security@]
>> > >> 100% oops with interrupts disabled by nobody
>> > >> or kernel memory read
>> > >> [nods]
>> > >> you named the bug already
>> > >>
>> > >> "notify" directly comes from userspace struct sigevent::sigev_notify
>> > >> without adult supervision.
>> > >>
>> > >> Reproducer is timer_create + read(/proc/self/timers)
>> > >
>> > > Bah. That's a really old one.
>> > >
>> > > Tentative fix below. That needs more though but looking at the existing
>> > > check there is only one valid combo with SIGEV_THREAD_ID.
>> > >
>> > > Thanks,
>> > >
>> > >         tglx
>> > >
>> > > 8<----------------
>> > > --- a/kernel/time/posix-timers.c
>> > > +++ b/kernel/time/posix-timers.c
>> > > @@ -434,6 +434,16 @@ static struct pid *good_sigevent(sigeven
>> > >  {
>> > >         struct task_struct *rtn = current->group_leader;
>> > >
>> > > +       switch (event->sigev_notify) {
>> > > +       case SIGEV_NONE:
>> > > +       case SIGEV_SIGNAL:
>> > > +       case SIGEV_SIGNAL | SIGEV_THREAD_ID:
>> > > +       case SIGEV_THREAD:
>> > > +               break;
>> > > +       default:
>> > > +               return NULL;
>> > > +       }
>> > > +
>> > >         if ((event->sigev_notify & SIGEV_THREAD_ID ) &&
>> > >                 (!(rtn = find_task_by_vpid(event->sigev_notify_thread_id)) ||
>> > >                  !same_thread_group(rtn, current) ||
>> >
>> > FWIW, this looks correct to me.
>>
>> Did this ever go anywhere?  I don't see it in Linus's tree yet...
>
> I learned yesterday that syzboz is understuffed and cannot test patches, so
> I need to find a minute to run the reproducer myself and verify that the
> patch is correct.

Hi Thomas,

Why do you say so? Have you tried to ask it to test?
https://github.com/google/syzkaller/blob/master/docs/syzbot.md#communication-with-syzbot
What happened?

  reply	other threads:[~2017-12-14 14:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <94eb2c18a77ce8d832055f2cf263@google.com>
2017-11-30 11:08 ` general protection fault in show_timer Alexey Dobriyan
2017-11-30 11:31   ` Dmitry Vyukov
2017-11-30 11:38     ` Dmitry Vyukov
2017-11-30 12:20       ` Alexey Dobriyan
2017-11-30 12:57         ` Dmitry Vyukov
2017-11-30 12:57         ` Thomas Gleixner
2017-12-05 19:58           ` Kees Cook
2017-12-12  8:33             ` Greg KH
2017-12-14 14:26               ` Thomas Gleixner
2017-12-14 14:34                 ` Dmitry Vyukov [this message]
2017-12-14 15:34                   ` Thomas Gleixner
2017-12-14 18:36                     ` Eric Biggers
2017-12-15 16:40                       ` Thomas Gleixner
2017-12-19  1:01                         ` Eric Biggers
2017-12-04  3:17 ` syzbot
2017-12-04 12:11   ` Thomas Gleixner

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='CACT4Y+Yu1csMLNa0P=RfEtWC+f0VbnX8Q8L63doWqRJU0c5KLA@mail.gmail.com' \
    --to=dvyukov@google.com \
    --cc=adobriyan@gmail.com \
    --cc=akinobu.mita@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=greg@kroah.com \
    --cc=jpoimboe@redhat.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=security@kernel.org \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=tglx@linutronix.de \
    --cc=vegard.nossum@oracle.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).