Gentoo Archives: gentoo-security

From: Tobias Klausmann <klausman@××××××××××××.de>
To: gentoo-security@l.g.o, gentoo-dev@l.g.o
Subject: Re: [gentoo-security] Stack smash protected daemons
Date: Wed, 22 Sep 2004 18:47:19
Message-Id: 20040922184654.GA2709@eric.schwarzvogel.de
In Reply to: [gentoo-security] Stack smash protected daemons by John Richard Moser
1 Hi!
2
3 On Wed, 22 Sep 2004, John Richard Moser wrote:
4 > The most immediately apparent route to take would be to have ebuilds
5 > such as openssh, apache, and su stack smash protected. This would
6 > prevent common buffer overflow attacks from being used to compromise
7 > security; such attacks would only cause the program attacked to abort,
8 > which could still be used as a Denial of Service attack, but would not
9 > allow successful intrusion.
10
11 One might make a case for "this provides a (false) sense of
12 security". But I wouldn't think of this kind of view as feasible.
13 Using that argument, one could drop just about every security
14 measure that isn't perfect (and which is?).
15
16 > Gentoo ships gcc with stack smash protection built in. This is
17 > activated by -fstack-protector or -fstack-protector-all. It would be
18 > feasible to add one of these flags to an ebuild based on a FEATURES or
19 > USE setting.
20
21 Nice idea, I agree.
22
23 > I believe it would be a good idea to have such a FEATURES or USE flag on
24 > by default in all profiles where SSP is supported. In this manner, the
25 > major targets of security attacks would automatically be protected;
26 > while still allowing the user to disable the protection if the user
27 > desires. Users wanting more protection can simply add -fstack-protector
28 > to CFLAGS, or use Hardened Gentoo.
29 >
30 > Any comments? Would this be more suitable as a USE or a FEATURES setting?
31
32 I *think* it'd be better used as a USE flag for the "daemon-only"
33 approach. As for the "whole system" approach, I'd lean towards
34 FEATURE. But then I'm not well-versed in the policies regarding
35 those two settings/variables.
36
37 One problem (albeit small) I see is upstream maintainers refusing
38 to support users who use these settings with their software. A
39 similar example is the Mplayer team's stance towards
40 optimization. Usually, this could be solved the same way as in
41 the mplayer case (if the afflicted^Waffected maintainers aren't
42 too many).
43
44 Just my two eurocents,
45 Tobias
46 --
47 export DISPLAY=vt100