skip to main content
10.1145/1390630.1390636acmconferencesArticle/Chapter ViewAbstractPublication PagesisstaConference Proceedingsconference-collections
research-article

Testing for buffer overflows with length abstraction

Published:20 July 2008Publication History

ABSTRACT

We present Splat, a tool for automatically generating inputs that lead to memory safety violations in C programs. Splat performs directed random testing of the code, guided by symbolic execution. However, instead of representing the entire contents of an input buffer symbolically, Splat tracks only a prefix of the buffer symbolically, and a symbolic length that may exceed the size of the symbolic prefix. The part of the buffer beyond the symbolic prefix is filled with concrete random inputs. The use of symbolic buffer lengths makes it possible to compactly summarize the behavior of standard buffer manipulation functions, such as string library functions, leading to a more scalable search for possible memory errors. While reasoning only about prefixes of buffer contents makes the search theoretically incomplete, we experimentally demonstrate that the symbolic length abstraction is both scalable and sufficient to uncover many real buffer overflows in C programs. In experiments on a set of benchmarks developed independently to evaluate buffer overflow checkers, Splat was able to detect buffer overflows quickly, sometimes several orders of magnitude faster than when symbolically representing entire buffers. Splat was also able to find two previously unknown buffer overflows in a heavily-tested storage system.

References

  1. C. Cadar, V. Ganesh, P. Pawlowski, D. Dill, and D. Engler. Exe: automatically generating inputs of death. In CCS, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. N. Dor, M. Rodeh, and S. Sagiv. CSSV: towards a realistic tool for statically detecting all buffer overflows in C. In PLDI, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. J. C. Foster, V. Osipov, and N. Bhalla. Buffer Overflow Attacks. Syngress, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. V. Ganesh and D. L. Dill. A decision procedure for bit-vectors and arrays. In CAV, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. P. Godefroid. Compositional dynamic test generation. In POPL, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. P. Godefroid, N. Klarlund, and K. Sen. Dart: directed automated random testing. In PLDI, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. P. Godefroid, M. Y. Levin, and D. Molnar. Active property checking. Technical report, Microsoft, 2007.Google ScholarGoogle Scholar
  8. P. Godefroid, M.Y. Levin, and D. Molnar. Automated whitebox fuzz testing. In NDSS, 2008.Google ScholarGoogle Scholar
  9. A. Groce, G. J. Holzmann, and R. Joshi. Randomized differential testing as a prelude to formal verification. In ICSE, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. R. Jones and P. Kelly. Backwards-compatible bounds checking for arrays and pointers in C programs. In Third International Workshop on Automated Debugging, 1997.Google ScholarGoogle Scholar
  11. P. Joshi, K. Sen, and M. Shlimovich. Predictive testing: amplifying the effectiveness of software testing. In FSE, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. D. Knuth. The Art of Computer Programming, Volume 3: Sorting and Searching. Addison-Wesley, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. E. Larson and T. Austin. High coverage detection of input-related security faults. In USENIX, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. R. Ma jumdar and R. Xu. Directed test generation with symbolic grammars. In ASE, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. N. Nethercote and J. Seward. Valgrind: a framework for heavyweight dynamic binary instrumentation. In PLDI, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. O. Ruwase and M. Lam. A practical dynamic buffer overflow detector. In NDSS, 2004.Google ScholarGoogle Scholar
  17. K. Sen, D. Marinov, and G. Agha. CUTE: a concolic unit testing engine for C. In FSE, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. J. Seward and N. Nethercote. Using Valgrind to detect undefined value errors with bit-precision. In USENIX, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. D. Sleator and R. Tarjan. Self-adjusting binary search trees. J. ACM, 32(3):652--686, 1985. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. W. Visser, C. S. Pasareanu, and R. Pelánek. Test input generation for Java containers using state matching. In ISSTA, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. D. Wagner, J. S. Foster, E. A. Brewer, and A. Aiken. A first step towards automated detection of buffer overrun vulnerabilities. In NDSS, 2000.Google ScholarGoogle Scholar
  22. Y. Xie, A. Chou, and D. Engler. Archer: using symbolic, path-sensitive analysis to detect memory access errors. In FSE, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. M. Zhivich, T. Leek, and R. Lippmann. Dynamic buffer overflow detection. In BUGS, 2005.Google ScholarGoogle Scholar
  24. M. Zitser, R. Lippmann, and T. Leek. Testing static analysis tools using exploitable buffer overflows from open source code. In FSE, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Testing for buffer overflows with length abstraction

    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
      ISSTA '08: Proceedings of the 2008 international symposium on Software testing and analysis
      July 2008
      324 pages
      ISBN:9781605580500
      DOI:10.1145/1390630

      Copyright © 2008 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: 20 July 2008

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      Overall Acceptance Rate58of213submissions,27%

      Upcoming Conference

      ISSTA '24

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader