Is it still possible to run malware in a browser using JavaScript and Rowhammer? Yes, yes it is (slowly)

Firefox 'fully compromised' in 15 minutes via SMASH attack

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.

Initially, Rowhammer attacks had to be conducted locally, though by 2016 [PDF], the technique had been refined to work remotely using JavaScript in, say, a web browser.

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!

On Tuesday, some of those same researchers and some new ones – Finn de Ridder, Pietro Frigo, Emanuele Vannacci, Herbert Bos, Cristiano Giuffrida, and Kaveh Razavi – unveiled SMASH (Synchronized MAny-Sided Hammering), a web-based attack on Mozilla's Firefox browser that overcomes TRR and several challenges associated with executing Rowhammer via JavaScript.

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.

To break Firefox, the boffins had to deal with the lack of cache flushing instructions in JavaScript, which had made Rowhammer impractically slow against web browsers. They also had to devise alternative memory access patterns because they couldn't count on large physically contiguous memory regions in JavaScript.

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. ®

Send us news

Memory safety is the new black, fashionable and fit for any occasion

Calls to avoid C/C++ and embrace Rust grow louder

Smart ovens do really dumb stuff to check for Wi-Fi

Pinging search services in the US, China, Russia perhaps not ideal for privacy

ChatGPT talks its way through Wharton MBA, medical exams

This perhaps says more about the tests than the artificial intelligence on display

OpenAI's ChatGPT is a morally corrupting influence

No principles or virtues, people accepting everything it says – this bot is perfect for political life

Python Package Index found stuffed with AWS keys and malware

British developer uses homegrown scanning tool to check for risks

China aims to grow local infosec industry by 30 percent a year, to $22 billion by 2025

Optimistically suggests international collaboration – including on standards – will help it get there

Thousands of Sophos firewalls still vulnerable out there to hijacking

As hundreds of staff axed this week

Months after NSA disclosed Microsoft cert bug, datacenters remain unpatched

You know when we all said quit using MD5? We really meant it

Nearly 300 MSI motherboards will run any old code in Secure Boot, no questions asked

'I believe they made this change deliberately' claims researcher

Azure Stack HCI gets extra protection with 'long-requested feature'

Kerberos support in WAC and a host of other goodies also added

Apple emits emergency patch for older iPhones after snoops pounce on WebKit hole

Also: Yay for Data Privacy Day!

PayPal says crooks poked around 35,000 accounts in credential stuffing attack

That passwordless option is looking really good right about now