lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 12 Dec 2017 09:33:43 +0100
From:   Greg KH <greg@...ah.com>
To:     Kees Cook <keescook@...omium.org>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        Alexey Dobriyan <adobriyan@...il.com>,
        Dmitry Vyukov <dvyukov@...gle.com>, security@...nel.org,
        Akinobu Mita <akinobu.mita@...il.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        "Eric W. Biederman" <ebiederm@...ssion.com>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        LKML <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>,
        syzkaller-bugs@...glegroups.com,
        Vegard Nossum <vegard.nossum@...cle.com>
Subject: Re: general protection fault in show_timer

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@...utronix.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ