TONTOU attack bypasses Spectre v2 fixes on AMD and Intel, steals Linux password hashes

Researchers at the Massachusetts Institute of Technology (MIT) have found a way to bypass current mitigations for the Spectre v2 vulnerability and built an exploit capable of extracting sensitive data, including password hashes, from Linux systems. The method works against defenses on AMD and Intel processors that rely on flushing or isolating the branch predictor, which the study refers to as neutralization-based mitigations.
Spectre v2, also known as Branch Target Injection (BTI), belongs to the class of speculative execution side-channel attacks. The flaw exploits the indirect branch predictor in a processor, tricking it into mispredicting the target of an indirect branch and executing instructions along an attacker-influenced path. Modern chips use prediction to speed up operations, but this feature opens the door to leaking sensitive information.
With neutralization-based measures such as eIBRS on Intel and Safe RET on AMD, there is a gap between the time the predictor is isolated and when it is used by the target branch. Existing defenses assume an attacker cannot take advantage of this time window. However, the researchers developed a primitive that allows re-poisoning the CPU state after the cleanup but before it is used.
The discovery was made by PhD student Daniël Trujillo and associate professor Mengjia Yan from MIT's Computer Science and Artificial Intelligence Laboratory (CSAIL). They named the technique TONTOU (Time-of-Neutralization to Time-of-Use) and demonstrated how to exploit this window to extract data. According to Trujillo, an attacker needs no special access to read arbitrary memory from the system.
To execute the attack, the researchers used an Interrupt Injection method, where unprivileged user programs can schedule timer interrupts to occur during kernel execution. This allows redirecting the kernel to an interrupt handler and using it to poison microarchitectural states within the post-neutralization window. Interrupts occurring during this period can influence the indirect branch predictor, enabling attacks against protected systems.


