Skip to content
0:00 / 0:00

#spectre#speculativeexecution#side-channelattack

CppCon 2018: Chandler Carruth “Spectre: Secrets, Side-Channels, Sandboxes, and Security”

CppCon

189K subscribers • 123 videos on Hallway • Conference channel

YouTube
  • Recommended by 4 people: 1 on Lobsters and 3 in engineering communities.
  • A classic. People kept recommending it from 2018 to 2022.
  • Presented by Chandler Carruth, LLVM Tech Lead
  • Linked in the descriptionCppCon/CppCon2018

Advanced. Deep dive for people who know the field.

56K views8 years ago4 recommendations

SecuritySystems programmingExploits and vulnerabilitiesCPUs and computer architectureCompilers and interpreters

Chandler Carruth explains speculative execution side-channel attacks like Spectre and details the compiler and hardware mitigations designed to address them.

CppCon.org — Presentation Slides, PDFs, Source Code and other presenter materials are available at: github.com/CppCon/CppCon2018 — The discovery of speculative execution side-channel attacks (called "Spectre") fundamentally changes the security model of every modern superscalar microprocessor. Extracting secret data (credit cards, cryptographic keys) through side-channels is not new and has challenged the cryptographic community for decades. Despite this, the industry has often been complacent in our response, viewing these attacks as impacting a tiny amount of code and being nearly impossible to weaponize. But speculative execution attack techniques have fundamentally altered the ease and applicability of side-channels, making them a serious threat to computer security. Responding to these issues has impacted CPU design, compiler design, library design, sandbox techniques and even the C++ programming language and standard. This talk will explain how these kinds of attacks work at a high level and provide a clear set of terminology to describe these classes of vulnerabilities and attacks. It will show how the different variants work at the low level of modern hardware to give a detailed and precise understanding of the mechanics involved on CPUs today. It will also provide guidance about what makes applications and services vulnerable and how to analyze your software to understand the degree of its exposure. It will include an overview of the numerous different mitigation techniques available, how to deploy them, and what tradeoffs come with them. Some of these mitigations will be covered in detail: how they work at a hardware level, where they don't work, and what attack vectors remain. Finally, the talk will show how traditional side-channel risks are made substantially easier to exploit due to speculative execution. This will cover how cryptographic and other libraries dealing in high-value secrets need to be adapted to correctly defend against these attacks. Further, it will introduce general problems of sandboxing untrusted code from secret data and the current best techniques in those circumstances. This talk will be accessible to most C and C++ programmers. No deep background on CPUs, assembly, hardware instructions, Spectre, side-channels, or security is needed. — Chandler Carruth, Google Software Engineer Chandler Carruth leads the Clang team at Google, building better diagnostics, tools, and more. Previously, he worked on several pieces of Google’s distributed build system. He makes guest appearances helping to maintain a few core C++ libraries across Google’s codebase, and is active in the LLVM and Clang open source communities. He received his M.S. and B.S. in Computer Science from Wake Forest University, but disavows all knowledge of the contents of his Master’s thesis. He is regularly found drinking Cherry Coke Zero in the daytime and pontificating over a single malt scotch in the evening. — Videos Filmed &

Why it's here

4 people recommend this

What people say. Highly recommended for its detailed explanation of Spectre mitigations and the performance costs of disabling speculative execution.

Moments people linked to

u/henje_in r/programming • Recommends

On “Linus Torvalds: After big Linux performance hit, Spectre v2 patch needs curbs -- "Patch is causing as much as a 50 percent drop in performance in some Linux workloads."”

I do not where your performance numbers come from. But Chandler Carruth (link to this video at 1:19:10), who works on LLVM and helped with the spectre mitigations, says speculative execution gives a 5x-20x performance improvement.

u/Saefrochin r/programming • Recommends

On “Google Says Spectre And Meltdown Are Too Difficult To Fix”

I don't know if 20-30 years is the correct number but the claim is _not_ baseless. The slowdown from turning off speculative execution is 5x-50x. > What's the cost of turning off speculative execution? It's actually pretty easy to simulate this. When I built the speculative load hardening pass, I also built something that added Intel's suggested mitigation of an `lfence` but instead of doing it only on the risky branch, it adds them on on all of them. It's a very simple transformation, much simpler than speculative load hardening. And I measured the performance of that. And that's actually an interesting thing to look at, because what lfence does it is essentially blocks speculation past…
16View on Reddit

inactive-useron Lobsters • Recommends

Spectre: Secrets, Side-Channels, Sandboxes, and Security

u/lightmatter501in r/programming • Recommends

On “New Exploit Bypasses Existing Spectre-V2 Mitigations in Intel and Arm CPUs”

There was a cpp con talk where the presenter showed them off live on stage. It essentially converts any kind of RCE, which is hard but possible to get, into making nothing on the system safe from you.