Gentoo Archives: gentoo-dev

From: Pacho Ramos <pacho@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] To enable ssp default in Gcc the toolchain.eclass need some changes.
Date: Thu, 09 Jan 2014 22:16:52
Message-Id: 1389305803.1141.0.camel@belkin5
In Reply to: Re: [gentoo-dev] [PATCH] To enable ssp default in Gcc the toolchain.eclass need some changes. by "Anthony G. Basile"
1 El jue, 09-01-2014 a las 17:06 -0500, Anthony G. Basile escribió:
2 > On 01/09/2014 04:57 PM, Pacho Ramos wrote:
3 > > El jue, 09-01-2014 a las 21:58 +0100, Magnus Granberg escribió:
4 > >> Hi
5 > >>
6 > >> Some time ago we discussed that we should enable stack smashing
7 > >> (-fstack-protector) by default. So we opened a bug to track this [1].
8 > >> The affected Gcc version will be 4.8.2 and newer. Only amd64, x86, mips, ppc,
9 > >> ppc64 and arm will be affected by this change.
10 > >>
11 > >> You can turn off ssp by using the nossp USE flag or by adding
12 > >> -fno-stack-protector to the CFLAGS and/or CXXFLAGS. We are using the same
13 > >> patch as Debian/Ubuntu but with some Gentoo fixes.
14 > >>
15 > >> The patch will move the sed for the HARD_CFLAGS, ALLCFLAGS and
16 > >> ALLCXXFLAGS from do_gcc_PIE_patches() to make_gcc_hard(). We will
17 > >> make_gcc_hard() the default for all Gcc versions 4.8 and newer, and turn
18 > >> it on or off with hardened_gcc_works() that will make some sanity checks.
19 > >>
20 > >> /Magnus
21 > > What are the advantages of disabling SSP to deserve that "special"
22 > > handling via USE flag or easily disabling it appending the flag?
23 > >
24 > > Thanks a lot for the info :)
25 > >
26 > >
27 >
28 > There are some cases where ssp could break things. I know of once case
29 > right now, but its somewhat exotic. Also, sometimes we *want* to break
30 > things for testing. I'm thinking here of instance where we want to test
31 > a pax hardened kernel to see if it catches abuses of memory which would
32 > otherwise be caught by executables emitted from a hardened toolchain.
33 > Take a look at the app-admin/paxtest suite.
34 >
35 >
36
37 OK, thanks a lot, I was wondering if I would need to disable SSP on some
38 of the machines I maintain for some reason. Looks like keeping it
39 enabled is preferred instead ;)