ErrHunter: Detecting Error-Handling Bugs in the Linux Kernel Through Systematic Static Analysis

Dongyang Zhan,Xiangzhan Yu,Hongli Zhang,Lin Ye
DOI: https://doi.org/10.1109/tse.2022.3160155
IF: 7.4
2023-01-01
IEEE Transactions on Software Engineering
Abstract:Error handling is essential for operating systems, thus, there are many bugs in error-handling code, which could result in serious consequences. In this paper, we revisit the problem of error miss-handling bugs and analyze the root cause of the most common ones in the Linux kernel. Based on the analysis, we propose a systematic static taint-analysis-based approach, ErrHunter, to detect multiple kinds of error miss-handling bugs in the Linux kernel. An automated critical variable identification approach is proposed to identify critical variables in the error-handling paths. A static cross-control-flow taint analysis approach is proposed to construct critical-variable control flow graphs (CCFGs), which describe the processing of critical variables in separate control flows. Based on the CCFGs, ErrHunter can target the root cause of the most common error miss-handling bugs and detect the bugs in a systematic way. ErrHunter is designed for kernel bug detection, so it can handle many specific features of the Linux kernel, such as memory management mechanisms, etc.
What problem does this paper attempt to address?