Spectre Sends Shivers down AMD’s Spine with New Incarnation

Spectre Sends Shivers down AMD’s Spine with New Incarnation

Researchers have discovered a new variant of the Spectre bug. This time, Zen-based processors from AMD are particularly vulnerable to attacks that can break down the wall between virtualized environments.

Researchers from ETH University in Zurich have found a new variant of the vicious Spectre vulnerability that primarily affects AMD chips. The Spectre-based attack allows criminals to steal data from the host machine from within a virtualized environment. This is dangerous in the context of the cloud, where different clients use virtual machines side by side on a single host server. The separation between these environments and the overlying hypervisor is essential for the security of this approach.

It is precisely this separation that is threatened by the bug, which the researchers named VMscape. They demonstrated how their attack could steal data from the Zen 4 host server from within a virtualized environment. They managed to capture an encryption key. Notably, this bug does not require the attacker to modify any code. This makes VMscape more practically executable than other variants.

Spectre and Speculative Execution

All Spectre bugs are based on the same principle: misuse of so-called speculative execution. This is a technique where modern processors predict which instruction will follow an instruction they haven’t fully executed yet. This prediction works with high precision. The technique is partly responsible for the high performance of processors today.

Spectre bugs manage to secretly read bits of memory they shouldn’t have access to through conditional instructions that have slipped in via the prediction mechanisms. This makes it possible to slowly but surely leak secrets from the secure processor memory.

read also

Spectre Sends Shivers down AMD’s Spine with New Incarnation

Speculative execution is hardwired into the architecture of modern CPUs. A manufacturer can’t simply squash a bug with a firmware update. The only way to secure CPUs against new Spectre vulnerabilities is through mitigation. In practice, a firmware patch can prevent misuse, but users pay a price in the form of less efficient speculative execution, resulting in a performance dip.

Difficult to Solve

Spectre has been around since 2018. CPU manufacturers like Intel and AMD are trying to safely integrate speculative execution into new CPUs, but ETH Zurich now shows that this still hasn’t been entirely successful. In AMD’s case, all chips based on Zen 1 through Zen 5 are vulnerable. This includes the Epyc chips, which are popular in the cloud.

Fortunately, the impact of VMscape doesn’t seem to be dramatic. An update in the Linux kernel mitigates the bug with a limited impact on performance. The researchers themselves saw an overhead of about one percent after the patch.

AMD is not the only one affected by the bug. Intel Coffee Lake processors are also vulnerable. However, Coffee Lake dates from 2017, so the problem is not so significant in practice.