WebAssembly (abbreviated WASM) has emerged as a promising language of the Web and also been used for a wide spectrum of software applications such as mobile applications and desktop applications. These applications, named as WASM applications, commonly run in WASM runtimes. Bugs in WASM runtimes are frequently reported by developers and cause the crash of WASM applications. However, these bugs have not been well studied. To fill in the knowledge gap, we present a systematic study to characterize and detect bugs in WASM runtimes. We first harvest a dataset of 311 real-world bugs from hundreds of related posts on GitHub. Based on the collected high-quality bug reports, we distill 31 bug categories of WASM runtimes and summarize their common fix strategies. Furthermore, we develop a pattern-based bug detection framework to automatically detect bugs in WASM runtimes. We apply the detection framework to five popular WASM runtimes and successfully uncover 53 bugs that have never been reported previously, among which 14 have been confirmed and 6 have been fixed by runtime developers.
翻译:WebAssembly(简称WASM)已成为一种前景广阔的Web语言,并广泛应用于移动应用、桌面应用等各类软件中。这些被称为WASM应用的软件通常在WASM运行时中运行。WASM运行时的缺陷常被开发者报告,并导致WASM应用崩溃。然而,当前对这一类缺陷的系统性研究尚显不足。为填补这一认知空白,我们开展了一项系统性的研究,旨在对WASM运行时的缺陷进行特征化描述与检测。首先,我们从GitHub上的数百篇相关贴文中收集了311个真实世界缺陷的数据集。基于这些高质量缺陷报告,我们提炼出31类WASM运行时缺陷类别,并总结其常见修复策略。进一步地,我们开发了一个基于模式的缺陷检测框架,用于自动检测WASM运行时的缺陷。将该检测框架应用于五个主流的WASM运行时后,我们成功发现了53个此前未被报告的缺陷,其中14个已获确认,6个已被运行时开发者修复。