| Evaluate building with hardened binary flags | |||||||||||
| Project Member Reported by evan@chromium.org, Sep 13 2010 | Back to list | ||||||||||
Debian has a nice bundle of gcc flags to harden binaries: http://lists.debian.org/debian-devel-announce/2008/01/msg00006.html http://wiki.debian.org/Hardening The list is: DEB_BUILD_HARDENING_FORMAT (gcc/g++ -Wformat -Wformat-security) DEB_BUILD_HARDENING_FORTIFY (gcc/g++ -D_FORTIFY_SOURCE=2) DEB_BUILD_HARDENING_STACKPROTECTOR (gcc/g++ -fstack-protector) DEB_BUILD_HARDENING_PIE (gcc/g++ -fPIE -pie) DEB_BUILD_HARDENING_RELRO (ld -z relro) DEB_BUILD_HARDENING_BINDNOW (ld -z now) PS: We should consider these on Mac as well.
Comment 1
by
f...@sofaraway.org,
Sep 14 2010
,
Sep 14 2010
The R_X86_64_TPOFF32 is a linker bug: http://sourceware.org/bugzilla/show_bug.cgi?id=10434 As for the ARM build: it's coming from a static non-POD object, which always suggests problems. I can't see any explicit |new| calls however, and I don't have an ARM build setup to be able to play around.
,
Sep 14 2010
,
Sep 14 2010
apparently, the R_ARM_THM_CALL issue is on maverick only, not lucid.
,
Sep 15 2010
,
Sep 15 2010
We build with some of these on the Mac now. I think we already have bugs covering everything else we can add. For example, PIE confused Valgrind, so we had to turn it off.
,
Oct 4 2010
There could be build switch, which enables PIE. PIE should have better performance than PIC. Average user doesn't use Valgrind.
,
Dec 22 2010
Issue 67821 has been merged into this issue.
,
May 6 2011
,
Sep 20 2011
Not going to get to this before I go on leave, sorry.
,
Jun 11 2012
(Un-ccing myself from bugs.)
,
Nov 20 2012
The following revision refers to this bug:
http://src.chromium.org/viewvc/chrome?view=rev&revision=168889
------------------------------------------------------------------------
r168889 | phajdan.jr@chromium.org | 2012-11-20T22:35:25.500644Z
Changed paths:
M http://src.chromium.org/viewvc/chrome/trunk/src/build/common.gypi?r1=168889&r2=168888&pathrev=168889
Use more hardening flags:
-D_FORTIFY_SOURCE=2
-Wl,-z,now (aka BIND_NOW)
-Wl,-z,relro (read-only relocation tables)
BUG= 55439
Review URL: https://codereview.chromium.org/11411022
------------------------------------------------------------------------
,
Dec 11 2012
The following revision refers to this bug:
http://src.chromium.org/viewvc/chrome?view=rev&revision=172225
------------------------------------------------------------------------
r172225 | phajdan.jr@chromium.org | 2012-12-11T01:54:58.179229Z
Changed paths:
M http://src.chromium.org/viewvc/chrome/trunk/src/build/common.gypi?r1=172225&r2=172224&pathrev=172225
Only build with _FORTIFY_SOURCE in Release mode.
This prevents build failures on Fedora.
BUG= 16257 , 55439
Review URL: https://codereview.chromium.org/11490019
------------------------------------------------------------------------
,
Jan 9 2013
Should we close this bug and eventually open a new one for the remaining flags?
,
Jan 15 2013
Yup, closing.
,
Feb 15 2013
,
Mar 10 2013
,
Mar 12 2013
|
|||||||||||
| ► Sign in to add a comment | |||||||||||