Title | EffectiveSan: Type and Memory Error Detection Using Dynamically Typed C/C++ |
Publication Type | Conference Paper |
Year of Publication | 2018 |
Authors | Duck, Gregory J., Yap, Roland H. C. |
Conference Name | Proceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation |
Publisher | ACM |
Conference Location | New York, NY, USA |
ISBN Number | 978-1-4503-5698-5 |
Keywords | (sub-)object bounds errors, bounds checking, C, C++, compositionality, Data Sanitization, dynamic types, Human Behavior, low-fat pointers, memory errors, privacy, pubcrawl, resilience, sanitizers, type checking, type confusion, Type errors, use-after-free errors |
Abstract | Low-level programming languages with weak/static type systems, such as C and C++, are vulnerable to errors relating to the misuse of memory at runtime, such as (sub-)object bounds overflows, (re)use-after-free, and type confusion. Such errors account for many security and other undefined behavior bugs for programs written in these languages. In this paper, we introduce the notion of dynamically typed C/C++, which aims to detect such errors by dynamically checking the "effective type" of each object before use at runtime. We also present an implementation of dynamically typed C/C++ in the form of the Effective Type Sanitizer (EffectiveSan). EffectiveSan enforces type and memory safety using a combination of low-fat pointers, type meta data and type/bounds check instrumentation. We evaluate EffectiveSan against the SPEC2006 benchmark suite and the Firefox web browser, and detect several new type and memory errors. We also show that EffectiveSan achieves high compatibility and reasonable overheads for the given error coverage. Finally, we highlight that EffectiveSan is one of only a few tools that can detect sub-object bounds errors, and uses a novel approach (dynamic type checking) to do so. |
URL | http://doi.acm.org/10.1145/3192366.3192388 |
DOI | 10.1145/3192366.3192388 |
Citation Key | duck_effectivesan:_2018 |