From: Greg KH <greg@kroah.com>
To: Kees Cook <keescook@chromium.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
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: Tue, 12 Dec 2017 09:33:43 +0100 [thread overview]
Message-ID: <20171212083343.GG22935@kroah.com> (raw)
In-Reply-To: <CAGXu5j+92ZebfVQHKoH0M3OcrqUC++YFj8EYy=kW7iNaa4_aFQ@mail.gmail.com>
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...
thanks,
greg k-h
next prev parent reply other threads:[~2017-12-12 8:33 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 [this message]
2017-12-14 14:26 ` Thomas Gleixner
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=20171212083343.GG22935@kroah.com \
--to=greg@kroah.com \
--cc=adobriyan@gmail.com \
--cc=akinobu.mita@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=dvyukov@google.com \
--cc=ebiederm@xmission.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
Powered by JetHome