skip to main content
10.1145/3533767.3534384acmconferencesArticle/Chapter ViewAbstractPublication PagesisstaConference Proceedingsconference-collections

Combining static analysis error traces with dynamic symbolic execution (experience paper)

Published:18 July 2022Publication History

ABSTRACT

This paper reports on our experience implementing a technique for sifting through static analysis reports using dynamic symbolic execution. Our insight is that if a static analysis tool produces a partial trace through the program under analysis, annotated with conditions that the analyser believes are important for the bug to trigger, then a dynamic symbolic execution tool may be able to exploit the trace by (a) guiding the search heuristically so that paths that follow the trace most closely are prioritised for exploration, and (b) pruning the search using the conditions associated with each step of the trace. This may allow the bug to be quickly confirmed using dynamic symbolic execution, if it turns out to be a true positive, yielding an input that triggers the bug.

To experiment with this approach, we have implemented the idea in a tool chain that allows the popular open-source static analysis tools Clang Static Analyzer (CSA) and Infer to be combined with the popular open-source dynamic symbolic execution engine KLEE. Our findings highlight two interesting negative results. First, while fault injection experiments show the promise of our technique, they also reveal that the traces provided by static analysis tools are not that useful in guiding search. Second, we have systematically applied CSA and Infer to a large corpus of real-world applications that are suitable for analysis with KLEE, and find that the static analysers are rarely able to find non-trivial true positive bugs for this set of applications.

We believe our case study can inform static analysis and dynamic symbolic execution tool developers as to where improvements may be necessary, and serve as a call to arms for researchers interested in combining symbolic execution and static analysis to identify more suitable benchmark suites for evaluation of research ideas.

References

  1. Domagoj Babić, Lorenzo Martignoni, Stephen McCamant, and Dawn Song. 2011. Statically-directed Dynamic Automated Test Generation. In Proc. of the International Symposium on Software Testing and Analysis (ISSTA’11). https://doi.org/10.1145/2001420.2001423 Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Bernhard Beckert, Mihai Herda, Michael Kirsten, and Shmuel S. Tyszberowicz. 2020. Integration of Static and Dynamic Analysis Techniques for Checking Noninterference. In Deductive Software Verification: Future Perspectives - Reflections on the Occasion of 20 Years of KeY (Lecture Notes in Computer Science, Vol. 12345). Springer, 287–312. https://doi.org/10.1007/978-3-030-64354-6_12 Google ScholarGoogle ScholarCross RefCross Ref
  3. Marcel Böhme and Abhik Roychoudhury. 2014. Corebench: Studying complexity of regression errors". In Proc. of the International Symposium on Software Testing and Analysis (ISSTA’14). https://doi.org/10.1145/2610384.2628058 Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Fraser Brown, Deian Stefan, and Dawson Engler. 2020. Sys: A Static/Symbolic Tool for Finding Good Bugs in Good (Browser) Code. In Proc. of the 29th USENIX Security Symposium (USENIX Security’20). Google ScholarGoogle Scholar
  5. Cristian Cadar. 2015. Targeted program transformations for symbolic execution. In Proc. of the Joint Meeting of the European Software Engineering Conference and the ACM Symposium on the Foundations of Software Engineering, New Ideas Track (ESEC/FSE NI’15). https://doi.org/10.1145/2786805.2803205 Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Cristian Cadar, Daniel Dunbar, and Dawson Engler. 2008. KLEE: Unassisted and Automatic Generation of High-Coverage Tests for Complex Systems Programs. In Proc. of the 8th USENIX Symposium on Operating Systems Design and Implementation (OSDI’08). Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Cristian Cadar and Dawson Engler. 2005. Execution Generated Test Cases: How to Make Systems Code Crash Itself. In Proc. of the 12th International SPIN Workshop on Model Checking of Software (SPIN’05). https://doi.org/10.1007/11537328_2 Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Cristian Cadar, Vijay Ganesh, Peter Pawlowski, David Dill, and Dawson Engler. 2006. EXE: Automatically Generating Inputs of Death. In Proc. of the 13th ACM Conference on Computer and Communications Security (CCS’06). https://doi.org/10.1145/1455518.1455522 Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Cristian Cadar and Koushik Sen. 2013. Symbolic Execution for Software Testing: Three Decades Later. Communications of the Association for Computing Machinery (CACM), 56, 2 (2013), 82–90. https://doi.org/10.1145/2408776.2408795 Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Cristiano Calcagno and Dino Distefano. 2011. Infer: An Automatic Program Verifier for Memory Safety of C Programs. In Proc. of the 3rd International Conference on NASA Formal Methods (NFM’11). Google ScholarGoogle ScholarCross RefCross Ref
  11. Cristiano Calcagno, Dino Distefano, Peter W. O’Hearn, and Hongseok Yang. 2011. Compositional Shape Analysis by Means of Bi-Abduction. J. ACM, 58, 6 (2011), 26:1–26:66. https://doi.org/10.1145/2049697.2049700 Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Omar Chebaro, Nikolai Kosmatov, Alain Giorgetti, and Jacques Julliand. 2011. The SANTE Tool: Value Analysis, Program Slicing and Test Generation for C Program Debugging. In Proc. of the 5st International Conference on Tests and Proofs (TAP’11). Google ScholarGoogle ScholarCross RefCross Ref
  13. Maria Christakis, Peter Müller, and Valentin Wüstholz. 2006. Guiding Dynamic Symbolic Execution Toward Unverified Program Executions. In Proc. of the 28th International Conference on Software Engineering (ICSE’06). https://doi.org/10.1145/2884781.2884843 Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. 2022. https://clang-analyzer.llvm.org Google ScholarGoogle Scholar
  15. 2021. Clang 12 documentation: Cross Translation Unit (CTU) Analysis. https://clang.llvm.org/docs/analyzer/user-docs/CrossTranslationUnit.html Google ScholarGoogle Scholar
  16. 2022. https://scan.coverity.com/ Google ScholarGoogle Scholar
  17. Christoph Csallner and Yannis Smaragdakis. 2005. Check ’n’ Crash: Combining static checking and testing. In Proc. of the 27th International Conference on Software Engineering (ICSE’05). https://doi.org/10.1145/1062455.1062533 Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Leonardo de Moura and Nikolaj Bjørner. 2008. Z3: An Efficient SMT Solver. In Proc. of the 14th International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS’08). Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Peter Dinges and Gul Agha. 2014. Targeted Test Input Generation Using Symbolic-Concrete Backward Execution. In Proc. of the 29th IEEE International Conference on Automated Software Engineering (ASE’14). https://doi.org/10.1145/2642937.2642951 Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Josselin Feist, Laurent Mounier, Sébastien Bardin, Robin David, and Marie-Laure Potet. 2016. Finding the Needle in the Heap: Combining Static Analysis and Dynamic Symbolic Execution to Trigger Use-after-Free. In Proceedings of the 6th Workshop on Software Security, Protection, and Reverse Engineering (SSPREW’16). https://doi.org/10.1145/3015135.3015137 Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. 2022. https://engineering.fb.com/2017/09/06/android/finding-inter-procedural-bugs-at-scale-with-infer-static-analyzer/ Google ScholarGoogle Scholar
  22. 2022. https://www.microfocus.com/en-us/cyberres/application-security/static-code-analyzer Google ScholarGoogle Scholar
  23. 2022. https://frama-c.com Google ScholarGoogle Scholar
  24. Fengjuan Gao, Yu Wang, Linzhang Wang, Zijiang Yang, and Xuandong Li. 2020. Automatic Buffer Overflow Warning Validation. Journal of Computer Science and Technology, 35, 6 (2020), 1406–1427. https://doi.org/10.1007/s11390-020-0525-z Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Xi Ge, Kunal Taneja, Tao Xie, and Nikolai Tillmann. 2011. DyTa: Dynamic Symbolic Execution Guided with Static Verification Results. In Proc. of the 33rd International Conference on Software Engineering (ICSE’11). https://doi.org/10.1145/1985793.1985971 Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. 2022. https://www.gnu.org/software/coreutils/ Google ScholarGoogle Scholar
  27. Patrice Godefroid, Nils Klarlund, and Koushik Sen. 2005. DART: Directed Automated Random Testing. In Proc. of the Conference on Programing Language Design and Implementation (PLDI’05). Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Istvan Haller, Asia Slowinska, Matthias Neugschwandtner, and Herbert Bos. 2013. Dowsing for Overflows: A Guided Fuzzer to Find Buffer Boundary Violations. In Proc. of the 22st USENIX Security Symposium (USENIX Security’13). Google ScholarGoogle Scholar
  29. GrammaTech Inc.. 2022. CodeSonar. https://www.grammatech.com/codesonar-cc Google ScholarGoogle Scholar
  30. Wei Jin and Alessandro Orso. 2012. BugRedux: Reproducing Field Failures for In-house Debugging. In Proc. of the 34th International Conference on Software Engineering (ICSE’12). Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Ashwin Kallingal Joshy, Xueyuan Chen, Benjamin Steenhoek, and Wei Le. 2021. Validating Static Warnings via Testing Code Fragments. In Proc. of the International Symposium on Software Testing and Analysis (ISSTA’21). https://doi.org/10.1145/3460319.3464832 Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. 2022. https://doi.org/10.5281/zenodo.6539575 Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. 2022. https://srg.doc.ic.ac.uk/projects/klee-sa/ Google ScholarGoogle Scholar
  34. Chris Lattner and Vikram Adve. 2004. LLVM: A Compilation Framework for Lifelong Program Analysis & Transformation. In Proc. of the 2nd International Symposium on Code Generation and Optimization (CGO’04). Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Mengchen Li, Yuanjun Chen, Linzhang Wang, and Guoqing Xu. 2013. Dynamically Validating Static Memory Leak Warnings. In Proc. of the International Symposium on Software Testing and Analysis (ISSTA’13). https://doi.org/10.1145/2483760.2483778 Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Shan Lu, Zhenmin Li, Feng Qin, Lin Tan, Pin Zhou, and Yuanyuan Zhou. 2005. BugBench: Benchmarks for Evaluating Bug Detection Tools. In Workshop on the Evaluation of Software Defect Detection Tools. Google ScholarGoogle Scholar
  37. Kin-Keung Ma, Yit Phang Khoo, Jeffrey S. Foster, and Michael Hicks. 2011. Directed Symbolic Execution. In Proc. of the 18th International Static Analysis Symposium (SAS’11). Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. Paul Dan Marinescu and Cristian Cadar. 2013. KATCH: High-Coverage Testing of Software Patches. In Proc. of the Joint Meeting of the European Software Engineering Conference and the ACM Symposium on the Foundations of Software Engineering (ESEC/FSE’13). https://doi.org/10.1145/2491411.2491438 Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. T. T. Nguyen, P. Maleehuan, T. Aoki, T. Tomita, and I. Yamada. 2019. Reducing False Positives of Static Analysis for SEI CERT C Coding Standard. In IEEE/ACM Joint 7th International Workshop on Conducting Empirical Studies in Industry (CESI’19) and 6th International Workshop on Software Engineering Research and Industrial Practice (SER IP’19). https://doi.org/10.1109/CESSER-IP.2019.00015 Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Martin Nowack and Cristian Cadar. 2020. KLEE Symbolic Execution Engine in 2019. International Journal on Software Tools for Technology Transfer, https://doi.org/10.1007/s10009-020-00570-3 Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. H. Post, C. Sinz, A. Kaiser, and T. Gorges. 2008. Reducing False Positives by Combining Abstract Interpretation and Bounded Model Checking. In Proc. of the 23rd IEEE International Conference on Automated Software Engineering (ASE’08). https://doi.org/10.1109/ASE.2008.29 Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. M. R. Gadelha, E. Steffinlongo, L. C. Cordeiro, B. Fischer, and D. Nicole. 2019. SMT-Based Refutation of Spurious Bug Reports in the Clang Static Analyzer. In Proc. of the 41th International Conference on Software Engineering: Companion Proceedings (ICSE-Companion’19). https://doi.org/10.1109/ICSE-Companion.2019.00026 Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. Daniel Schemmel, Julian Büning, Frank Busse, Martin Nowack, and Cristian Cadar. 2022. A Deterministic Memory Allocator for Dynamic Symbolic Execution. In Proc. of the 36th European Conference on Object-Oriented Programming (ECOOP’22). Google ScholarGoogle Scholar
  44. Koushik Sen, Darko Marinov, and Gul Agha. 2005. CUTE: A Concolic Unit Testing Engine for C. In Proc. of the Joint Meeting of the European Software Engineering Conference and the ACM Symposium on the Foundations of Software Engineering (ESEC/FSE’05). https://doi.org/10.1145/1081706.1081750 Google ScholarGoogle ScholarCross RefCross Ref
  45. Kunal Taneja, Tao Xie, Nikolai Tillmann, and Jonathan de Halleux. 2011. eXpress: guided path exploration for efficient regression test generation. In Proc. of the International Symposium on Software Testing and Analysis (ISSTA’11). https://doi.org/10.1145/2001420.2001422 Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. Nikolai Tillmann and Jonathan De Halleux. 2008. Pex: white box test generation for .NET. In Proc. of the 2nd International Conference on Tests and Proofs (TAP’08). https://doi.org/10.1007/978-3-540-79124-9_10 Google ScholarGoogle ScholarCross RefCross Ref
  47. Zhihong Xu and Gregg Rothermel. 2009. Directed Test Suite Augmentation. In Proc. of the 16th Asia-Pacific Software Engineering Conference (ASPEC’09). Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. Cristian Zamfir and George Candea. 2010. Execution Synthesis: A Technique for Automated Software Debugging. In Proc. of the 5th European Conference on Computer Systems (EuroSys’10). https://doi.org/10.1145/1755913.1755946 Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. Bin Zhang, Chao Feng, Bo Wu, and Chaojing Tang. 2016. Detecting integer overflow in Windows binary executables based on symbolic execution. In 2016 17th IEEE/ACIS International Conference on Software Engineering, Artificial Intelligence, Networking and Parallel/Distributed Computing (SNPD). 385–390. https://doi.org/10.1109/SNPD.2016.7515929 Google ScholarGoogle ScholarCross RefCross Ref

Index Terms

  1. Combining static analysis error traces with dynamic symbolic execution (experience paper)

    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 2022: Proceedings of the 31st ACM SIGSOFT International Symposium on Software Testing and Analysis
      July 2022
      808 pages
      ISBN:9781450393799
      DOI:10.1145/3533767

      Copyright © 2022 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 the author(s) 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: 18 July 2022

      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