S3Library: Automatically Eliminating C/C++ Buffer Overflow using Compatible Safer Libraries

04/20/2020
by   Kang Sun, et al.
0

Annex K of C11, bounds-checking interfaces, recently introduced a set of alternative functions to mitigate buffer overflows, primarily those caused by string/memory functions. However, poor compatibility limits their adoption. Failure oblivious computing can eliminate the possibility that an attacker can exploit memory errors to corrupt the address space and significantly increase the availability of systems. In this paper, we present S3Library (Saturation-Memory-Access Safer String Library), which is compatible with the standard C library in terms of function signature. Our technique automatically replaces unsafe deprecated memory/string functions with safer versions that perform bounds checking and eliminate buffer overflows via boundless memory. S3Library employs MinFat, a very compact pointer representation following the Less is More principle, to encode metadata into unused upper bits within pointers. In addition, S3Library utilizes Saturation Memory Access to eliminate illegal memory accesses into boundless padding area. Even if an out-of-bounds access is made, the fault program will not be interrupted. We implement our scheme within the LLVM framework on X86-64 and evaluate our approach on correctness, security, runtime performance and availability.

READ FULL TEXT
research
06/23/2018

Preventing Buffer Overflows by Context-aware Failure-oblivious Computing

In languages like C, buffer overflows are widespread. A common mitigatio...
research
02/07/2020

SMA: Eliminate Memory Spatial Errors via Saturation Memory Access

Memory spatial error, i.e., buffer overflow, has been a well-known issue...
research
06/23/2018

Context-aware Failure-oblivious Computing as a Means of Preventing Buffer Overflows

In languages like C, buffer overflows are widespread. A common mitigatio...
research
02/14/2023

L4 Pointer: An efficient pointer extension for spatial memory safety support without hardware extension

Since buffer overflow has long been a frequently occurring, high-risk vu...
research
09/17/2019

Variable Record Table: A Run-time Solution for Mitigating Buffer Overflow Attack

We present a novel approach to mitigate buffer overflow attack using Var...
research
12/30/2021

Set membership with two classical and quantum bit probes

We consider the following problem: Given a set S of at most n elements f...
research
09/24/2018

Pointing in the Right Direction - Securing Memory Accesses in a Faulty World

Reading and writing memory are, besides computation, the most common ope...

Please sign up or login with your details

Forgot password? Click here to reset