GWP-ASan: Sampling-Based Detection of Memory-Safety Bugs in Production
Authors:
- Kostya SerebryanyKSKostya Serebryany
- Chris KennellyCKChris Kennelly
- Mitch PhillipsMPMitch Phillips
- Matt DentonMDMatt Denton
- Marco ElverMEMarco Elver
- Alexander PotapenkoAPAlexander Potapenko
- Matt MorehouseMMMatt Morehouse
- Vlad TsyrklevichVTVlad Tsyrklevich
- Christian HollerCHChristian Holler
- Julian LettnerJLJulian Lettner
- David KilzerDKDavid Kilzer
- Lander BrandtLBLander Brandt
Open Access
- 14 April 2024
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 168-177
Abstract
Despite the recent advances in pre-production bug detection, heap-use-after-free and heap-buffer-overflow bugs remain the primary problem for security, reliability, and developer productivity for applications written in C or C++, across all major software ecosystems. Memory-safe languages solve this problem when they are used, but the existing code bases consisting of billions of lines of C and C++ continue to grow, and we need additional bug detection mechanisms. This paper describes a family of tools that detect these two classes of memory-safety bugs, while running in production, at near-zero overhead. These tools combine page-granular guarded allocation and low-rate sampling. In other words, we added an "if" statement to a 36-year-old idea and made it work at scale. We describe the basic algorithm, several of its variants and implementations, and the results of multi-year deployments across mobile, desktop, and server applications.Keywords
All Related Versions
This publication has 8 references indexed in Scilit:
- M7: Oracle's Next-Generation Sparc ProcessorIEEE Micro, 2015
- Google-Wide Profiling: A Continuous Profiling Infrastructure for Data CentersIEEE Micro, 2010
- Statistical debugging using compound boolean predicates2007
- Low-overhead memory leak detection using adaptive statistical profiling2004
- LLVM: A compilation framework for lifelong program analysis & transformation2004
- The Morris worm: a fifteen-year perspectiveIEEE Security & Privacy, 2003
- CCured2002
- Computer Security Technology Planning Study. Volume 21972