From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1 v2] gcc: Add support for --enable-default-pie configure option.
Date: Thu, 28 Dec 2017 23:07:43 +0100 [thread overview]
Message-ID: <20171228230743.1e6c59ab@windsurf> (raw)
In-Reply-To: <20171228214333.8340-1-stefan.froberg@petroprogram.com>
Hello,
On Thu, 28 Dec 2017 23:43:33 +0200, Stefan Fr?berg wrote:
> By default, buildroot produces insecure binaries.
>
> GCC 6.x added build time configuration option "--enable-default-pie".
> With that enabled, GCC will produce PIE
> (Position-independent executables) binaries.
>
> PIE is a requirement for ASLR (Address space layout randomization)
> that will make exploits like return-to-libc attack impossible.
>
> If you want to have a modern, secure system then enable this option.
>
> To override this default behaviour, you can use -no-pie
> with your CFLAGS/CXXFLAGS.
>
> https://gcc.gnu.org/onlinedocs/gcc-6.2.0/gcc/Link-Options.html
As I said in my previous review, I think we want a solution that also
applies to external toolchains, by passing -pie in the compiler wrapper.
Please see "[PATCH 2/2] security hardening: add RELFO, FORTIFY
options" in the mailing list archives,
https://patchwork.ozlabs.org/patch/830085/, it was also adding -pie
support, but in a more generic way. Could you use this instead ?
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
next prev parent reply other threads:[~2017-12-28 22:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-28 21:43 [Buildroot] [PATCH 1/1 v2] gcc: Add support for --enable-default-pie configure option Stefan Fröberg
2017-12-28 22:07 ` Thomas Petazzoni [this message]
[not found] ` <CANQCQpZ40Q3T2gOPqu8_vGHCTAup_fxgW3ubfYjewfgo7DwW0A@mail.gmail.com>
2017-12-28 23:28 ` Matthew Weber
2017-12-29 13:25 ` Stefan Fröberg
2017-12-29 13:34 ` Stefan Fröberg
2017-12-29 13:42 ` Thomas Petazzoni
2017-12-29 13:48 ` Stefan Fröberg
2017-12-29 14:04 ` Thomas Petazzoni
2017-12-30 2:34 ` Stefan Fröberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171228230743.1e6c59ab@windsurf \
--to=thomas.petazzoni@free-electrons.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox