PaX vs precompiled headers (Was: gcc 4.8.1 and precompiled header support for NetBSD hosts)

Valery Ushakov <[email protected]>
Newsgroups gmane.os.netbsd.devel.toolchain
Message-ID <[email protected]>
On Wed, Sep 11, 2013 at 15:20:09 +0200, Martin Husemann wrote:

> However, one bit is still open, and I'd like to get feedback on the hack
> before pushing it upstream: for precompiled header files gcc assumes it
> can pick a steady (over multiple compiler runs) address and mmap a part of
> the precompiled header file at that address. No relocation supported.
> 
> I told them what I think of this design (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58379)
> but we have to live with it for now.

This is still a problem and while the latest (~an year ago) comment
from Andrew Pinski hints that this might get fixed, we are stuck with
the current precompiled headers implementation in gcc at least for a
few more years.

I wonder if we should explicitly disable ASLR for the cc1* binaries.
This attack vector is too far out there and c++ projects in the wild
do use precompiled headers.

-uwe
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.