From: Kees Cook <keescook@chromium.org>
To: "Hanno Böck" <hanno@hboeck.de>
Cc: linux-kernel@vger.kernel.org, security@kernel.org
Subject: Re: VDSO randomization not very random
Date: Thu, 11 Dec 2014 14:02:29 -0800 [thread overview]
Message-ID: <20141211220229.GR18807@outflux.net> (raw)
In-Reply-To: <20141211224501.2292cdee@pc>
Hi Hanno,
On Thu, Dec 11, 2014 at 10:45:01PM +0100, Hanno Böck wrote:
> Hello,
>
> I already reported this into your bugzilla, however Greg KH told me it
> might be a better idea to post it here:
>
> With current Linux kernels it seems the address randomization for
> loading the vdso library is not that random and can easily be
> bruteforced.
>
> This can easily be demonstrated. Get libvdso address from one
> executable:
> $ ldd /usr/bin/less|grep vdso
> linux-vdso.so.1 (0x00007fff73bfe000)
>
> Now run ldd mutliple times and check if the same address appears:
> c=0; while (true); do let c=c+1; ldd /usr/bin/less|grep
> 0x00007fff73bfe000; [ "$?" == 0 ] && echo $c; done
>
> It usually takes only a few seconds and around 1000-2000 tries until
> the loading address is repeated (note that results may vary, it seems
> the randomization is biased, some values repeat more often than others).
>
> This information is mostly from this blog entry:
> http://v0ids3curity.blogspot.in/2014/12/return-to-vdso-using-elf-auxiliary.html
> And here's a thread on oss-security discussing the issue:
> http://www.openwall.com/lists/oss-security/2014/12/09/10
>
> The latest version of paxtest added a check for this that guesses the
> randomness of vdso:
> https://grsecurity.net/~spender/paxtest-0.9.13.tar.gz $ ./randvdso
> VDSO randomisation test : 11 quality bits (guessed)
>
> Bugzilla entry:
> https://bugzilla.kernel.org/show_bug.cgi?id=89591
I'm hoping this will get addressed as part of the discussion around
the "ASLRv3" patches. PIE (as well as VDSO) randomization has been a
per-arch implementation, and it would be best to unify this in a common
high-entropy solution.
I think the problem with VDSO right now is that it is randomized in
relationship to the stack, rather than being randomized on its own.
-Kees
--
Kees Cook
Chrome OS Security
next prev parent reply other threads:[~2014-12-11 22:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-11 21:45 VDSO randomization not very random Hanno Böck
2014-12-11 22:02 ` Kees Cook [this message]
2014-12-11 22:41 ` Andy Lutomirski
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=20141211220229.GR18807@outflux.net \
--to=keescook@chromium.org \
--cc=hanno@hboeck.de \
--cc=linux-kernel@vger.kernel.org \
--cc=security@kernel.org \
/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