More than six years after the Spectre security flaw impacting modern CPU processors came to light, new research has found that the latest AMD and Intel processors are still susceptible to speculative execution attacks.
The attack, disclosed by ETH Zürich researchers Johannes Wikner and Kaveh Razavi, aims to undermine the Indirect Branch Predictor Barrier (IBPB) on x86 chips, a crucial mitigation against speculative execution attacks.
Speculative execution refers to a performance optimization feature wherein modern CPUs execute certain instructions out-of-order by predicting the branch a program will take beforehand, thus speeding up the task if the speculatively used value was correct.
If it results in a misprediction, the instructions, called transient, are declared invalid and squashed, before the processor can resume execution with the correct value.
While the execution results of transient instructions are not committed to the architectural program state, it’s still possible for them to load certain sensitive data into a processor cache through a forced misprediction, thereby exposing it to a malicious adversary that would otherwise be blocked from accessing it.
Intel describes IBPB as an “indirect branch control mechanism that establishes a barrier, preventing software that executed before the barrier from controlling the predicted targets of indirect branches executed after the barrier on the same logical processor.”
It’s used as a way to help counter Branch Target Injection (BTI), aka Spectre v2 (CVE-2017-5715), a cross-domain transient execution attack (TEA) that takes advantage of indirect branch predictors used by processors to cause a disclosure gadget to be speculatively executed.
A disclosure gadget refers to the ability of an attacker to access a victim’s secret that’s otherwise not architecturally visible, and exfiltrate it over a covert channel.
The latest findings from ETH Zürich show that a microcode bug in Intel microarchitectures such as Golden Cove and Raptor Cove could be used to circumvent IBPB. The attack has been described as the first, practical “end-to-end cross-process Spectre leak.”
The microcode flaw “retain[s] branch predictions such that they may still be used after IBPB should have invalidated them,” the researchers said. “Such post-barrier speculation allows an attacker to bypass security boundaries imposed by process contexts and virtual machines.”
AMD’s variant of IBPB, the study discovered, can be similarly bypassed due to how IBPB is applied by the Linux kernel, resulting in an attack – codenamed Post-Barrier Inception (aka PB-Inception) – that enables an unprivileged adversary to leak privileged memory on AMD Zen 1(+) and Zen 2 processors.
Intel has made available a microcode patch to address the problem (CVE-2023-38575, CVSS score: 5.5). AMD, for its part, is tracking the vulnerability as CVE-2022-23824, according to an advisory released in November 2022.
“Intel users should make sure their intel-microcode is up to date,” the researchers said. “AMD users should make sure to install kernel updates.”
The disclosure comes months after ETH Zürich researchers detailed new RowHammer attack techniques codenamed ZenHammer and SpyHammer, the latter of which uses RowHammer to infer DRAM temperature with high accuracy.
“RowHammer is very sensitive to temperature variations, even if the variations are very small (e.g., ±1 °C),” the study said. “RowHammer-induced bit error rate consistently increases (or decreases) as the temperature increases, and some DRAM cells that are vulnerable to RowHammer exhibit bit errors only at a particular temperature.”
By taking advantage of the correlation between RowHammer and temperature, an attacker could identify the utilization of a computer system and measure the ambient temperature. The attack could also compromise privacy by using temperature measurements to determine a person’s habits within their home and the times when they enter or leave a room.
“SpyHammer is a simple and effective attack that can spy on temperature of critical systems with no modifications or prior knowledge about the victim system,” the researchers noted.
“SpyHammer can be a potential threat to the security and privacy of systems until a definitive and completely-secure RowHammer defense mechanism is adopted, which is a large challenge given that RowHammer vulnerability continues to worsen with technology scaling.”