Wafer:基于多样化代码模糊技术的WebAssembly编译器测试

WAFER: TESTING WEBASSEMBLY COMPILERS VIA DIVERSE SOURCE CODE FUZZING

  • 摘要: WebAssembly是一种兼具高可移植性和高性能的字节码格式,但其编译器并不绝对可靠。Wafer是一种基于模糊技术的C到WebAssembly的编译器测试工具,它采用三种代码模糊策略生成多样化的测试程序,并通过比较编译后的字节码与原C程序的行为来解决测试基准问题。Wafer对两个被广泛使用的编译器Cheerp和Emscripten进行了测试,发现了14个新的漏洞,均已得到开发人员的确认。实验证明,Wafer能够检测多种类型的程序错误,覆盖率高于现有工具。

     

    Abstract: WebAssembly is an emerging form of binary compilation target that offers a portable representation and high-performance execution. However, WebAssembly compilers are not bug-free. Wafer is a fuzzing-based tool to test C-to-WebAssembly compilers. In order to generate diverse and comprehensive test cases, Wafer adopts three different code-fuzzing strategies. To solve the test oracle, Wafer compares the behaviors of compiled WebAssembly bytecode to the original C program, which are expected to have consistent behaviors. We applied Wafer to test two widely-adopted C-to-WebAssembly compilers, i.e. Cheerp and Emscripten. Wafer detected 14 new bugs in these compilers. All detected bugs were confirmed by developers. Extensive studies show that Wafer is capable of detecting various types of bugs, and achieves higher coverage than existing tools.

     

/

返回文章
返回