Re: Information about ASLR (Address Space Layout Randomization) in CentOS 5

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



In article <e814db780812120817m39bdf309l9591f53c90cb38b1@xxxxxxxxxxxxxx>,
Filipe Brandenburger <filbranden@xxxxxxxxx> wrote:
> Hi,
> 
> On Fri, Dec 12, 2008 at 11:10, Tony Mountifield
> <tony@xxxxxxxxxxxxxxxxxxx> wrote:
> > From what I've been able to find, you can disable ASLR completely by
> > putting the following line in /etc/sysctl.conf:
> > kernel.randomize_va_space = 0
> 
> Thanks, I had just found that out, we tested it and indeed it works.
> 
> > Alternatively, you can run your program with ASLR disabled by using
> > setarch to invoke it:
> > setarch `uname -m` -R yourprog <yourprogoptions>
> 
> I didn't know about this one, sounds good. I'll have a good look at
> "man setarch" and also try this out in the next couple of days.
> 
> Quick question: from "man setarch", the effect of using -R is "turns
> on ADDR_NO_RANDOMIZE". Is it possible to use this flag
> ADDR_NO_RANDOMIZE somewhere that will force that binary to use that
> option always? I've read something about ELF headers, I wonder if that
> is something that could be set there, and if it is, how do I change
> the ELF headers to set it?

I didn't get as far as looking up ADDR_NO_RANDOMIZE, so can't answer your
question. But at least it's something more specific to google!

Glad the other suggestion worked.

Cheers
Tony
-- 
Tony Mountifield
Work: tony@xxxxxxxxxxxxx - http://www.softins.co.uk
Play: tony@xxxxxxxxxxxxxxx - http://tony.mountifield.org
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux