openSUSE / golang-packaging

golang packaging tool for openSUSE
GNU General Public License v3.0
6 stars 13 forks source link

*: always use -buildmode=pie #12

Closed cyphar closed 7 years ago

cyphar commented 7 years ago

By default, Go builds everything as non-PIC code. This is an issue, as ASLR is not enabled for non-PIC code and thus the usefulness of ASLR is diminished with Go (especially since the libraries used are compiled into the binary, giving more opportunities for ROP gadgets).

openSUSE has recently put a lot of effort into enabling -fPIC for as many packages as possible, so we should follow suit in Go.

SUSE-Bug: https://bugzilla.suse.com/show_bug.cgi?id=1048046 Signed-off-by: Aleksa Sarai asarai@suse.de