Security in C++: Hardening techniques from the trenches
summary
Two mitigations land in Clang and libc++: a guaranteed traps standard‑library hardening that converts selected UB into immediate runtime traps with four modes (none, fast, extensive, debug) and per‑TU selection, and a typed operator new extension that passes a compiler type descriptor to a system allocator to bucket allocations by type. Both run in production (deployed in LLVM 17, WebKit, Chrome, XNU, Android), cut exploitability without rewriting most code, but only cover stdlib paths, can cost in hot loops, and do not eliminate dangling pointers.
AI-written summary · about
chapters (8)
- 0:00C++ security challenges
- 7:29Memory safety in C++
- 13:08Undefined behavior in stdlib
- 20:50Hardening libC++
- 36:20Deployment of hardening
- 41:24Temporal memory safety
- 53:24Future of C++ security
- 57:46Q&A
related talks
01h 34mSecurity in C++ - Hardening Techniques From the Trenches
50mSecure development with C++ - Lessons and techniques
01h 02mTowards Safety and Security in C++26
52mKernel Hardening: Ten Years Deep
48mSecure C++ Programming
14mEmbedded C and C++: A Security Perspective
01h 26mA Path to Practically Safe C++
18mExciting new compiler flags for kernel security
