Certifying the Absence of Buffer Overflows
September 2006 • Technical Note
Sagar Chaki, Scott Hissam
In this report, the authors present a technique for certifying the safety of buffer manipulations in C programs.
Publisher:
Software Engineering Institute
CMU/SEI Report Number
CMU/SEI-2006-TN-030
DOI (Digital Object Identifier):
10.1184/R1/6572210.v1Subjects
Abstract
Despite increased awareness and efforts to reduce buffer overflows, they continue to be the cause of most software vulnerabilities. In large part, these problems are due to the widespread use of unsafe library routines among programmers. For reasons like efficiency, such routines will continue to be used, even during the development of mission-critical and safety-critical software systems. Effective certification techniques are needed to ascertain whether unsafe routines are used in a safe manner.
This report presents a technique for certifying the safety of buffer manipulations in C programs. The approach is based on two key ideas: (1) using a certifying model checker to automatically verify that a buffer manipulation is safe and (2) validating the resulting invariant and proving it with a decision procedure based on Boolean satisfiability. This report also discusses the advantages and limitations of the approach with respect to today's existing solutions for buffer-overflow detection. Experimental results are presented that position the technique favorably against other static overflow-detection tools and indicate that the procedure can complement and augment these tools from a purely verification perspective.