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:   Sun, 26 Nov 2017 16:19:43 +0100
From:   Ingo Molnar <mingo@...nel.org>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     linux-kernel@...r.kernel.org,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Andy Lutomirski <luto@...capital.net>,
        "H . Peter Anvin" <hpa@...or.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Borislav Petkov <bp@...en8.de>,
        Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH 28/43] x86/mm/kaiser: Map cpu entry area


* Thomas Gleixner <tglx@...utronix.de> wrote:

> On Fri, 24 Nov 2017, Ingo Molnar wrote:
> > +void kaiser_add_mapping_cpu_entry(int cpu)
> > +{
> > +	kaiser_add_user_map_early(get_cpu_gdt_ro(cpu), PAGE_SIZE,
> > +				  __PAGE_KERNEL_RO);
> > +
> > +	/* includes the entry stack */
> > +	kaiser_add_user_map_early(&get_cpu_entry_area(cpu)->tss,
> > +				  sizeof(get_cpu_entry_area(cpu)->tss),
> > +				  __PAGE_KERNEL | _PAGE_GLOBAL);
> > +
> > +	/* Entry code, so needs to be EXEC */
> > +	kaiser_add_user_map_early(&get_cpu_entry_area(cpu)->entry_trampoline,
> > +				  sizeof(get_cpu_entry_area(cpu)->entry_trampoline),
> > +				  __PAGE_KERNEL_EXEC | _PAGE_GLOBAL);
> 
> This creates a RWX mapping and wants to be __PAGE_KERNEL_RX!

So I think __PAGE_KERNEL_EXEC and __PAGE_KERNEL are really dangerous names which 
creates RWX mappings without people intending it.

Should be renamed to something like __PAGE_KERNEL_RWX ? And not be used anywhere ...

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ