Security Experts:

Google Android 4.1 Jelly Bean Bolsters ASLR Mitigations

Google has expanded its use of address space layout randomization (ASLR) in Android 4.1, AKA Jelly Bean, in a bid to help thwart exploits.

Address space layout randomization randomly arranges the location where system executables are loaded into memory, thereby making life more difficult for hackers seeking to target certain areas. Google first introduced ASLR support in Android 4.0, but it only randomized certain locations in memory, limiting its effectiveness to mitigate certain attacks. But according to researcher Jon Oberheide of Duo Security - who criticized the implementation of ASLR in 4.0 - Google has now stepped up its game in the latest version of the Android operating system.

"As we mentioned in our previous post on Android ASLR, the executable mapping in the process address space was not randomized in Ice Cream Sandwich [Android 4.0], making ROP-style attacks possible using the whole executable as a source of gadgets," Oberheide blogged. "In Jelly Bean, most binaries are now compiled/linked with the PIE flag (commits for the linkerARM and x86), which means the executable mapping will be properly randomized when executed."

Additionally, kernel.randomize_va_space sysctl "has now been set to 2 in Jelly Bean, enabling randomization of the heap/brk space, which was lacking in Ice Cream Sandwich," he added.

The final piece of the new ASLR implementation involves the custom Android linker, which was not randomized in Ice Cream Sandwich.

"In Jelly Bean, the linker is now randomized in the process address space," he explained. "This means that the deficiencies in ICS pointed out in our previous blog post have all been addressed in Jelly Bean, giving it full stack, heap/brk, lib/mmap, linker, and executable ASLR."

Now that ASLR is implemented more extensively, Oberheide predicts attackers will start to look harder for weaknesses of 32-bit ASLR that can be exploited, as well as other more platform or architecture-specific ASLR bypasses.

"While Android is still playing a bit of catch-up, other mobile platforms are moving ahead with more innovation exploit mitigation techniques, such as the in-kernel ASLR present in Apple’s iOS 6," the researcher argued. "One could claim that iOS is being proactive with such techniques, but in reality, they’re simply being reactive to the type of exploits that typically target the iOS platform. However, Apple does deserve credit for raising the barrier up to the point of kernel exploitation by employing effective userspace mitigations such NX, ASLR, and mandatory code signing. Thankfully, Android is getting there, and Jelly Bean is a major step towards that goal."

view counter