From: Thomas Gleixner <tglx@linutronix.de>
To: Greg KH <greg@kroah.com>
Cc: Kees Cook <keescook@chromium.org>,
Alexey Dobriyan <adobriyan@gmail.com>,
Dmitry Vyukov <dvyukov@google.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:26:38 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.20.1712141525300.4998@nanos> (raw)
In-Reply-To: <20171212083343.GG22935@kroah.com>
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.
Thanks,
tglx
next prev parent reply other threads:[~2017-12-14 14:26 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <94eb2c18a77ce8d832055f2cf263@google.com>
2017-11-30 11:08 ` 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 [this message]
2017-12-14 14:34 ` Dmitry Vyukov
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=alpine.DEB.2.20.1712141525300.4998@nanos \
--to=tglx@linutronix.de \
--cc=adobriyan@gmail.com \
--cc=akinobu.mita@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=dvyukov@google.com \
--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=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
all inboxes | Powered by JetHome®