Gentoo Archives: gentoo-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: Can we get PIE on all SUID binaries by default, por favor?
Date: Mon, 23 Jan 2012 22:19:39
Message-Id: 4F1DDCCF.9080304@gentoo.org
In Reply to: Re: [gentoo-dev] Re: Can we get PIE on all SUID binaries by default, por favor? by Francesco Riosa
1 On 01/23/2012 12:12 PM, Francesco Riosa wrote:
2 > 2012/1/23 Mike Gilbert <floppym@g.o>:
3 >> On Mon, Jan 23, 2012 at 2:57 PM, Jason A. Donenfeld <Jason@×××××.com> wrote:
4 >>> To check for PIE,
5 >>>
6 >>> readelf -h /bin/su | grep Type
7 >>>
8 >>> If it says EXEC, no PIE. If it says DYN, yes PIE.
9 >>
10 >> I'm asking "how does one enable PIE/ASLR", not how to check if it is
11 >> enabled already.
12 >
13 > - PIE should be -fPIC also for the executable, not only for the .so
14 > (has a performance impact)
15 > - ASLR you need "hardened" use for gcc, and the toolchain, pax kernel help too
16 >
17 > xattr could be used to reduce the number of suid binaries, but need
18 > support in portage
19
20 We've got experimental support for FEATURES=xattr since
21 portage-2.2.0_alpha80. We can include that in the next portage-2.1.x
22 release.
23 --
24 Thanks,
25 Zac

Replies

Subject Author
Re: [gentoo-dev] Re: Can we get PIE on all SUID binaries by default, por favor? "Jason A. Donenfeld" <Jason@×××××.com>