From: Eric Dumazet <eric.dumazet@gmail.com>
To: Victor van der Veen <vvdveen@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: When was ASLR introduced in the Linux kernel?
Date: Tue, 30 Nov 2010 13:15:24 +0100 [thread overview]
Message-ID: <1291119324.2904.51.camel@edumazet-laptop> (raw)
In-Reply-To: <1291117660.3206.11.camel@D430>
Le mardi 30 novembre 2010 à 12:47 +0100, Victor van der Veen a écrit :
> Hi,
>
> - When was ASLR introduced in the Linux kernel (not PaX/ExecShield)?
> - When was ASLR enabled by default?
> - What's the current state of ASLR in the Linux kernel? Is it still
> under development? Or should we rely on the PaX/ExecShield patches?
>
> Wikipedia states that "a weak form of ASLR exists in the linux kernel
> since version 2.6.12 (June 2005)", but I could not find any proof that
> backs this up. I grepped changelogs of the entire 2.6 kernel, but I was
> unable to find any relevant information. Grepping the source code did
> not help either. Any more Google results all quote the same wikipedia
> line.
>
randomize-va-space:
echo val >/proc/sys/kernel/randomize_va_space
vi +391 Documentation/sysctl/kernel.txt
This option can be used to select the type of process address
space randomization that is used in the system, for architectures
that support this feature.
0 - Turn the process address space randomization off. This is the
default for architectures that do not support this feature anyways,
and kernels that are booted with the "norandmaps" parameter.
1 - Make the addresses of mmap base, stack and VDSO page randomized.
This, among other things, implies that shared libraries will be
loaded to random addresses. Also for PIE-linked binaries, the
location of code start is randomized. This is the default if the
CONFIG_COMPAT_BRK option is enabled.
2 - Additionally enable heap randomization. This is the default if
CONFIG_COMPAT_BRK is disabled.
There are a few legacy applications out there (such as some ancient
versions of libc.so.5 from 1996) that assume that brk area starts
just after the end of the code+bss. These applications break when
start of the brk area is randomized. There are however no known
non-legacy applications that would be broken this way, so for most
systems it is safe to choose full randomization.
Systems with ancient and/or broken binaries should be configured
with CONFIG_COMPAT_BRK enabled, which excludes the heap from process
address space randomization.
next prev parent reply other threads:[~2010-11-30 12:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-30 11:47 Victor van der Veen
2010-11-30 12:15 ` Eric Dumazet [this message]
2010-11-30 17:50 ` Victor van der Veen
2010-11-30 18:10 ` Eric Dumazet
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=1291119324.2904.51.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=vvdveen@gmail.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®