Another Flip in the Wall of Rowhammer Defenses
arxiv.org
arxiv.org
On the plus side, using RowHammers to make a fully working exploits is much harder than most other types of exploits, and the exploits people have managed to make so far have all involved major caveats (like requiring hundreds of hours of full CPU usage to work, or providing memory layout information that would be difficult for attackers to obtain). Still, the fact that this class of exploit has proven so difficult to fully fix is worrying.
There's a section of proposed mitigations at the end, one of which sounds particularly promising, though:
> "Kim et al. [38] and Kim et al. [37] proposed to eliminate bit flips in hardware by probabilistically opening adjacent or non-adjacent rows, whenever a row is opened or closed. As an ongoing Rowhammer attack would open and close a certain row repeatedly, the vulnerable adjacent rows would be refreshed before bit flips occur. We consider their approaches as a possible solutions to mitigate Rowhammer attacks in the future."
I think that is bit misleading; this paper specifically did not analyze the effects of ECC at all, all their work is strictly focused on non-ECC systems. All the references to ECC are to other papers. Furthermore, while not "fully adequate", ECC is still quite effective mitigation
> [...] existing hardware countermeasures such as using memory with error-correction codes (ECC-RAM) appear to make Rowhammer attacks harder [...]
> ECC RAM can detect and correct 1-bit errors and, thus, deal with single bit flips caused by the Rowhammer attack. [...] However, uncorrectable multi-bit flips can be exploitable [2, 3, 42] or can result in a denial-of-service attack similar as described in Section IX-A depending on how the operating system responds to the error
Unless the situation has radically changed, my understanding is that ECC changes Rowhammer from a practical attack to more of a theoretical threat. And generally DoS is highly preferable over something like privilege escalation, which is further benefit of ECC.
Consumer-grade ECC can't come soon enough.
I agree with you entirely, to be sure. A quick Google led me to here:
https://www.reddit.com/r/Amd/comments/6f7s28/what_is_the_sta...
It's a thread that is about four months old and they are discussing ECC support with Rizen CPUs. It looks like they have some current-gen solutions.
"ECC RAM can detect and correct 1-bit errors and, thus, deal with single bit flips caused by the Rowhammer attack. Furthermore, IBM’s Chipkill error correction [27] allows to successfully recover from 3-bit errors. However, uncorrectable multi-bit flips can be exploitable [2, 3, 42] "
Maybe that, combined with a lot of weasel words about the effectiveness of ECC muddy the water.
I suspect AMD's new memory encryption would provide significant protection as specific bit flips in rows that do not share the same key would be totally unpredictable.
There are reasonable defenses possible inside the DRAM. They currently depend on the fact that repeated reads of the same data are rare, because of caches. DRAM should insert a delay after hitting the same row N times between refreshes, depending on its analog parameters. It won't affect performance in any normal application.
Don't forget the simplest one: make them like they used to, with a much bigger margin of reliability. Rowhammer wasn't a problem before ~2010 or so, if I remember the original paper correctly. DRAM these days is operating too close to the limits, with razor-thin margins.
Indeed, any new DRAM I purchase gets run through a 72-hour stress test and returned as defective if so much as one bit is in error during that time.
I like to make an analogy with where flash memory is heading today with multi-level cells (multiplicative capacity increase; exponential endurance and retention decrease) and a phrase to keep in mind: Faster and bigger storage means nothing if it barely works. Contrary to what all the marketing seems to imply, some people actually want memory that works perfectly.
It's unfortunate that academics feel OK about making misleading statements in this space. SGX enclaves must be signed by Intel to work, so I doubt very much that they abused SGX in this way. What they mean is that they could have done, if they had got Intel to approve their attack, which is a pretty freaking huge caveat.