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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180105183048.ywi5cccs4ecggwy3@pd.tnic>
Date:   Fri, 5 Jan 2018 19:30:48 +0100
From:   Borislav Petkov <bp@...en8.de>
To:     Andy Lutomirski <luto@...nel.org>
Cc:     X86 ML <x86@...nel.org>, LKML <linux-kernel@...r.kernel.org>,
        Kees Cook <keescook@...omium.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [RFC] selftests/x86: Add test_vsyscall

On Fri, Jan 05, 2018 at 10:01:23AM -0800, Andy Lutomirski wrote:
> Yes.  There are very clever tools like 'pin' that instrument a binary
> by decoding all the instructions it executes and generating an
> instrumented copy.  If that binary calls into the vDSO, the vDSO gets
> decoded and instrumented (which works fine).  If the binary calls into
> the vsyscall page, it still needs to work.  So the vsyscall page
> contains machine code that actually works (even if it's NX) to support
> these tools.  The authors and users of the tools yelled loudly in an
> earlier version of the vsyscall emulation code that didn't support
> this use case.

It rings a bell...

> The root cause here is that 4.4 is KAISER, not KPTI.  The
> kaiser_set_shadow_pgd() function is a steaming pile of shit, and this
> is a known bug in it.

Tell me about it.

We found out last night it breaks EFI too, see:

https://lkml.kernel.org/r/alpine.LRH.2.00.1801051909160.27010@gjva.wvxbf.pm

To put it mildly, this new PTI et al crap will bring us a lot of fun in
the coming year. I tell ya, a year from now we'll be dealing with the
fallout from this.

> I have zero desire to hack up some stupid special case in there. For
> the modern KPTI kernels, I rewrote that function entirely to be much
> simpler and much more correct.
> 
> It should be straightforward to kludge something up, though, but I'm
> not volunteering.

Yeah, I think adding _PAGE_RW into the mix should fix it but I need to
give it a try first.

Thanks for the test!

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ