Spectre

lore

securityprogramming

A 2018 class of attacks abusing CPU speculative execution to leak memory.

Spectre tricks a processor into speculatively accessing data it should not, then reads it through cache side channels. It affected nearly all modern CPUs and forced deep changes in browsers, operating systems, and hardware design.

Spectre exploits speculative execution, the technique processors use to guess which branch a program will take and start work early. When the guess is wrong the results are discarded, but the effects on the cache are not, and measuring which memory is now cached reveals what the processor speculatively touched.

What made it a landmark is that it was not a bug in any implementation. Speculative execution is a deliberate design that every high-performance processor of the era used, and the vulnerability is in the concept, which means it could not be patched away without giving up decades of performance work. Variants continued to appear for years because the underlying technique keeps offering new observable side effects.

The mitigations are correspondingly unsatisfying: compiler barriers that inhibit speculation at sensitive points, microcode updates, and process isolation strong enough that speculation cannot cross a boundary that matters. Each costs performance, some of it significant, and browsers additionally reduced timer precision because the attack needs accurate measurement. Spectre is the clearest demonstration available that an optimization can be a security boundary violation, and that performance and isolation are in genuine tension rather than merely competing for budget.

Also known as: Spectre, CVE-2017-5753, CVE-2017-5715

Sources

  • CVE-2017-5753 (2018)

All glossary entries