SoftBound
Open Access
- 28 May 2009
- journal article
- Published by Association for Computing Machinery (ACM) in ACM SIGPLAN Notices
- Vol. 44 (6) , 245-258
Abstract
The serious bugs and security vulnerabilities facilitated by C/C++'s lack of bounds checking are well known, yet C and C++ remain in widespread use. Unfortunately, C's arbitrary pointer arithmetic, conflation of pointers and arrays, and programmer-visible memory layout make retrofitting C/C++ with spatial safety guarantees extremely challenging. Existing approaches suffer from incompleteness, have high runtime overhead, or require non-trivial changes to the C source code. Thus far, these deficiencies have prevented widespread adoption of such techniques. This paper proposes SoftBound, a compile-time transformation for enforcing spatial safety of C. Inspired by HardBound, a previously proposed hardware-assisted approach, SoftBound similarly records base and bound information for every pointer as disjoint metadata. This decoupling enables SoftBound to provide spatial safety without requiring changes to C source code. Unlike HardBound, SoftBound is a software-only approach and performs metadata manipulation only when loading or storing pointer values. A formal proof shows that this is sufficient to provide spatial safety even in the presence of arbitrary casts. SoftBound's full checking mode provides complete spatial violation detection with 67% runtime overhead on average. To further reduce overheads, SoftBound has a store-only checking mode that successfully detects all the security vulnerabilities in a test suite at the cost of only 22% runtime overhead on average.Keywords
This publication has 27 references indexed in Scilit:
- Hardbound2008
- Secure virtual architecture2007
- DieHard2006
- CCured: type-safe retrofitting of legacy softwareACM Transactions on Programming Languages and Systems, 2005
- Beyond stack smashing: recent advances in exploiting buffer overrunsIEEE Security & Privacy, 2004
- Buffer overrun detection using linear programming and static analysis2003
- Protecting C programs from attacks via invalid pointer dereferences2003
- Memory safety without runtime checks or garbage collection2003
- Region-based memory management in cyclone2002
- A methodology for procedure cloningComputer Languages, 1993