Idea: Measuring the Effect of Code Complexity on Static Analysis Results

  • James Walden
  • Adam Messer
  • Alex Kuhl
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5429)


To understand the effect of code complexity on static analysis, thirty-five format string vulnerabilities were studied. We analyzed two code samples for each vulnerability, one containing the vulnerability and one in which the vulnerability was fixed. We examined the effect of code complexity on the quality of static analysis results, including successful detection and false positive rates. Static analysis detected 63% of the format string vulnerabilities, with detection rates decreasing with increasing code complexity. When the tool failed to detect a bug, it was for one of two reasons: the absence of security rules specifying the vulnerable function or the presence of a bug in the static analysis tool. Complex code is more likely to contain complicated code constructs and obscure format string functions, resulting in lower detection rates.


Static analysis code complexity 


  1. 1.
  2. 2.
    Heffley, J., Meunier, P.: Can Source Code Auditing Software Identify Common Vulnerabilities and Be Used to Evaluate Software Security? In: Proceedings of the 37th Hawaii International Conference on System Sciences. IEEE Press, New York (2004)Google Scholar
  3. 3.
    Kratkiewicz, K., Lippmann, R.: Using a Diagnostic Corpus of C Programs to Evaluate Buffer Overflow Detection by Static Analysis Tools. In: 2005 Workshop on the Evaluation of Software Defect Tools (2005)Google Scholar
  4. 4.
    McCabe, T.J.: A Complexity Measure. IEEE Transactions on Software Engineering 2(4), 308–320 (1976)MathSciNetCrossRefMATHGoogle Scholar
  5. 5.
    Newsham, T., Chess, B.: ABM: A Prototype for Benchmarking Source Code Analyzers. In: Workshop on Software Security Assurance Tools, Techniques, and Metrics. U.S. National Institute of Standards and Technology (NIST) Special Publication (SP), pp. 500–265 (2006)Google Scholar
  6. 6.
  7. 7.
  8. 8.
  9. 9.
    Wilander, J., Kamkar, M.: A Comparison of Publicly Available Tools For Static Intrusion Prevention. In: Proceedings of the 7th Nordic Workshop on Secure IT Systems, Karlstad, Sweden, pp. 68–84 (2002)Google Scholar
  10. 10.
    Zitser, M., Lippmann, R., Leek, T.: Testing Static Analysis Tools using Exploitable Buffer Overflows from Open Source Code. SIGSOFT Software Engineering Notes 29(6), 97–106 (2004)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2009

Authors and Affiliations

  • James Walden
    • 1
  • Adam Messer
    • 1
  • Alex Kuhl
    • 1
  1. 1.Department of Computer ScienceNorthern Kentucky UniversityHighland HeightsUSA

Personalised recommendations