Two new attacks Meltdown and Spectre have been announced that can be seen as a new class of attacks that make use of so called microarchitectural features in modern CPUs. What makes these attacks special is that they do not exploit a bug in software, but exploit how modern CPUs operate and have been operating for many years.
The complexity of modern processor has been ever increasing to a degree that it is extremely hard for a developer to understand how and in what order instructions are executed on the CPU. Techniques such as out-of-order execution, branch predictions and multiple levels of caches have been integrated in modern CPUs for many years and have been constantly refined. This resulted to great improvements in computation speeds. That this speed optimization can also cause security issues has also been known. For example, implementing cryptographic algorithms on modern CPUs that do not leak sensitive data over so-called timing side-channels has been a major challenge for years. Several academic papers also showed that microarchitectural features such as shared caches can lead to significant data leakages between different processes running on the same CPU or even on multiple CPUs (see e.g. [CSAW07] [usenix14] or [SP15]).
The newly introduced Meltdown and Spectre attacks are based upon the microarchitectural side-channels. But what sets them apart from previous attacks is their exceptional power and impact. While previous results were quite limited in scope and very application specific, the new attacks directly impact billions of devices and especially in the case of Meltdown can be exploited application independent. In the Meltdown attack for example it is enough for an attacker to be able to execute code on a CPU with a vulnerable Intel chip to read out the entire physical memory, regardless of privilege levels. And while the Meltdown attack seems to be (currently) limited to Intel CPUs, the Spectre attack can be launched against virtually any modern CPU.
The powerful attacks are achieved by cleverly combining a (well known) cache side-channel attack with forcing the CPU to perform a malicious “out-of-order execution”. Forcing a CPU to do a malicious out-of-order execution is not difficult and on a first glance might seem not security critical. The CPU will correctly detect the malicious (or erroneous) execution and undo any changes caused by this execution. At least that is what was believed so far. But here comes the cache side-channel into play. What the researchers realized is that while it seems all changes have been undone, the malicious execution actually leaves visible footprints. In particular, the malicious out-of-order execution leaves a visible footprint in the cache that can be used as a side-channel to steal sensitive information.
In Meltdown it goes as far as allowing the attacker to read out the complete memory content in Intel CPUs. Spectre uses the same basic idea in different flavors to also read out memory content in application specific scenarios. While Meltdown has the more immediate impact as it can be turned into a useful exploit very easily it is also seems easier to patch at the OS level (OS patches are under way for the major OSes to prevent this). However, while the worst impact of the new attacks can be averted in the short turn with such OS patches, the general vulnerability remains. Removing it is extremely hard as the underlying vulnerability is not in any software but in how modern CPU operate, i.e., in the hardware itself.
Especially for cloud platforms where several different processes from different users are running on the same hardware new hardware architectures are needed to protect against the rising threat of microarchitectural side-channel attacks. For many years performance was the key driving factor for innovation in the hardware domain. But these attacks showed us in a painful way that the next architectural innovations should be driven by security. Indeed, upcoming architectures might have to take a step back in performance in preference of security.