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:   Wed, 1 Nov 2017 23:11:53 +0100 (CET)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Dave Hansen <dave.hansen@...ux.intel.com>
cc:     Andy Lutomirski <luto@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        moritz.lipp@...k.tugraz.at,
        Daniel Gruss <daniel.gruss@...k.tugraz.at>,
        michael.schwarz@...k.tugraz.at,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Kees Cook <keescook@...gle.com>,
        Hugh Dickins <hughd@...gle.com>, X86 ML <x86@...nel.org>
Subject: Re: [PATCH 02/23] x86, kaiser: do not set _PAGE_USER for init_mm
 page tables

On Wed, 1 Nov 2017, Dave Hansen wrote:

> On 11/01/2017 02:28 PM, Thomas Gleixner wrote:
> > On Wed, 1 Nov 2017, Andy Lutomirski wrote:
> >> The vsyscall page is _PAGE_USER and lives in init_mm via the fixmap.
> > 
> > Groan, forgot about that abomination, but still there is no point in having
> > it marked PAGE_USER in the init_mm at all, kaiser or not.
> 
> So shouldn't this patch effectively make the vsyscall page unusable?
> Any idea why that didn't show up in any of the x86 selftests?

vsyscall is the legacy mechanism. Halfways modern userspace does not need
it at all.

The default for it is EMULATE except you set it to NATIVE either via
Kconfig or on the kernel command line. Distros ship it with EMULATE set.
The emulation does not use the fixmap, it traps the access and emulates it.

But that aside. The point is that the fixmap exists in the init_mm and if
vsyscall is enabled then its also established in the process mappings.

So this can be done as a general correctness change:

  - Prevent USER mappings in init_mm

  - Make sure the fixmap gets the USER bit in the process mapping when
    vsyscall is in native mode.

We can avoid the latter by just removing the native vsyscall support and only
support emulation and none. It's about time to kill that stuff anyway.

Thanks,

	tglx



Powered by blists - more mailing lists