On-Prem

Systems

AMD secure VM tech undone by DRAM meddling

Boffins devise BadRAM attack to pilfer secrets from SEV-SNP encrypted memory


Researchers have found that the security mechanism AMD uses to protect virtual machine memory can be bypassed with $10 of hardware – and perhaps not even that.

AMD Secure Encrypted Virtualization (SEV) is designed to provide a Trusted Execution Environment (TEE) that safeguards computation and memory, along the lines of similar TEE offerings from rival vendors like Intel's Software Guard Extensions (SGX) and Trusted Domain Extensions (TDX), and Arm's Confidential Compute Architecture (CCA).

SEV and the like are commonly used by cloud service providers to ensure that those with access to datacenter hardware cannot siphon secrets from tenant virtual machines. These technologies encrypt memory, so that users have some defense against an untrustworthy provider or snooping authorities.

Boffins from KU Leuven in Belgium, the University of Lübeck in Germany, and the University of Birmingham in the UK have taken a look at AMD SEV-SNP (Secure Nested Paging) – a recent SEV enhancement that adds protection against memory remapping attacks from a malicious hypervisor. And they've found that it's not as secure as its name suggests.

In a paper [PDF] titled "BadRAM: Practical Memory Aliasing Attacks on Trusted Execution Environments," co-authors Jesse De Meulemeester, Luca Wilke, David Oswald, Thomas Eisenbarth, Ingrid Verbauwhede, and Jo Van Bulck describe how they devised a way to bypass TEE-based memory access restrictions with a Raspberry Pi Pico, a DDR socket, and a 9V battery.

The BadRAM attack – which does require physical access to hardware (for example, a rogue admin scenario) – works by abusing the SPD (Serial Presence Detect) chip on a memory module, which identifies the module to hardware. It manipulates the SPD into creating aliases for physical memory, which subsequently can be scoured for secrets in contravention of the TEE integrity goals.

"In our attacks, we double the apparent size of the Dual Inline Memory Module (DIMM) installed in the system to trick the CPU's memory controller into using additional 'ghost' addressing bits," the authors explain. "These addressing bits will be unused within the virtually enlarged DIMM, creating an interesting aliasing effect where two different physical addresses now refer to the same DRAM location."

The technique, which applies to DDR4 and DDR5 memory, could potentially also be functional for local, software-only attackers without physical access to hardware (via SSH), because some DRAM vendors leave the SPD chip unlocked. While most vendors lock their memory modules, per the JEDEC specification, the authors report they found at least two off-the-shelf DDR4 DIMMS from Corsair "that leave the base configuration entirely unprotected, possibly exposing them to software-only BadRAM attacks."

Older memory like DDR3 that would otherwise prevent memory size meddling through permanent write protection can also be affected – by removing or swapping the SPD, it's claimed.

"BadRAM completely undermines trust in AMD's latest Secure Encrypted Virtualization (SEV-SNP) technology, which is widely deployed by major cloud providers, including Amazon AWS, Google Cloud, and Microsoft Azure," Jo Van Bulck, professor in the DistriNet lab at the Department of Computer Science of KU Leuven, told The Register in an email.

"BadRAM for the first time studies the security risks of bad RAM – rogue memory modules that deliberately provide false information to the processor during startup. We show how BadRAM attackers can fake critical remote attestation reports and insert undetectable backdoors into any SEV-protected VM."

Intel scalable SGX and TDX are not affected, because they implement countermeasures against memory aliasing. Arm CCA appears to be protected based on the specification, according to the boffins, but no hardware was available to test it. The older, discontinued classic version of SGX is said to be partially vulnerable.

The researchers write that they disclosed their SPD aliasing attack and proof of concept code to AMD on February 26, 2024. They are scheduled to present their paper at the 2025 IEEE Symposium on Security and Privacy.

AMD is tracking the vulnerability under CVE-2024-21944 and AMD-SB-3015. The Ryzen designer confirmed to The Register that it plans to issue an advisory on Tuesday, December 10, 2024.

"AMD believes exploiting the disclosed vulnerability requires an attacker either having physical access to the system, operating system kernel access on a system with unlocked memory modules, or installing a customized, malicious BIOS," the Epyc house explained in a statement.

"AMD recommends utilizing memory modules that lock Serial Presence Detect (SPD), as well as following physical system security best practices. AMD has also released firmware updates to customers to mitigate the vulnerability." ®

Send us news
10 Comments

Additional Microprocessors Decoded: Quick guide to what AMD is flinging out next for AI PCs, gamers, business

Plus: A peek at Nvidia's latest hype

Microsoft eggheads say AI can never be made secure – after testing Redmond's own products

If you want a picture of the future, imagine your infosec team stamping on software forever

Free-software warriors celebrate landmark case that enforced GNU LGPL

On the Fritz: German router maker AVM lets device rights case end after coughing up source code

Biden signs sweeping cybersecurity order, just in time for Trump to gut it

Ransomware, AI, secure software, digital IDs – there's something for everyone in the presidential directive

Look for the label: White House rolls out 'Cyber Trust Mark' for smart devices

Beware the IoT that doesn’t get a security tag

OpenAI's ChatGPT crawler can be tricked into DDoSing sites, answering your queries

The S in LLM stands for Security

Sage Copilot grounded briefly to fix AI misbehavior

'Minor issue' with showing accounting customers 'unrelated business information' required repairs

GoDaddy slapped with wet lettuce for years of lax security and 'several major breaches'

Watchdog alleged it had no SIEM or MFA, orders rapid adoption of basic infosec tools

3Blue1Brown copyright takedown blunder by AI biz blamed on human error

Worker copy-pasted wrong YouTube URL, says ChainPatrol

CISA: Wow, that election had a lot of foreign trolling. Trump's Homeland Sec pick: And that's none of your concern

Cyber agency too 'far off mission,' says incoming boss Kristi Noem

Microsoft sues 'foreign-based' cyber-crooks, seizes sites used to abuse AI

Scumbags stole API keys, then started a hacking-as-a-service biz, it is claimed

Ransomware crew abuses AWS native encryption, sets data-destruct timer for 7 days

'Codefinger' crims on the hunt for compromised keys