Date: Sat, 27 Apr 2013 11:59:48 +0200 (CEST) From: Gilles Espinasse <g.esp@...e.fr> To: owl-dev@...ts.openwall.com Subject: Re: PIE on x86_64 ----- Mail original ----- > De: "Rich Felker" <dalias@...ifal.cx> > À: owl-dev@...ts.openwall.com > Envoyé: Samedi 27 Avril 2013 03:48:46 > Objet: Re: [owl-dev] PIE on x86_64 > > On Sat, Apr 27, 2013 at 02:14:05AM +0800, Pavel Labushev wrote: > > On Fri, 12 Apr 2013 22:26:58 +0400 > > Solar Designer <solar@...nwall.com> wrote: > > > > > > What are your reasons not to link executables as ET_DYN, even > > > > though > > > > the target CPU architecture is PC-relative? > > > > > > I think we should start doing that, and benchmark to make sure > > > there's > > > no unexpected performance drop. Vasily? > > > > And silence was the answer... Is it too much work? You could make > > -fpie > > and the other hardening flags compiler's built-in defaults, like it > > is > > done in Hardened Gentoo. It may be simpler and more robust than > > tweaking specs of every package and would set more secure defaults > > for > > anything that users might compile. > > Unfortunately changing the compiler defaults can break things in > subtle ways. The most common breakage I'm aware of from making pie > the default occurs in packages with assembler source files that are > written in non-pic-compatible ways. These will turn into TEXTRELs in > the pie binary, which depending on the arch, may just result in heavy > runtime bloat (e.g. on 32-bit x86) or produce an error at link time > (e.g. on x86_64). I seem to recall a user running into this issue in > OpenSSL... > > Rich > Not a big issue in practice actually. textrel are detected using -Wl,--warn-shared-textrel -Wl,--fatal-warnings in the hardened patch. Compiling actually a 32-bit x86 distrib with a hardened gcc-4.4.5 (no fancy X packages), the issues during compilation that remain are workaround with : - for gnupg-1.4, for psmisc LDFLAGS += -pie - for syslinux-4 CFLAGS += -fno-PIE -nopie -norelro -nonow -nocombreloc LDFLAGS := -nopie There is another issue running some test suites. Basically for gcc and gdb, hardening is disabled by default while running make check. Or you have numerous patches to apply to fix the test suites. Gilles
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.