JSTIFuzz: Type-Inference-based JavaScript Engine Fuzzing

Yuli Wang,Xiaoqing Gong,Hao Chen,Jing Li,Baoying Liu,Shuai Cao
DOI: https://doi.org/10.1109/NaNA51271.2020.00071
2020-01-01
Abstract:To improve the execution coverage of test cases and cover more of the engine code, this paper presents JSTIFuzz, a novel type-inference-based test system for JavaScript. First, to avoid an exception in the previous code that would cause the program to exit prematurely, the original corpus is split into functions in JavaScript. After that, static text analysis is performed on the parameters in the function to determine their data types. The function call expression with the correct data type is generated. Finally, the test cases with high code coverage can be obtained by conducting precise mutation according to the type-inference results. The experiment shows that JSTIFuzz improves test program coverage by 30 % and reduces the likelihood of test cases termination compared to traditional established methods. We also find that the test cases can further drive the JavaScript engine effectively, improving the engine coverage by about 8.81 %. We put JSTIFuzz in practice, which found six crash defects in four JavaScript engines (Rhino, JerryScript, QuickJS, and Hermes), and two of them are confirmed.
What problem does this paper attempt to address?