Intel Flaw Lets Hackers Siphon Secrets from Millions of PCs
Credit to Author: Andy Greenberg| Date: Tue, 14 May 2019 17:00:00 +0000
More than a year has passed since security researchers revealed Meltdown and Spectre, a pair of flaws in the deep-seated, arcane features of millions of chip sold by Intel and AMD, putting practically every computer in the world at risk. But even as chipmakers scrambled to fix those flaws, researchers warned that they weren't the end of the story, but the beginning—that they represented a new class of security vulnerability that would no doubt surface again and again. Now, some of those same researchers have uncovered yet another flaw in the deepest guts of Intel's microscopic hardware. This time, it can allow attackers to eavesdrop on virtually every bit of raw data that a victim's processor touches.
Today Intel and a coordinated supergroup of microarchitecture security researchers are together announcing a new, serious form of hackable vulnerability in Intel's chips. It's four distinct attacks, in fact, though all of them use a similar technique, and all are capable of siphoning a stream of potentially sensitive data from a computer's CPU to an attacker.
The researchers hail from the Austrian university TU Graz, Vrije Universiteit Amsterdam, the University of Michigan, the University of Adelaide, KU Leuven in Belgium, Worcester Polytechnic Institute, Saarland University in Germany and security firms Cyberus, BitDefender, Qihoo360 and Oracle. The groups have named variants of the exploit techniques ZombieLoad, Fallout, and RIDL, or "Rogue In-Flight Data Load." Intel itself has more tamely labelled the new set of attacks "Microarchitectural Data Sampling," or MDS.
Intel had asked all the researchers to keep their findings secret, some for more than a year, until it could release fixes for the vulnerabilities. But at the same time, the company has sought to downplay the severity of the bugs, according to the researchers, who—split into two groups working independently—each warn that the attacks represent a serious flaw in Intel's hardware that may require disabling some of its features, even beyond the company's patch. AMD and ARM chips don't appear to be vulnerable to the attacks, and Intel says that some models of chip it's released in the last month include a fix for the problem. Otherwise, all of Intel's chips that the researchers tested, going back as early as 2008, were affected. You can test if your system is affected with a tool the researchers published here.
Like Meltdown and Spectre, the new MDS attack takes advantage of security flaws in how Intel's chips perform speculative execution, a feature in which a processor guesses at what operations and data it will be asked to execute or access ahead of time to speed up the chip's performance.
"We drink from the firehose. If you’re clever, and you process the stuff carefully, you don’t drown."
Herbort Bos, VUSec
In these new cases, researchers found that they could use speculative execution to trick Intel's processors into grabbing sensitive data that's moving from one component of a chip to another. Unlike Meltdown, which used speculative execution to grab sensitive data sitting in memory, MDS attacks focus on the buffers that sit between a chip's components, such as between a processor and its cache, the small portion of memory allotted to the processor to keep frequently accessed data close at hand.
"It's kind of like we treat the CPU as a network of components, and we basically eavesdrop on the traffic between them," says Cristiano Giuffrida, one of the researchers in the VUSec group at Vrije Universiteit Amsterdam who discovered the MDS attack. "We hear anything that these components exchange."
That means any attacker who can run a program on a target chip—whether in the form of a malicious application, a virtual machine hosted on the same server as the target in Amazon's cloud, or even a rogue website running Javascript in the target's browser—could trick the CPU into revealing data that should be protected from untrusted code running on that machine. That data can include information like what website the user is browsing, their passwords, or the secret keys to decrypt their encrypted hard drive.
"In essence, [MDS] puts a glass to the wall that separates security domains, allowing attackers to listen to the babbling of CPU components," reads one line of a VUSec paper on the flaws, which will be presented next week at the IEEE Security and Privacy conference.
The four different MDS attack variants all take advantage of a quirk in how Intel's chips perform their time-saving trick. In speculative execution, a CPU frequently follows a branch of commands in code before a program asks it to, or guesses at the data the program is requesting, in order to get a head start. Think of that guess like a lazy waiter offering a random drink from his tray, in hopes of sparing himself a trip back to the bar. If the CPU guesses incorrectly, it immediately discards it. (Under different conditions, the chip can grab data out of three different buffers, hence the researchers' multiple attacks.)
Intel's chip designers may have believed that a wrong guess, even one that serves up sensitive data, didn't matter. "It throws these results away," says VUSec's Guiffrida. "But we still have this window of vulnerability that we use to leak the information."
Just as with Meltdown and Spectre, the attacker's code can leak the data that the processor has taken from the buffer via the processor's cache. That whole process steals at most a few bytes of arbitrary data from one of the CPU's buffers. But repeat it millions of times in succession, and an attacker can start leaking streams of all the data the CPU is accessing in real-time. With some other tricks, a low-privilege attacker can make requests that persuade a CPU to pull sensitive data like secret keys and passwords into its buffers, where they're then sucked out by the MDS attack. Those attacks can take between milliseconds and hours, depending on the target data and the CPU's activity. "It’s easy to do and potentially devastating," says VUSec researcher Herbort Bos.
VUSec, for instance, created a proof of concept, shown above, that can pull hashed passwords—strings of encrypted passwords that can often be cracked by hackers—out of a target chip's component called a line-fill buffer. TU Graz's video below shows a simple demonstration in which an untrusted program on the computer can determine what websites someone visits.
In a call with WIRED, Intel says its own researchers were the first to discover the MDS vulnerabilities last year, and that it has now released fixes for the flaw in both hardware and software. A software patch for the attack clears all data from buffers whenever the processor crosses a security boundary, so that it can't be stolen and leaked. Intel says the patch will have "relatively minimal" performance costs in most cases, though for a few data center instances it could slow its chips down by as much as eight or nine percent. To take effect, the patch will have to be implemented by every operating system, virtualization vendor, and other software makers. Apple says it released a fix as part of a recent Mojave and Safari update. Google says it's also implemented updates for its affected products. A Microsoft spokesperson said the company would release security updates today to address the issue. "We’re aware of this industry-wide issue and have been working closely with affected chip manufacturers to develop and test mitigations to protect our customers," a statement from a Microsoft spokesperson reads. "We are working to deploy mitigations to cloud services and release security updates to protect Windows customers against vulnerabilities affecting supported hardware chips." Mozilla, VMware, and Amazon did not immediately respond to an inquiry about the status of their patching.
A more permanent hardware patch, which has already been included in some chips Intel released starting last month, addresses the problem more directly, preventing the processor from grabbing data out of buffers during speculative execution. "For other affected products, mitigation is available through microcode updates, coupled with corresponding updates to operating system and hypervisor software that are available starting today," a statement from an Intel spokesperson reads.
"We always expected this would keep us busy for years."
Daniel Gruss, TU Graz
In the meantime, however, the researchers and Intel conflict on the severity of the problem and how to triage it. Both TU Graz and VUSec recommend that software makers disable "hyperthreading," a feature of Intel chips that accelerates their processing by allowing more tasks to be performed in parallel, but could make certain variants of the MDS attacks vastly easier to pull off. Intel insisted in a phone call with WIRED that the flaws don't warrant disabling that feature, which would have a serious performance cost for users. In fact, the company has rated the four vulnerabilities a mere "low to medium" severity, a rating that both TU Graz and VUSec researchers challenged.
Intel's engineers argue, for instance, that while the MDS vulnerabilities can leak secrets, they also leak an enormous amount of other noise from the computer's operations. But security researchers found that they could reliably dig through that raw output to find the valuable information they sought. To make that filtering easier, they showed that an attacker could trick the CPU into leaking the same secret repeatedly, helping to distinguish it from the surrounding noise.
"If we're attacking hard disk encryption, we only attack in the short time frame when the key is loaded into memory, so we have a high chance to get the key and some other data," says Michael Schwarz, one of the TU Graz researchers who worked both the new MDS attacks and the earlier Spectre and Meltdown discoveries. "Some of the data will always be the same and other data will change. We see what occurs most often, and this is the data we’re interested in. It’s basic statistics."
Or, as VUSec's Bos puts it, "We drink from the firehose. If you’re clever, and you process the stuff carefully, you don’t drown, and you get everything that you need."
All of that casts doubt on Intel's severity rating for the MDS attacks, the researchers argue. The TU Graz researchers, three of whom worked on the Spectre and Meltdown attacks, rate the MDS attacks roughly between those two earlier vulnerabilities, less serious than Meltdown but worse than Spectre. (They point out that Intel rated Spectre and Meltdown at "medium" severity, too, a judgement with which they disagreed at the time.)
VUSec's Giuffrida notes that his team was paid $100,000 by Intel for their work as part of the company's "bug bounty" program that rewards researchers who warn the company about critical flaws. That's hardly the kind of money paid out for trivial issues, he points out. But he also says that Intel at one point offered VUSec only a $40,000 bug bounty, accompanied by a $80,000 "gift"—what Giuffrida saw as an attempt to reduce the bounty amount cited publicly and thus the perceived severity of the MDS flaws. VUSec refused the offer of more total money in favor of a bounty that better reflected the severity of their findings, and threatened to opt out of a bug bounty in protest. Intel changed its offer to the full $100,000.
"It's clear what Intel is doing," says Giufrrida. "It's in their interest to say that 'no, after Spectre and Meltdown, we didn't overlook other vulnerabilities, it's just that these were so minor that they slipped by.'" In a call with WIRED, Intel denied trying to manipulate the perceived size of the bounty.
While it might seem strange that so many researchers found the MDS flaws within the same window of time—as least two independent teams of seven organizations, plus Intel itself—the TU Graz researchers say that it's to be expected: The discovery of Spectre and Meltdown unlocked a new, deeply complex and unexplored attack surface for hackers, and one that could yield serious, fundamental security flaws in hardware well into the future.
"There are still more components, and many of them are not documented at all, so it's not unlikely this continues for a while," says TU Graz's Moritz Lipp. His fellow researcher Daniel Gruss adds: "We always expected this would keep us busy for years." In other words, don't be surprised if more hidden holes are found in the heart of your computer's processor for years to come.