Effective error-specification inference via domain-knowledge expansion
Effective error-specification inference via domain-knowledge expansion
复制标题
DOI:
10.1145/3338906.3338960
复制
发表时间:
2019-08
期刊:
影响因子:
--
通讯作者:
Daniel DeFreez;Haaken Martinson Baldwin;Cindy Rubio-González;Aditya V. Thakur
中科院分区:
文献类型:
--
作者:
Daniel DeFreez;Haaken Martinson Baldwin;Cindy Rubio-González;Aditya V. Thakur
Error-handling code responds to the occurrence of runtime errors. Failure to correctly handle errors can lead to security vulnerabilities and data loss. This paper deals with error handling in software written in C that uses the return-code idiom: the presence and type of error is encoded in the return value of a function. This paper describes EESI, a static analysis that infers the set of values that a function can return on error. Such a function error-specification can then be used to identify bugs related to incorrect error handling. The key insight of EESI is to bootstrap the analysis with domain knowledge related to error handling provided by a developer. EESI uses a combination of intraprocedural, flow-sensitive analysis and interprocedural, context-insensitive analysis to ensure precision and scalability. We built a tool ECC to demonstrate how the function error-specifications inferred by EESI can be used to automatically find bugs related to incorrect error handling. ECC detected 246 bugs across 9 programs, of which 110 have been confirmed. ECC detected 220 previously unknown bugs, of which 99 are confirmed. Two patches have already been merged into OpenSSL.