top | item 20157291

RAMBleed Attack – Reading Bits in Memory Without Accessing Them

385 points| ga-vu | 6 years ago |rambleed.com | reply

134 comments

order
[+] rsweeney21|6 years ago|reply
Shortly after I joined Microsoft in 2004, all new feature work on Windows Longhorn (Vista) was halted. There had been yet another high profile computer virus on Windows XP caused by a buffer overflow. It was an all-hands-on-deck type moment. Everyone spent weeks adding SAL (source-code annotation language) annotations to the entire Windows code base. SAL annotations enabled automated source code analysis to identify potential buffer overflow bugs and other common security vulnerabilities. Once annotated, we identified and fixed who knows how many hundreds of security vulnerabilities in Windows.

This colossal security update was released as Windows XP Service Pack 2. This is the beauty of software.

Hardware vulnerabilities scare me. There are millions of Intel CPUs and DRAM modules installed in data centers and PCs around the world. When we find vulnerabilities in hardware how are we supposed to fix them?

The past few years have been really scary for me as a software engineer. I keep thinking that the next one will pop the software bubble.

[+] anaphor|6 years ago|reply
Maybe hardware will have to become more programmable in the future so you can fix some of these flaws without needing to replace anything.
[+] mehrdadn|6 years ago|reply
> SAL annotations

Are there tools for developers to use these (e.g. with VC++), or are they all Microsoft internal?

[+] mey|6 years ago|reply
I am wondering if/when the first class action lawsuits will fly against the hardware manufacturers.
[+] AnaniasAnanas|6 years ago|reply
Dependent types can prevent buffer overflow attacks without any additional runtime overhead.
[+] musicale|6 years ago|reply
Whenever you have sharing, you usually have side channels. We're going to see more and more of this until we have much better hardware isolation.

This is a kind of obvious variant of Rowhammer, which hasn't generally been fixed AFAIK.

Hardware in the late 2010s seems a bit like Windows in the late 1990s - a house of cards waiting to collapse, but the dominant vendors know that very few customers are willing to pay more for security and reliability vs. performance/features/new and shiny.

(So if we're lucky then we'll end up with a "more secure" version of hardware that is analogous to... Windows Vista.)

[+] colechristensen|6 years ago|reply
Real-world side channels are going to start getting more attention as the technology and techniques for extracting information from EM radiation from circuits (not radios) leaking state improve.
[+] nine_k|6 years ago|reply
From the speed figures (many hours of setup and runtime, very low read rate) I can suggest that restarting your important service often, and moving it between VMs, would prevent an attack like that.

In many deployments, automatic scaling and failover already provide the necessary mechanics. Then the Chaos Monkey suddenly becomes a security enforcement tool :)

[+] taneq|6 years ago|reply
> From the speed figures ...

You know what software's like, though. What today takes the blood of a virgin and a dozen dribbly candles will be doable next week with a toothpick and three cc's of mouse blood.

[+] woliveirajr|6 years ago|reply
If I understood correctly, this is orders of magnitude worst that RowHammer, as it is kind of passive: you set some program to do the RowHammer side, within its own memory space, and then use RAMBleed to see changes from memory cells, not exactly the ones that were RowHammered. Is that it ?
[+] deckar01|6 years ago|reply
> a bit is more likely to flip when the bits above and below it have the opposite charge. ... To exploit this effect, we developed novel memory massaging techniques to carefully place the victim's secret data in the rows above and below the attacker's memory row.

The secret data has to be duplicated, column aligned, and have a single unallocated row between it. Controlling the alignment of the secret data seems like a major complication for realistic exploitation.

Edit: The strategy in the paper requires allocating a bunch of physical memory from all the small blocks so that memory allocation requests from a new process are allocated deterministically to a desired physical row.

[+] calibas|6 years ago|reply
Seems RowHammer can flip bits and RAMBleed uses RowHammer to also read memory stored nearby.
[+] RcouF1uZ4gsC|6 years ago|reply
These recent CPU and Memory vulnerabilities are calling into question the economics of the public cloud. A lot of these bugs only really matter if you have multiple programs from different entities running on the same computer system. A company that has its own private cloud, doesn't have to care about these attacks so much.

The cost of mitigating these attacks both in terms of CPU performance and increased hardware costs may offset some of the economies of scale.

[+] tgsovlerkhgsel|6 years ago|reply
Since the mention of OpenSSH can cause readers to jump to false conclusions: This attack still requires that the attacker's code runs on the victim machine; it is not a remote vulnerability.

(I don't think the authors implied otherwise, I just know that I somehow got confused for a second.)

[+] Rapzid|6 years ago|reply
Can we talk about these attack names? Everything bleeds these days. "RAMSack" is a legit missed opportunity.
[+] 0815test|6 years ago|reply
Perhaps I'm missing something really obvious, but doesn't hardware-provided memory encryption solve this quite handily? You might be able to read single bits of raw physical memory from another process, but this won't tell you anything substantial about what that process is up to.
[+] heybrendan|6 years ago|reply
Anyone else love how vulnerabilities these days have full on marketing-esque campaigns backing them? In any case, if it increases awareness, I'm mostly supportive.

Allow me to save some time, from TFA:

> Is there a CVE number?

> Yes, see CVE-2019-0174 [1].

[1] https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-0174

---

> What is RAMBleed?

> Previous attacks exploited the Rowhammer effect to write (or flip) bits in the victim's memory. RAMBleed is different in that it uses Rowhammer for reading data stored inside the computer's physical memory. As the physical memory is shared among all process in the system, this puts all processes at risk.

> What data can be read by RAMBleed?

> While the end-to-end attack we demonstrated read out OpenSSH 7.9's RSA key, RAMBleed can potentially read any data stored in memory. In practice, what can be read depends on the victim program's memory access patterns.

> What technologies are affected by RAMBleed?

> RAMBleed relies on Rowhammer-induced bit flips to read privileged memory. As such, any system that uses Rowhammer-susceptible DIMMs is vulnerable. Previous research has demonstrated bit flips on both DDR3 and DDR4 with TRR (targeted row refresh) enabled. While we demonstrated our attack on a desktop machine and an ECC enabled server machine, Rowhammer attacks have been demonstrated against both mobile devices and laptops. As such, we suspect that many classes of computers are susceptible to RAMBleed.

> How can I mitigate this issue?

> Users can mitigate their risk by upgrading their memory to DDR4 with targeted row refresh (TRR) enabled. While Rowhammer-induced bit flips have been demonstrated on TRR, it is harder to accomplish in practice.

> Memory manufacturers can help mitigate this issue by more rigorously testing for faulty DIMMs. Furthermore, publicly documenting vendor specific TRR implementations will facilitate a stronger development process as security researchers probe such implementations for weaknesses.

[+] mtgx|6 years ago|reply
Unless your CEO loves talking about CVEs all day long, I think we should all be grateful for these good-looking marketing campaigns for serious security issues.
[+] cr0sh|6 years ago|reply
This really sux - that the fix is "Move to DDR with TRR enabled - which means for many people: Buy a new computer. Or new RAM. Or new RAM, motherboard, CPU, etc - ie - a new computer; ie - spend a lot of money".

But there really isn't any other good options.

[+] lacker|6 years ago|reply
They need to step up their marketing game. They don't even have a Twitter account to promote Rambleed. twitter.com/rambleed isn't taken yet ;-)
[+] polskibus|6 years ago|reply
Does this affect public cloud providers? Can it be used to obtain data from other VMs running on the same host?
[+] rasz|6 years ago|reply
Secure Memory Encryption (SME) and Secure Encrypted Virtualization (SEV) should be a good counter measure.
[+] the8472|6 years ago|reply
If this attack is a concern then so is rowhammer. So you can basically ask whether cloud providers have mitigated rowhammer.

AMD's SEV might help protecting VMs from each other.

[+] jontro|6 years ago|reply
Not sure if this attack is feasible cross VM as long as the memory is not deduped/over provisioned. You need to make sure the victim allocates memory between the attacker controlled memory. Edit: As long as the memory is not deduped on the VMs it should not be possible since it won't be interleaved
[+] snazz|6 years ago|reply
It sure sounds like it—have there been any responses from the major cloud providers? This doesn’t exactly seem like something that can be patched easily....
[+] air7|6 years ago|reply
This is a tangent, but I find it (somewhat) annoying when f.a.q's don't answer their own questions. I see this happen occasionally and I always wonder if it's intentional to side-step an issue by raising it yourself, and then answering something else.

> Can RAMBleed be detected by antivirus? > We believe that it is very unlikely that any antivirus software on the market currently detects RAMBleed.

[+] tedunangst|6 years ago|reply
What should they say? It's theoretically possible for any AV to detect the bug (how else did they prove it exists?) but a simple "Yes" hardly conveys accurate information.
[+] sumnulu|6 years ago|reply
I find it the other way around annoying, talking in absolutes when one is not sure.
[+] thatcat|6 years ago|reply
Seems like this would happen when many people ask the same question and you don't have an answer so you post the best response you can.
[+] pkaye|6 years ago|reply
> Users can mitigate their risk by upgrading their memory to DDR4 with targeted row refresh (TRR) enabled.

How does one enable this feature? Is it in the BIOS?

[+] javert|6 years ago|reply
I want to find a way to run each application I use on its own machine so that memory attacks (like spectre/meltdown, etc.) are theoretically impossible.

I still want to have a reasonable computing experience (e.g. copy + paste works and the experience is kind of like using one computer the normal way).

Any ideas? I was thinking some kind of remote desktop setup with a bunch of cheap boxes, each running Linux, on a LAN.

[+] ClassyJacket|6 years ago|reply
Run X on one box connected to your programs over SSH running on separate boxes?
[+] akersten|6 years ago|reply
I am so torn about the whole vulnerability branding thing. On the one hand, it gives a great amount of visibility and motivation for brass to actually provide for getting prod patched when IT might not have had the political capital to do so otherwise. But on the other hand, I think about things like:

-- What happens when the cure is worse than the disease (some variants of Spectre), and we "have to" patch because otherwise we're "not secure against this scary sounding thing." It takes a lot of agency away from the IT department to make an informed decision about the appropriate mitigation and threat model, and turns it into a business requirement regardless of the trade-off - because brass "understands" Spectre, they don't understand CVE-1234

-- Or, theoretical exploits that aren't practical in the real world, but we spend a lot of effort or make tradeoffs to fix just because someone needs some material for their PhD.

-- What do you call it when we find another way to read RAM next year - RAMBleed2? I guess.

[+] dmitrygr|6 years ago|reply
Very cool and scary, but in reality actually exploiting this without a cooperative target, and a relatively quiet machine is quite unlikely. Does not mean it shouldn't be looked at, but do not lose sleep over it.
[+] vardump|6 years ago|reply
> actually exploiting this without a cooperative target, and a relatively quiet machine is quite unlikely.

... until someone does it somewhat reliably. I always assume my knowledge and imagination does not come close the collective creativity of exploiters.

[+] tathougies|6 years ago|reply
Why does every new attack have a homepage these days?
[+] anon_cow1111|6 years ago|reply
Well, this sounds really bad. Though on a positive note, I guess we could try a similar exploit in meatspace to figure out if we're living in a simulation or something.

/sarc but also maybe not