EffectiveSan: Type and Memory Error Detection using Dynamically Typed C/C++
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.
Wed 20 JunDisplayed time zone: Eastern Time (US & Canada) change
14:00 - 15:40 | Dynamic TechniquesPLDI Research Papers at Grand Ballroom CD Chair(s): Sorin Lerner University of California, San Diego | ||
14:00 25mTalk | HHVM JIT: A Profile-Guided, Region-Based Compiler for PHP and Hack PLDI Research Papers Guilherme Ottoni Facebook Media Attached | ||
14:25 25mTalk | On-Stack Replacement, Distilled PLDI Research Papers Media Attached | ||
14:50 25mTalk | EffectiveSan: Type and Memory Error Detection using Dynamically Typed C/C++ PLDI Research Papers Gregory J. Duck National University of Singapore, Singapore, Roland H. C. Yap National University of Singapore, Singapore Media Attached | ||
15:15 25mTalk | Calling-to-Reference Context Translation via Constraint-Guided CFL-Reachability PLDI Research Papers Cheng Cai University of California, Irvine, Qirun Zhang University of California, Davis, Zhiqiang Zuo Nanjing University, China, Khanh Nguyen University of California, Irvine, Harry Xu University of California, Los Angeles (UCLA), Zhendong Su University of California, Davis Media Attached |