Idea: Measuring the Effect of Code Complexity on Static Analysis Results
- Cite this paper as:
- Walden J., Messer A., Kuhl A. (2009) Idea: Measuring the Effect of Code Complexity on Static Analysis Results. In: Massacci F., Redwine S.T., Zannone N. (eds) Engineering Secure Software and Systems. ESSoS 2009. Lecture Notes in Computer Science, vol 5429. Springer, Berlin, Heidelberg
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.
KeywordsStatic analysis code complexity
Unable to display preview. Download preview PDF.