In January 2018, researchers at Google Project Zero and several universities dropped a bombshell: every modern CPU was quietly leaking secrets through the very mechanism that makes it fast.
The trick is speculative execution. When a processor hits a conditional branch — an if-statement in machine code — it does not wait for the condition to resolve. It guesses the outcome and races ahead, executing instructions before it knows whether it should. If the guess was wrong it discards the results and tries the other path, losing only a few cycles. If the guess was right, it has saved tens or hundreds of cycles of stall time.
The problem is that discarding the results is not as clean as it sounds. The CPU does roll back the registers and memory writes. But one side effect lingers: the cache. Instructions that should never have run, on data that should never have been touched, still warm up cache lines. And cache access time is measurable.
Spectre (CVE-2017-5753, named for the spectre of speculative execution) showed that an attacker can train the branch predictor to mispredict on purpose, trick the CPU into speculatively reading a forbidden byte, encode that byte in the cache pattern, and then read it back with timing — all without any privilege, from ordinary user-level JavaScript.
It is not a bug in software. The CPU is working exactly as designed. The side channel is the microarchitecture itself.
Comments
Loading comments...