From: Andy Lutomirski <luto@amacapital.net>
To: musl@lists.openwall.com
Subject: Re: fixing -fPIE + -fstack-protector-all
Date: Thu, 06 Nov 2014 18:10:10 -0800 [thread overview]
Message-ID: <545C2A02.8090206@amacapital.net> (raw)
In-Reply-To: <545B5F6D.4090108@opensource.dyc.edu>
On 11/06/2014 03:45 AM, Anthony G. Basile wrote:
> On 11/05/14 10:43, Rich Felker wrote:
>> On Wed, Nov 05, 2014 at 04:25:03PM +0100, John Spencer wrote:
>>> using -fPIE + -fstack-protector-all is currently broken for a number
>>> of architectures (most notably i386) in the default gcc setup
>>> (including the musl-cross patches), as it depends on a
>>> libssp_nonshared.a which provides __stack_chk_fail_local().
>>
>> As discussed on IRC, I would _like_ to be able to simply add the
>> following to crt/i386/crti.s:
>>
>> __stack_chk_fail_local: hlt
>>
>> and equivalent for other archs. This has the added benefit of
>> effecting a crash without going through the PLT (whereas
>> libssp_nonshared.a's __stack_chk_fail_local calls __stack_chk_fail via
>> the PLT) so it's not vulnerable to attacks that have overwritten the
>> GOT with malicious pointers.
>
> For what its worth, hardening in gentoo (PaX kernel + userland hardening
> with relro and bindnow) tries to prevent this kind of attack by making
> the GOT read only after initial linking.
What does the PaX kernel have to do with this?
--Andy
next prev parent reply other threads:[~2014-11-07 2:10 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-05 15:25 John Spencer
2014-11-05 15:43 ` Rich Felker
2014-11-05 16:01 ` John Spencer
2014-11-05 16:20 ` Rich Felker
2014-11-06 1:34 ` Andy Lutomirski
2014-11-06 1:44 ` Rich Felker
2014-11-06 11:45 ` Anthony G. Basile
2014-11-06 12:36 ` John Spencer
2014-11-07 12:25 ` Anthony G. Basile
2014-11-07 2:10 ` Andy Lutomirski [this message]
2014-11-07 12:16 ` Anthony G. Basile
2014-11-05 16:01 ` Timo Teras
2014-11-06 12:11 ` Anthony G. Basile
2014-11-06 15:43 ` Rich Felker
2014-11-06 12:40 ` John Spencer
2014-11-06 12:47 ` Timo Teras
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=545C2A02.8090206@amacapital.net \
--to=luto@amacapital.net \
--cc=musl@lists.openwall.com \
/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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).