skip to main content
10.1145/948109.948155acmconferencesArticle/Chapter ViewAbstractPublication PagesccsConference Proceedingsconference-collections
Article

Buffer overrun detection using linear programming and static analysis

Published: 27 October 2003 Publication History

Abstract

This paper addresses the issue of identifying buffer overrun vulnerabilities by statically analyzing C source code. We demonstrate a light-weight analysis based on modeling C string manipulations as a linear program. We also present fast, scalable solvers based on linear programming, and demonstrate techniques to make the program analysis context sensitive. Based on these techniques, we built a prototype and used it to identify several vulnerabilities in popular security critical applications.

References

[1]
bugtraq. www.securityfocus.com.
[2]
CERT/CC advisories. www.cert.org/advisories.
[3]
The twenty most critical internet security vulnerabilities. www.sans.org/top20.
[4]
Aleph-one. Smashing the stack for fun and profit. Nov 1996. Phrack Magazine.
[5]
Technical analysis of remote sendmail vulnerability. www.securityfocus.com/archive/1/313757.
[6]
L. O. Andersen. Program Analysis and Specialization for the C Programming Language. PhD thesis, DIKU, Univ. of Copenhagen, 1994. (DIKU report 94/19).
[7]
E. D. Anderson and K. D. Anderson. Presolving in linear programming. Mathematical Prog., 71(2):221--245, 1995.
[8]
R. Bodik, R. Gupta, and V. Sarkar. ABCD: Eliminating array-bounds checks on demand. In ACM Conf. on Prog. Lang. Design and Impl. (PLDI), 2000.
[9]
J. W. Chinnek and E. W. Dravinieks. Locating minimal infeasible constraint sets in linear programs. ORSA Journal on Computing, 3(2):157--168, 1991.
[10]
T-C. Chiueh and F-H. Hsu. RAD: A compile-time solution to buffer overflow attacks. In 21st Intl. Conf. on Distributed Computing Systems (ICDCS), 2001.
[11]
J. Condit, M. Harren, S. McPeak, G. C. Necula, and W. Weimer. CCured in the Real World. In ACM Conf. on Prog. Lang. Design and Impl. (PLDI), 2003.
[12]
T. H. Cormen, C. E. Lieserson, R. L. Rivest, and C. Stein. Introduction to Algorithms. MIT Press, 2001.
[13]
C. Cowan, S. Beattie, R-F Day., C. Pu, P. Wagle, and E. Walthinsen. Automatic detection and prevention of buffer overflow attacks. In 7th USENIX Sec. Symp., 1998.
[14]
C. Cowan, S. Beattie, J. Johansen, and P. Wagle. PointGuard: Protecting pointers from buffer overflow vulnerabilities. In 12th USENIX Sec. Symp., 2003.
[15]
R. Cytron, J. Ferrante, B. K. Rosen, M. N. Wegman, and F. K. Zadeck. Efficiently computing static single assignment form and the control dependence graph. ACM Trans. on Prog. Lang. and Systems (TOPLAS), 13(4):452--490, 1991.
[16]
G. B. Dantzig and B. Curtis Eaves. Fourier-Motzkin elimination and its dual. Journal of Combinatorial Theory (A), 14:288--297, 1973.
[17]
N. Dor, M. Rodeh, and M. Sagiv. CSSV: Towards a realistic tool for statically detecting all buffer overflows in C. In ACM Conf. on Prog. Lang. Design and Impl. (PLDI), 2003.
[18]
H. Etoh and K. Yoda. Protecting from stack-smashing attacks. 2000. www.trl.ibm.com/projects/security/ssp/main.html.
[19]
V. Ganapathy, S. Jha, D. Chandler, D. Melski, and D. Vitek. Buffer overrun detection using linear programming and static analysis. 2003. UW-Madison Comp. Sci. Tech. Report 1488. ftp://ftp.cs.wisc.edu/pub/tech-reports/reports/2003/tr1488.ps.Z
[20]
S. Horwitz, T. Reps, and D. Binkley. Interprocedural slicing using dependence graphs. ACM Transactions on Prog. Lang.s and Systems (TOPLAS), 12(1):26--60, 1990.
[21]
S. Horwitz, T. Reps, M. Sagiv, and G. Rosay. Speeding up slicing. In 2nd ACM Symp. on Foundations of Soft. Engg. (FSE), pages 11--20, New York, 1994.
[22]
D. Larochelle and D. Evans. Statically detecting likely buffer overflow vulnerabilities. In 10th USENIX Sec. Symp., 2001.
[23]
E. Larson and T. Austin. High coverage detection of input related security faults. In 12th USENIX Sec. Symp., 2003.
[24]
G. C. Necula, S. McPeak, and W. Weimer. CCured: type-safe retrofitting of legacy code. In ACM Conf. on the Principles of Prog. Lang. (POPL), 2002.
[25]
CPLEX Optimizer. www.cplex.com/.
[26]
R. Rugina and M. C. Rinard. Symbolic bounds analysis of pointers, array indices and accessed memory regions. In ACM Conf. on Prog. Lang. Design and Impl. (PLDI), 2000.
[27]
A. Schrijver. Theory of Linear and Integer Programming. Wiley, N.Y., 1986.
[28]
M. Sharir and A. Pnueli. Two Approaches to Interprocedural Dataflow Analysis. Prentice Hall Inc., 1981.
[29]
D. Wagner. Static Analysis and Computer Security: New techniques for software assurance. PhD thesis, UC Berkeley, Dec 2000.
[30]
D. Wagner, J. S. Foster, E. A. Brewer, and A. Aiken. A first step towards automated detection of buffer overrun vulnerabilities. In Network and Distributed System Security (NDSS), 2000.
[31]
S. J. Wright. Primal-Dual Interior-Point Methods. SIAM Philadelphia, 1997.
[32]
R. Wunderling. Paralleler und Objektorientierter Simplex-Algorithmus. PhD thesis, Konrad-Zuse-Zentrum fur Informationstechnik Berlin, TR 1996-09. www.zib.de/PaperWeb/abstracts/TR-96-09/.
[33]
Y. Xie, A. Chou, and D. Engler. ARCHER: Using symbolic, path-sensitive analysis to detect memory access errors. In 9th European Soft. Engg. Conf. and 11th ACM Symp. on Foundation of Soft. Engg. (ESEC/FSE), 2003.
[34]
S. Yong, S. Horwitz, and T. Reps. Pointer analysis for programs with structures and casting. In ACM Conf. on Prog. Lang. Design and Impl. (PLDI), 1999.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
CCS '03: Proceedings of the 10th ACM conference on Computer and communications security
October 2003
374 pages
ISBN:1581137389
DOI:10.1145/948109
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 27 October 2003

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. buffer overruns
  2. linear programming
  3. static analysis

Qualifiers

  • Article

Conference

CCS03
Sponsor:

Acceptance Rates

Overall Acceptance Rate 1,261 of 6,999 submissions, 18%

Upcoming Conference

CCS '25

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)10
  • Downloads (Last 6 weeks)3
Reflects downloads up to 01 Jan 2025

Other Metrics

Citations

Cited By

View all

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media