Inference of Error Specifications and Bug Detection Using Structural Similarities
Nora DosscheBCBart Coppens
Nora Dossche
BCBart Coppens
+2
We propose a novel approach that automatically infers error specifications for system software without prior domain knowledge, using the key insight that error-handling paths can be identified from structural similarities between error-handling code, while still achieving high recall and precision. The inferred specification is used to detect three kinds of bugs: missing error checks, incorrect error checks, and error propagation bugs, via combined path-sensitive, flow-sensitive, intra- and inter-procedural data-flow analysis for accuracy and scalability. Implemented in the tool ESSS and evaluated on seven well-tested open-source projects including OpenSSL, OpenSSH, PHP and zlib, it reported 827 issues, manually categorized into 279 false positives and 541 true positives; patches submitted for 46 true positives were all accepted and applied.

USENIX · 2024