News for hackers. Stuff that matters.
Re:Big problems with ASLR in Ice Cream Sandwich by malkia on Friday February 17, 2012 @01:46PM (#3604471)
So how does the ASLR work with images optimized to be loaded at specific address? (-fPIC all of them?)

I was under the impression that if you have two or more instances of the same .so/.dll/.dylibs in different processes, and they end up using different virtual addresses then they can't share the same code page. Maybe I'm behind times...

Re:Big problems with ASLR in Ice Cream Sandwich by eyemac on Friday February 17, 2012 @06:02PM (#3605333)
> I was under the impression that if you have two or more instances of the same .so/.dll/.dylibs in different processes, and they end up using different virtual addresses then they can't share the same code page. Maybe I'm behind times...

By design, dylibs (i.e. shared dynamic libraries) are allowed to be loaded at different virtual addresses and still have their text/ro sections shared.

Because dylibs are always compiled with -fPIC, they do not have any dependence on their load addresses (branches are pc-relative, data loads go through the GOT, etc). This allows the dyld to map the physical address(es) of a dylib's text/ro section(s) into virtual address spaces of multiple processes with very little relocation.

Re:Big problems with ASLR in Ice Cream Sandwich by jonoberheide on Friday February 17, 2012 @02:03PM (#3604534)
Right, all libaries need to be compiled with -fPIC in order to be randomized. That tends to be much more common than -fPIE.
Re:Big problems with ASLR in Ice Cream Sandwich by aortega on Friday February 17, 2012 @07:03PM (#3605517)
I disagree with -fPIE making things slow, specially in the ~13 general purpose registers of ARM. Maybe -fPIE affect things in the register-starved x86, not so much in modern archs. Also, "fucked up beyond all repair" is a little exagerated when the repair is to add "-fPIE" to some binaries.
Re:Big problems with ASLR in Ice Cream Sandwich by premchai21 on Friday February 17, 2012 @09:49PM (#3605803)
As a mild counterpoint, I semi-recently tried to start habitually compiling my executables with -fPIE on my AMD64 development machines, and at least several months ago, the GDB I got from Debian sid was not up to the task of debugging such a creature and would fail to attach to the process and emit mysterious error messages. AMD64 being a mature architecture where I would expect PIE to have a significant benefit, it wouldn't surprise me if this were true for ARM also, or if other toolchain elements had similar problems. So that could provide a disincentive to switch over to position-independent executables.
Re:Big problems with ASLR in Ice Cream Sandwich by jonoberheide on Friday February 17, 2012 @09:14PM (#3605738)
Yeah, I'm guessing ARM will be ok with respect to GPRs (although I certainly haven't done any benchmarks).

Dug's FUBAR comment was just an attempt cram in as many acronyms as possible...of course the situation is improvable. ;-)

Still at CORE these days?

Re:Big problems with ASLR in Ice Cream Sandwich by aortega on Friday February 24, 2012 @10:26PM (#3632050)
No more CORE for me Doc :) playing the "entrepeneur" now, without the social app or i-phone app, so, no glamour I'm afraid.