VMScape: Exploiting Incomplete Branch Predictor Isolation in Cloud Environments
Branch predictor state is not properly isolated between host and guest execution on AMD Zen CPUs, so a malicious KVM guest can influence the host's branch predictions. The researchers built an end-to-end exploit that leaks sensitive data such as encryption keys from a userspace hypervisor like QEMU.
comsec.ethz.ch
Published on comsec.ethz.ch
VMScape (CVE-2025-40300) brings Spectre branch target injection (Spectre-BTI) to the cloud, revealing a critical gap in how branch predictor states are isolated in virtualized environments. Our systematic analysis of protection-domain isolation shows that current mechanisms are too coarse-grained: on all AMD Zen CPUs…
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the branch target buffer entries carry no tag separating host from guest execution, so predictions from one domain are reused in another.
Impact
A malicious guest could leak secrets such as encryption keys from the hypervisor process, which compromises the provider's infrastructure rather than a single VM; the text notes systems that never run untrusted local VMs are not directly exploitable.
What the attacker needed
Ability to run code in a KVM guest; AMD Zen CPU (Zen 4/5 demonstrated); host runs a userspace hypervisor such as QEMU
The fix
The branch predictor should be flushed on VM exits, and a more efficient variant that flushes only when the host returns to userspace is now available in the latest Linux kernel versions.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Modern processors guess which code path will run next to go faster, and those guesses are stored in a shared structure called the branch predictor. This research shows that on many AMD chips a virtual machine can leave traces in that shared structure that the host machine then picks up, letting the guest learn secrets from the host. It is a side-channel attack: nothing is broken directly, but timing and guessing behaviour leaks information.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.