skip to main content
10.1145/940071.940115acmconferencesArticle/Chapter ViewAbstractPublication PagesfseConference Proceedingsconference-collections
Article

ARCHER: using symbolic, path-sensitive analysis to detect memory access errors

Published:01 September 2003Publication History

ABSTRACT

Memory corruption errors lead to non-deterministic, elusive crashes. This paper describes ARCHER (ARray CHeckER) a static, effective memory access checker. ARCHER uses path-sensitive, interprocedural symbolic analysis to bound the values of both variables and memory sizes. It evaluates known values using a constraint solver at every array access, pointer dereference, or call to a function that expects a size parameter. Accesses that violate constraints are flagged as errors. Those that are exploitable by malicious attackers are marked as security holes.Memory corruption errors lead to non-deterministic, elusive crashes. This paper describes ARCHER (ARray CHeckER) a static, effective memory access checker. ARCHER uses path-sensitive, interprocedural symbolic analysis to bound the values of both variables and memory sizes. It evaluates known values using a constraint solver at every array access, pointer dereference, or call to a function that expects a size parameter. Accesses that violate constraints are flagged as errors. Those that are exploitable by malicious attackers are marked as security holes.We carefully designed ARCHER to work well on large bodies of source code. It requires no annotations to use (though it can use them). Its solver has been built to be powerful in the ways that real code requires, while backing off on the places that were irrelevant. Selective power allows it to gain efficiency while avoiding classes of false positives that arise when a complex analysis interacts badly with statically undecidable program properties. ARCHER uses statistical code analysis to automatically infer the set of functions that it should track --- this inference serves as a robust guard against omissions, especially in large systems which can have hundreds of such functions.In practice ARCHER is effective: it finds many errors; its analysis scales to systems of millions of lines of code and the average false positive rate of our results is below 35%. We have run ARCHER over several large open source software projects --- such as Linux, OpenBSD, Sendmail, and PostgreSQL --- and have found errors in all of them (118 in the case of Linux, including 21 security holes).

References

  1. K.Ashcraft and D. R. Engler. Using programmer-written compiler extensions to catch security holes. In IEEE Symposium on Security and Privacy Oakland, California, May 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. R. Bodik, R. Gupta, and V. Sarkar. ABCD: Eliminating array bounds checks on demand. In SIGPLAN Conference on Programming Language Design and Implementation pages 321--333, June 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. W. R. Bush, J. D. Pincus, and D. J. Sielaff. A static analyzer for finding dynamic programming errors. Software: Practice and Experience 30(7):775--802, June 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. B. Chess. Improving computer security using extended static checking. In IEEE Symposium on Security and Privacy Oakland, California, May 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Microsoft Corporation. AST Toolkit. http://research.microsoft.com/sbt/.]]Google ScholarGoogle Scholar
  6. N. Dor, M. Rodeh, and M. Sagiv. CSSV: towards a realistic tool for statically detecting all buffer overflows in c. In Proceedings of the ACM SIGPLAN 2003 Conference on Programming Language Design and Implementation pages 155--167. ACM Press, June 2003.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. D. R. Engler, B. Chelf, A. Chou, and S. Hallem. Checking system rules using system-specific, programmer-written compiler extensions. In Proceedings of Operating Systems Design and Implementation (OSDI), September 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. D. R. Engler, D. Y. Chen, S. Hallem, A. Chou, and B. Chelf. Bugs as deviant behavior: A general approach to inferring errors in systems code. In Proceedings of the Eighteenth ACM Symposium on Operating Systems Principles 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. C. Flanagan and K. R. M. Leino. Houdini, an annotation assistant for ESC/Java. In Symposium of Formal Methods Europe pages 500--517, March 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. C. Flanagan, K. R. M. Leino, M. Lillibridge, G. Nelson, J. B. Saxe, and R. Stata. Extended static checking for Java. In Proceedings of the ACM SIGPLAN 2002 Conference on Programming Language Design and Implementation pages 234--245. ACM Press, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. C. Flanagan and S. Qadeer. Predicate abstraction for software verification. In Proceedings of the 29th Annual Symposium on Principles of Programming Languages, June 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. D. Freedman, R. Pisani, and R. Purves. Statistics WW Norton & Co., third edition, September 1997.]]Google ScholarGoogle Scholar
  13. S. Hallem, B. Chelf, Y. Xie, and D. R. Engler. A system and language for building system-specific, static analyses. In Proceedings of the ACM SIGPLAN 2002 Conference on Programming Language Design and Implementation Berlin, Germany, June 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. R. Hastings and B. Joyce. Purify: Fast detection of memory leaks and access errors. In Proceedings of the Winter USENIX Conference, December 1992.]]Google ScholarGoogle Scholar
  15. Intrinsa. A technical introduction to PREfix/Enterprise. Technical report, Intrinsa Corporation, 1998.]]Google ScholarGoogle Scholar
  16. R. W. M. Jones and P. H. J. Kelly. Backwards-compatible bounds checking for arrays and pointers in C programs. In Automated and Algorithmic Debugging pages 13--26, May 1997.]]Google ScholarGoogle Scholar
  17. W. Landi, B. G. Ryder, and S. Zhang. Interprocedural modification side effect analysis with pointer aliasing. In Proceedings of the ACM SIGPLAN 1993 Conference on Programming Language Design and Implementation, pages 56--67. ACM Press, 1993.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. D. Larochelle and D. Evans. Statically detecting likely buffer overflow vulnerabilities. In 10th USENIX Security Symposium, August 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. G. C. Necula, S. McPeak, S. P. Rahul, and W. Weimer. CIL: Intermediate language and tools for analysis and transformation of c programs. In International Conference on Compiler Construction, March 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. G. C. Necula, S. McPeak, and W. Weimer. CCured: type-safe retrofitting of legacy code. In Symposium on Principles of Programming Languages, pages 128--139, January 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. W. Pugh. The omega test: a fast and practical integer programming algorithm for dependence analysis. In Supercomputing, pages 4--13, November 1991.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. B. Schneier. Risks to cybersecurity. Congressional Testimony by Federal Document Clearing House, June 2003.]]Google ScholarGoogle Scholar
  23. M. N. Velev and R. E. Bryant. Effective use of boolean satisfiability procedures in the formal verification of superscalar and VLIW microprocessors. Journal of Symbolic Computation, special issue on Integration of Automated Reasoning and Computer Algebra Systems, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. D. Wagner, J. Foster, E. Brewer, and A. Aiken. A first step towards automated detection of buffer overrun vulnerabilities. In The 2000 Network and Distributed Systems Security Conference. San Diego, CA, February 2000.]]Google ScholarGoogle Scholar

Index Terms

  1. ARCHER: using symbolic, path-sensitive analysis to detect memory access errors

                    Recommendations

                    Comments

                    Login options

                    Check if you have access through your login credentials or your institution to get full access on this article.

                    Sign in
                    • Published in

                      cover image ACM Conferences
                      ESEC/FSE-11: Proceedings of the 9th European software engineering conference held jointly with 11th ACM SIGSOFT international symposium on Foundations of software engineering
                      September 2003
                      394 pages
                      ISBN:1581137435
                      DOI:10.1145/940071
                      • cover image ACM SIGSOFT Software Engineering Notes
                        ACM SIGSOFT Software Engineering Notes  Volume 28, Issue 5
                        September 2003
                        382 pages
                        ISSN:0163-5948
                        DOI:10.1145/949952
                        Issue’s Table of Contents

                      Copyright © 2003 ACM

                      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]

                      Publisher

                      Association for Computing Machinery

                      New York, NY, United States

                      Publication History

                      • Published: 1 September 2003

                      Permissions

                      Request permissions about this article.

                      Request Permissions

                      Check for updates

                      Qualifiers

                      • Article

                      Acceptance Rates

                      ESEC/FSE-11 Paper Acceptance Rate33of168submissions,20%Overall Acceptance Rate112of543submissions,21%

                      Upcoming Conference

                      FSE '24

                    PDF Format

                    View or Download as a PDF file.

                    PDF

                    eReader

                    View online with eReader.

                    eReader