Boffins from Vrije Universiteit in Amsterdam and ETH in Zurich have bypassed memory chip defenses to execute a successful browser-based Rowhammer side-channel attack dubbed SMASH.
Rowhammer refers to a technique that computer security researchers began to explore around 2014: “hammering” RAM chips with a series of rapid write operations. This process abuses the electronics enough to flip stored bits, potentially introducing errors that can be exploited for further gain.
Memory specifications introduced in 2014 added optional support for a mitigation called Target Row Refresh (TRR), a DRAM command available to memory controllers to refresh memory cell rows adjacent to particularly active areas as a way to prevent corruption.
But computer scientists from VU, ETH, and Qualcomm last year described a way to defeat TRR locally in a paper titled, TRRespass: Exploiting the Many Sides of Target Row Refresh [PDF].
It’s Hammer Time!
Their SMASH attack can slowly but arbitrarily read and write memory in Firefox (v. 81.0.1) on an updated Ubuntu 18.04 system with Linux kernel 4.15.0-111-generic installed. That can potentially allow malicious code to execute; the team wrote in their paper [PDF] that their technique can “fully compromise the Firefox browser in 15 minutes” from memory manipulation, on average.
Below is a video demonstrating a basic SMASH attack.
While working to overcome these hurdles they found that rather than blindly generating as many memory access patterns as possible over the shortest period of time, they could achieve better results by scheduling the sequence of cache hits and misses – synchronizing memory requests with DRAM refresh commands – to avoid TRR.
Intel’s SGX cloud-server security defeated by $30 chip, electrical shenanigans
“Our work confirms that the Rowhammer bug continues to threaten web users,” the researchers say. “Worse still, our insights on synchronization show that the attacker has more control than previously thought, and will make it even harder to build the proper Rowhammer defense we need as long as the bug itself persists.”
SMASH can be mitigated in software, though not without cost. Disabling Linux memory management scheme Transparent Huge Pages (THP) – used to build efficient attack patterns – works. Doing so, however, affects system performance. Pointer authentication codes (PACs), which protect the integrity of pointers in software and hardware, should also be effective, the researchers say.
As for eliminating Rowhammer-based attacks, the researchers observe that various software fixes proposed all have disadvantages. They argue that Rowhammer as a DRAM vulnerability should be fixed in hardware, though they observe it will be years before defenses against recently developed techniques make it to market.
“Furthermore, given that future DRAM devices will feature even smaller transistors, it remains to be seen whether it is possible to build effective mitigations for such devices,” they say. ®