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: <CAE9FiQVNeQqXktmaG0XOJwSxFEVrGKA9j6UDN2N_aDDp-8y_fA@mail.gmail.com>
Date:	Thu, 20 Dec 2012 22:27:10 -0800
From:	Yinghai Lu <yinghai@...nel.org>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	Kees Cook <keescook@...omium.org>, linux-kernel@...r.kernel.org,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>, x86@...nel.org,
	Jim Kukunas <james.t.kukunas@...ux.intel.com>,
	Arjan van de Ven <arjan@...radead.org>
Subject: Re: [RFC] stack and heap are executable on x86_64

On Thu, Dec 20, 2012 at 8:44 PM, H. Peter Anvin <hpa@...or.com> wrote:
> I just looked at a /sys/kernel/debug/kernel_page_tables dump.... and there
> are a bunch of pages which are RWX:
>
> 0xffff880000000000-0xffff880000097000  604K RW             GLB x  pte
> 0xffff88000009d000-0xffff880000200000 1420K RW             GLB x  pte
> 0xffff880000200000-0xffff880001000000   14M RW         PSE GLB x  pmd
> 0xffff880001c00000-0xffff880035e00000  834M RW         PSE GLB x  pmd
> 0xffff880035e00000-0xffff880035ffe000 2040K RW             GLB x  pte
> 0xffff880036ff7000-0xffff880037000000   36K RW             GLB x  pte
> 0xffff880037000000-0xffff880040000000  144M RW         PSE GLB x  pmd
> 0xffffffff81c00000-0xffffffff81cea000  936K RW             GLB x  pte
> 0xffffffff81dfd000-0xffffffff81e00000   12K RW             GLB x  pte
> 0xffffffff81e00000-0xffffffff82000000    2M RW         PSE GLB x  pmd

after for-x86-boot we will have
---[ Low Kernel Mapping ]---
0xffff880000000000-0xffff880000099000         612K     RW             GLB NX pte
0xffff880000099000-0xffff88000009a000           4K     ro             GLB NX pte
0xffff88000009a000-0xffff88000009b000           4K     ro             GLB x  pte
0xffff88000009b000-0xffff880000200000        1428K     RW             GLB NX pte
0xffff880000200000-0xffff8800dfe00000        3580M     RW         PSE GLB NX pmd
0xffff8800dfe00000-0xffff8800dfffe000        2040K     RW             GLB NX pte
0xffff8800dfffe000-0xffff8800e0000000           8K                           pte
0xffff8800e0000000-0xffff880100000000         512M                           pmd
0xffff880100000000-0xffff8801a0000000        2560M     RW         PSE GLB NX pmd
---[ High Kernel Mapping ]---
0xffffffff80000000-0xffffffff81000000          16M                           pmd
0xffffffff81000000-0xffffffff82a00000          26M     RW         PSE GLB x  pmd
0xffffffff82a00000-0xffffffff82b21000        1156K     RW             GLB x  pte
0xffffffff82b21000-0xffffffff82c00000         892K     RW             GLB NX pte
0xffffffff82c00000-0xffffffff82e00000           2M     RW         PSE GLB NX pmd
0xffffffff82e00000-0xffffffff82e92000         584K     RW             GLB NX pte
0xffffffff82e92000-0xffffffff83000000        1464K     RW             GLB x  pte
0xffffffff83000000-0xffffffff83c00000          12M     RW         PSE GLB x  pmd
0xffffffff83c00000-0xffffffffa0000000         452M                           pmd

so low mapping will only have trampoline get x set.
is that expected ?

Do we need to set low mapping corresponding to kernel range to x?

Yinghai
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ