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:	Fri, 21 Dec 2012 14:22: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 Fri, Dec 21, 2012 at 1:26 PM, Yinghai Lu <yinghai@...nel.org> wrote:
> On Fri, Dec 21, 2012 at 9:36 AM, H. Peter Anvin <hpa@...or.com> wrote:
>> We should NEVER have RW + x at the same time (at least when the kernel
>> is compiled properly.)  Looks like your patch does get rid of a bunch of
>> stuff in the low mapping -- although the low mapping really should never
>> be +x at all -- but there are still problems with the high mapping
>
> after enabling CONFIG_DEBUG_RODATA
>
> get
> ---[ High Kernel Mapping ]---
> 0xffffffff80000000-0xffffffff81000000          16M                           pmd
> 0xffffffff81000000-0xffffffff82200000          18M     ro         PSE GLB x  pmd
> 0xffffffff82200000-0xffffffff82c00000          10M     ro         PSE GLB NX pmd
> 0xffffffff82c00000-0xffffffff82dc9000        1828K     RW             GLB x  pte
> 0xffffffff82dc9000-0xffffffff82e00000         220K     RW             GLB NX pte
> 0xffffffff82e00000-0xffffffff83000000           2M     RW         PSE GLB NX pmd
> 0xffffffff83000000-0xffffffff8313a000        1256K     RW             GLB NX pte
> 0xffffffff8313a000-0xffffffff83200000         792K     RW             GLB x  pte
> 0xffffffff83200000-0xffffffff83e00000          12M     RW         PSE GLB x  pmd
> 0xffffffff83e00000-0xffffffffa0000000         450M                           pmd
>
> for
> [    0.000000] Kernel Layout:
> [    0.000000]   .text: [0x01000000-0x021434f8]
> [    0.000000] .rodata: [0x02200000-0x02a13fff]
> [    0.000000]   .data: [0x02c00000-0x02dc763f]
> [    0.000000]   .init: [0x02dc9000-0x0312cfff]
> [    0.000000]    .bss: [0x0313b000-0x03dd6fff]
> [    0.000000]    .brk: [0x03dd7000-0x03dfffff]
>
> looks like .data, .bss, .brk should not have x set.

please check attached patch that set NX for data/bss/brk with 64bit.

Thanks

Yinghai

Download attachment "no_x_for_data_bss_brk.patch" of type "application/octet-stream" (3185 bytes)

Powered by blists - more mailing lists