Practically all Android-powered devices released in the last six years—basically, from the Ice Cream Sandwich (4.0) era to now—are vulnerable to a variant of the Rowhammer memory attack called RAMpage.
Previous software protections against Rowhammer, and hardware protections in LPDDR2, 3, and 4 type RAM are insufficient in fully protecting against the attack, according to a research report penned by a group of researchers from Vrije Universiteit Amsterdam, Amrita University India, UC Santa Barbara, and EURECOM.
As a quick review, Rowhammer is a design flaw present in modern DRAM packages that causes memory cells to improperly interact electrically amongst themselves, making it possible to forcibly leak contents of adjacent memory rows that were not directly accessed. This can be exploited by attackers to read the memory contents of other running programs, and to gain administrative privileges in a given system. Here's an explanation of the concept from Google's Project Zero:
By repeatedly accessing two "aggressor" memory locations within the process's virtual address space, they can cause bit flips in a third, "victim" location. The victim location is potentially outside the virtual address space of the process — it is in a different DRAM row from the aggressor locations, and hence in a different 4k page (since rows are larger than 4k in modern systems).
This works because DRAM cells have been getting smaller and closer together. As DRAM manufacturing scales down chip features to smaller physical dimensions, to fit more memory capacity onto a chip, it has become harder to prevent DRAM cells from interacting electrically with each other. As a result, accessing one location in memory can disturb neighbouring locations, causing charge to leak into or out of neighbouring cells. With enough accesses, this can change a cell's value from 1 to 0 or vice versa.
SEE: Cybersecurity strategy research: Common tactics, issues with implementation, and effectiveness (Tech Pro Research)
Variants of Rowhammer attacks have been developed since the publication of the first paper on the concept in March 2015. On Android, the most relevant was Drammer, a variant that prompted Google to disable the contiguous heap, and later the kmalloc heap to prevent attackers from gaining a large enough amount of continuous memory needed to execute an attack. While this was effective in certain situations, it was still not secure enough to solve the problem, moreover, and the behavior was not consistent across devices.
The RAMPage attack (CVE-2018-9442) relies on the behavior of an Android component called ION, the paper noted, which was introduced in 4.0 as a replacement for vendor-specific memory management interfaces that had previously been employed by device manufacturers. ION was also intended to work as an intermediary between memory allocations between the core Android OS and userspace apps.
While not impossible, RAMPage is more difficult to practically attack on end-user devices, partially as vendor-specific or device-specific issues make it more difficult to reliably create the conditions that allow for exploitation. Because of the degree of precision involved, it would theoretically be possible that the same model phone with DRAM from different vendors would have different avenues to attack, or that certain optional hardware protections of LPDDR4, if added at manufacturing time, would partially mitigate the attack, the paper noted.
Additionally, while the RAMPage attack was only demonstrated on an LG G4, it is possible that it may be applicable toward iOS devices and other devices using LPDDR2, 3, or 4 chips and running software with similar memory management techniques.
That said, the researchers have proposed a fix for RAMPage called GuardION. From their tests in the whitepaper, they found "results in a performance degradation of 6.6%, which we believe is still acceptable. The geomean, however, indicates a performance improvement of 5.8%," which the researchers indicate is because the fix allows for previous patches against Drammer (which are now rendered ineffectual) to be disabled. However, according to the researchers, the GuardION patch "results in more 'performance overhead' on real-world apps than we report in our paper," adding "We are in communication with the Android security team to figure out what a real-world benchmark looks like so that we can hopefully improve our implementation."
The big takeaways for tech leaders:
- The RAMPage attack relies on the behavior of an Android component called ION, a replacement for vendor-specific memory management interfaces, and was intended to be an intermediary between core Android OS and userspace apps.
- Security researchers have proposed a solution to RAMPage, though Google has yet to implement it in Android, citing performance concerns.
- 10 ways to raise your users' cybersecurity IQ (free PDF) (TechRepublic)
- Vendors are shipping Android devices with diagnostic port exposed (ZDNet)
- Android P: Cheat sheet (TechRepublic)
- Raspberry Pi-style Renegade Elite runs Android Oreo on six-core, 4K board (ZDNet)
- PowerHammer lets hackers steal data from air-gapped computers through power lines (TechRepublic)
James Sanders is a Tokyo-based programmer and technology journalist. Since 2013, he has been a regular contributor to TechRepublic and Tech Pro Research.