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]
Message-ID: <alpine.DEB.2.20.1611171213310.11652@macbook-air>
Date:   Thu, 17 Nov 2016 12:15:54 -0500 (EST)
From:   Vince Weaver <vincent.weaver@...ne.edu>
To:     Dmitry Vyukov <dvyukov@...gle.com>
cc:     Josh Poimboeuf <jpoimboe@...hat.com>,
        Vince Weaver <vincent.weaver@...ne.edu>,
        Peter Zijlstra <peterz@...radead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        "davej@...emonkey.org.uk" <davej@...emonkey.org.uk>,
        Stephane Eranian <eranian@...il.com>
Subject: Re: perf: fuzzer KASAN unwind_get_return_address

On Thu, 17 Nov 2016, Dmitry Vyukov wrote:

> On Thu, Nov 17, 2016 at 3:36 PM, Josh Poimboeuf <jpoimboe@...hat.com> wrote:
> > On Thu, Nov 17, 2016 at 09:25:58AM -0500, Vince Weaver wrote:
> >> On Thu, 17 Nov 2016, Josh Poimboeuf wrote:
> >>
> >> > On Thu, Nov 17, 2016 at 10:48:27AM +0100, Dmitry Vyukov wrote:
> >> > > Just in case, there is currently a known KASAN false positive related
> >> > > to longjmp's on GPFs. When a syscall hits GPF stack is unwound to
> >> > > kernel entry point, this leaves a bunch of stray poisoned redzones on
> >> > > the thread stack. They later cause false stack-out-of-bounds reports.
> >> > >
> >> > > But this does not seem to be the case here. Kernel is not tainted. And
> >> > > shadow at the bottom of the reports looks sane.
> >> > >
> >> > > But if that's the case somehow, we will need to add
> >> > > kasan_unpoison_remaining_stack() call before a longjmp like we did for
> >> > > jprobe_return():
> >> > > https://groups.google.com/d/msg/kasan-dev/Hzox58yZ4MU/TOdFoWMuBQAJ
> >> >
> >> > I'm pretty sure this isn't a KASAN false positive.  The unwinder does
> >> > actually seem to be accessing a bad area of the stack, in the middle of
> >> > a function's stack frame.
> >>
> >> I'm having trouble reproducing it on a few other machines I have fuzzing.
> >> So there might be some kernel option contributing, I need to compare
> >> .configs.
> >>
> >> Also the machine that easily triggers the problem I'm compiling with
> >> gcc-5.4 where the machines I can't are using gcc-4.9.
> >
> > I believe KASAN only works with gcc 5 and later, so that would explain
> > why you aren't seeing it with gcc 4.9.
> 
> Right. 4.9 has limited support for KASAN. It supports general
> instrumentation, but only with CONFIG_KASAN_OUTLINE, and it does not
> support stack poisoning. Which is required to detect stack OOBs.

I guess it's time to update the other machines to debian-unstable then.  I 
didn't really need to be able to run dmesg as non-root anyway.

I would actually be compiling the kernels with gcc-6.2 rather than gcc-5 
but that seems to not work currently.  Haven't had time to see if that's a 
known issue or not.

Vince

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ