aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcjdelisle <[email protected]>2011-10-16 20:38:23 -0400
committerLuke Dashjr <[email protected]>2011-11-02 10:59:48 -0400
commit38a976d5bbfb1bdb304ae64aa3ca992d13ad3cde (patch)
tree6f5451940f3797182f5cf9b9b25e3c6b6dc1728d /src
parentbitcoind does not need to link with gthread-2.0 (diff)
downloaddiscoin-38a976d5bbfb1bdb304ae64aa3ca992d13ad3cde.tar.xz
discoin-38a976d5bbfb1bdb304ae64aa3ca992d13ad3cde.zip
Added a workaround for an Ubuntu bug which causes -fstack-protector-all to be disregarded.
Diffstat (limited to 'src')
-rw-r--r--src/makefile.unix7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/makefile.unix b/src/makefile.unix
index 98c40771d..9e0b3263d 100644
--- a/src/makefile.unix
+++ b/src/makefile.unix
@@ -38,12 +38,17 @@ LIBS+= \
# Hardening
# Make some classes of vulnerabilities unexploitable in case one is discovered.
#
+ # This is a workaround for Ubuntu bug #691722, the default -fstack-protector causes
+ # -fstack-protector-all to be ignored unless -fno-stack-protector is used first.
+ # see: https://bugs.launchpad.net/ubuntu/+source/gcc-4.5/+bug/691722
+ HARDENING=-fno-stack-protector
+
# Stack Canaries
# Put numbers at the beginning of each stack frame and check that they are the same.
# If a stack buffer if overflowed, it writes over the canary number and then on return
# when that number is checked, it won't be the same and the program will exit with
# a "Stack smashing detected" error instead of being exploited.
- HARDENING=-fstack-protector-all -Wstack-protector
+ HARDENING+=-fstack-protector-all -Wstack-protector
# Make some important things such as the global offset table read only as soon as
# the dynamic linker is finished building it. This will prevent overwriting of addresses