Bug 89591

Summary: VDSO randomization not very random
Product: Other Reporter: Hanno Boeck (hanno)
Component: OtherAssignee: other_other
Status: NEW ---    
Severity: normal CC: luto
Priority: P1    
Hardware: All   
OS: Linux   
URL: http://v0ids3curity.blogspot.in/2014/12/return-to-vdso-using-elf-auxiliary.html
Kernel Version: 3.17.4 Subsystem:
Regression: No Bisected commit-id:

Description Hanno Boeck 2014-12-11 17:22:24 UTC
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:
And here's a thread on oss-security discussing the issue:

The latest version of paxtest added a check for this that guesses the randomness of vdso:
$ ./randvdso 
VDSO randomisation test                  : 11 quality bits (guessed)
Comment 1 Andy Lutomirski 2014-12-20 00:44:58 UTC
Hopefully this is a good enough improvement: