Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • How to Use This Course
  • Reading Paths
  • Concept Map
  • Meet DCRouter
  • Glossary
  • Part 0: What Verification Is8
  • Part 1: What Can Go Wrong11
  • Part 2: Specifications as Checkable Rules8
  • Part 3: Observability and Controllability7
  • Part 4: Stimulus11
  • Part 5: Checking11
  • Part 6: Coverage10
  • Part 7: Formal and Simulation10
  • Part 8: Verification Levels and Reuse8
  • Part 9: Planning and Risk9
  • Part 10: Emulation and Prototyping8
  • Part 11: Post-Silicon Validation8
  • Part 12: Bug Economics8
  • Part 13: Debug7
  • Part 14: Sign-Off7
  • Part 15: Verification in Context8
  • Part 16: Case Studies5
    • How to Read an Escape
    • The Pentium FDIV Bug
    • A Chipset Recall
    • Speculative Execution Attacks
    • Writing a Post-Mortem
  • Part 17: Capstones5
  • Part 18: Interview Preparation6
Loading lesson

‹Part 16: Case Studies
  1. Topics
  2. First Principles of Verification Strategy
  3. Part 16: Case Studies
  4. Speculative Execution Attacks

Part 16 · Case Studies · Principal (P)

Speculative Execution Attacks

Spectre and Meltdown, disclosed in January 2018, showed that processors whose every architectural result was correct could still leak secrets through the cache, because speculatively executed instructions leave traces that timing can read. Not a bug in the usual sense: a property nobody had specified. What is documented, why no functional verification could flag it, how it was mitigated, and what it means to verify what must not happen.

On this page

    Note

    Level: Principal (P) · Answers: What can real projects teach us?

    Before this: A Chipset Recall, Security Verification

    Out-of-order processors execute instructions speculatively: guessing a branch, running ahead, and discarding the results if the guess was wrong. Every verification method checked that discarded results never reached architectural state, and they never did. In January 2018 researchers showed that the discarded work still left footprints in the cache, and that an attacker could read secrets from those footprints by timing memory accesses (fact C3).

    What does an escape in which every result was correct teach about verification?

    What failed (documented)

    Fact

    Source

    Speculatively executed instructions whose results are discarded can still change microarchitectural state, such as which lines are in the cache

    Kocher et al.; Lipp et al. (fact C3)

    An attacker can infer that state by timing accesses, and so read data the program was never allowed to see

    Fact C3

    Disclosed in January 2018, after being reported to vendors in June 2017

    Fact C3

    Mitigations were first mostly software and microcode: KPTI for Meltdown; retpoline and microcode controls such as IBRS for Spectre variant 2; later processors added hardware changes

    Fact C6

    Why no functional verification could flag it (the course's reading)

    Every functional check in this course compares what the design computes with what it should compute. Here the computation was right. The leak was in a channel the specification never mentioned: timing, which depended on secret data through the cache. The instruction set defines results, not timing, so the ISS (lesson 15.5) agreed with the RTL at every instruction. A lock-step comparison, a scoreboard or a formal proof against the architectural specification would all pass.

    Check

    What it compares

    Sees the leak?

    Lock-step ISS comparison

    Architectural results per instruction

    No: results are correct

    Formal equivalence to an architectural model

    Architectural state

    No: discarded state is not architectural

    Performance checks

    Throughput and latency against targets

    No: they measure speed, not whether timing depends on secrets

    Security property: observable timing independent of secrets

    Information flow from secrets to timing

    Yes, if someone states it

    This is the pool argument of the whole course in its starkest form: the bug was outside the pool of every technique used, because it was outside the specification. Lesson 2.1's point that verification checks against a specification has a hard edge: what the specification does not say cannot be checked.

    What changed (documented, and the course's reading)

    • Mitigations (documented, fact C6): operating systems isolated kernel page tables (KPTI), compilers changed indirect branches (retpoline), microcode added controls, and later processors changed hardware.

    • A new class of property (the course's reading): microarchitectural information flow became something processor teams must specify and verify, not assume.

    • Research into verifying it (the course's reading): information-flow tracking and formal non-interference checks applied to microarchitecture, as in lesson 15.2.

    Reading it through the course's questions

    Question

    Answer

    What failed?

    Secret-dependent microarchitectural traces of speculative execution, readable by timing (documented)

    Where could it have been caught?

    Only by a security property about timing or information flow, stated before verification (the course's reading)

    Why was it not caught?

    Unspecified: the behaviour was outside every specification the checks used (the course's reading)

    What changed?

    Software, microcode and later hardware mitigations; microarchitectural leakage became a verification concern (documented, then the course's reading)

    Why this matters

    Principal lens. Ask what your specification does not say. Correct results are not the whole of correct behaviour: timing, power and other observable side effects can carry information. For any design that handles secrets, state the properties about what must not be observable, and verify them with information-flow methods.

    Interview

    Asked: "Why didn't verification catch Spectre and Meltdown?"

    Weak answer: The processors weren't tested enough.

    Strong answer: Because every architectural result was correct. Speculatively executed instructions were discarded architecturally, but left traces in the cache that an attacker could read by timing. Every functional check, ISS comparison, scoreboard or formal proof against the architecture compared results, and the ISA doesn't define timing, so they all passed. The leak was outside the specification, and you can't check what isn't specified. The lesson is to state properties about what must not be observable, such as timing independent of secrets, and verify information flow. Mitigations were KPTI, retpoline and microcode controls first, with hardware changes later.

    Follow-ups: (1) How would you state a timing non-interference property? (2) What is information-flow tracking?

    Check yourself Why did lock-step ISS comparison pass on processors vulnerable to Spectre?

    The ISS checks architectural results, which were correct; the leak was in timing, which the ISA does not define.

    Check yourself Which of the four gap types (unreached, masked, unchecked, unspecified) best fits Spectre?

    Unspecified: the behaviour was outside every specification the checks used.

    Key takeaways

    • Spectre and Meltdown leaked secrets while every architectural result was correct (documented).

    • No functional check could flag it: the leak was outside the specification.

    • State and verify properties about what must not be observable.

    Keep going

    Next: Lesson 16.5, Writing a Post-Mortem. Turning an escape into plan, check and process changes.

    Related topics

    • Part 16 overview: Case Studies

    Previous

    148 / 160

    Next: Writing a Post-Mortem

    Up next

    Up nextWriting a Post-Mortem

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • How to Read an Escape
    • The Pentium FDIV Bug