EffectiveSan: Type and Memory Error Detection using Dynamically Typed C/C++

10/17/2017
by   Gregory J. Duck, et al.
0

Low-level programming languages such as C and C++ are vulnerable to errors related to the misuse of memory. Such errors include bounds overflows, sub-object bounds overflows, use-after-free, "reuse"-after-free and type confusion. These errors account for many of the exploits in programs implemented in such unsafe languages. Most bug detection tools (sanitizers) tend to focus only on detecting specific classes of errors, e.g. bounds overflow or type confusion only. In this paper, we present a new type confusion and memory error sanitizer based on dynamically checking the "effective type" (a.k.a. the dynamic type) of C/C++ objects at runtime. We show that this "effective type sanitizer" (EffectiveSan) can detect the memory misuse errors mentioned above, all while using the same underlying methodology (dynamic typing). Our approach uses a combination of low-fat pointers, type meta data and type check instrumentation. We also have a novel approach to preventing sub-object bound overflow errors leveraging on the C/C++ types. We show EffectiveSan finds type confusion, (sub-)object bounds overflow, and use-after-free bugs in the SPEC2006 benchmark suite.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
12/04/2017

Introspection for C and its Applications to Library Robustness

Context: In C, low-level errors, such as buffer overflow and use-after-f...
research
08/30/2017

Type Safe Redis Queries: A Case Study of Type-Level Programming in Haskell

Redis is an in-memory data structure store, often used as a database, wi...
research
04/06/2022

Fast Fuzzing for Memory Errors

Greybox fuzzing is a proven effective testing method for the detection o...
research
05/19/2023

Persian Typographical Error Type Detection using Many-to-Many Deep Neural Networks on Algorithmically-Generated Misspellings

Digital technologies have led to an influx of text created daily in a va...
research
03/17/2023

ChameleonIDE: Untangling Type Errors Through Interactive Visualization and Exploration

Dynamically typed programming languages are popular in education and the...
research
10/07/2020

Type checking extracted methods

Many object-oriented dynamic languages allow programmers to extract meth...
research
10/17/2022

SA4U: Practical Static Analysis for Unit Type Error Detection

Unit type errors, where values with physical unit types (e.g., meters, h...

Please sign up or login with your details

Forgot password? Click here to reset