How could a processor's habit of guessing ahead leak your secrets?
Named Spectre because its cause, speculative execution, is so deep in how processors work that it 'will haunt us for quite some time.'
▶ Start the storyModern processors don't wait patiently for each instruction to be settled before moving on. To stay fast, they guess. A branch predictor looks at an if-then-else in your code and bets on which way it will go, so the chip can start executing that guessed path immediately instead of idling. Guess right, and you saved time. Guess wrong, and the instructions are simply thrown away: officially, no harm done.
But throwing the work away doesn't erase every trace of it. While guessing, the processor may have pulled some data into its fast cache memory. That leaves a fingerprint: data sitting in the cache is measurably quicker to read than data that isn't. Jann Horn at Google and Paul Kocher with colleagues found, independently, that an attacker can train a branch predictor to guess wrong on purpose. The processor then speculatively touches secret data it should never reach, and timing the cache afterward reveals what that data was.

They named it Spectre, because its root cause, speculative execution, is so hard to fix that it 'will haunt us for quite some time.' It went public on 3 January 2018, alongside a related flaw, Meltdown, which let a rogue program read memory it was never allowed to touch. Even a web page could use Spectre: a site's JavaScript could read data the browser held for another website.
Fixing Spectre meant closing a side door without knocking down the house. Browsers blurred their timers so pages couldn't measure the cache as precisely. Patches slowed computers down, with benchmark drops of 2 to 14 percent on the newest chips of the time, because the trick that made processors fast was also the trick that made them leak.
Quiz me
0/3
Recap
Even when a processor's mispredicted guess is formally discarded, it can leave traces, like data sitting in the cache, that a timing attack can read; that gap between discarded results and leftover side effects is what Spectre exploits.
Surprising fact · Spectre was named because its root cause, speculative execution, is so fundamental to processor design that researchers said it 'will haunt us for quite some time,' and the patches that followed slowed some chips down by double-digit percentages.
Sources (5)
No source, no claim. Every fact in this lesson (18 claims) cites at least one of these.