Skip to main content
QUICK REVIEW

[论文解读] Characterizing and Detecting WebAssembly Runtime Bugs

Yixuan Zhang, Shangtong Cao|arXiv (Cornell University)|Jan 28, 2023
Software Engineering ResearchComputer Science被引用 3
一句话总结

本文首次系统性地研究了WebAssembly(WASM)运行时错误,通过分析GitHub上的311个真实世界错误报告,对31种不同的错误类别及其修复策略进行了特征分析。研究提出了一种基于模式的检测框架,在五个WASM运行时中识别出53个此前未知的错误,其中14个已确认,6个已被开发者修复。

ABSTRACT

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应用程序崩溃。
  • 通过分析311个报告的实际问题,对真实世界WASM运行时错误的根本原因和修复策略进行特征刻画。
  • 开发一种自动化、基于模式的检测框架,用于识别WASM运行时中此前未知的错误。
  • 验证该框架在多个主流及新兴WASM运行时中的有效性与泛化能力。
  • 公开提供数据集、脚本和检测工具,以支持未来的研究与工具开发。

提出的方法

  • 收集了903篇与WASM运行时错误相关的GitHub帖子,并手动筛选出311份高质量的真实世界错误报告。
  • 基于错误报告中观察到的症状模式和根本原因,构建了31种不同错误类别的分类体系。
  • 通过手动分析补丁提交,识别并总结了各类错误的常见修复策略。
  • 设计了一种基于模式的静态分析框架,可匹配指示已知错误类别的代码模式。
  • 将检测器应用于五个WASM运行时——wasmtime、wasmer、WAMR、wasm3和WASMEdge,以发现新的漏洞。
  • 已将发现结果报告给运行时维护者,其中14个错误被确认,6个已根据研究结果修复。

实验结果

研究问题

  • RQ1WebAssembly运行时中最常见的错误类别是什么?其根本原因是什么?
  • RQ2开发者在修复这些运行时错误时,采用了哪些重复出现的修复策略?
  • RQ3基于模式的检测框架能否有效识别出WASM运行时中此前未知的错误?
  • RQ4所提出的检测框架在多种WASM运行时(包括新兴运行时)中的泛化能力如何?
  • RQ5基于实证研究结果和检测框架,其在自动化调试和未来工具开发中的支持程度如何?

主要发现

  • 本研究识别出31种不同的WebAssembly运行时错误类别,揭示了从内存安全违规到控制流处理错误等多样化的缺陷。
  • 常见修复策略包括输入验证、空指针检查和适当的错误处理,且不同错误类别中的模式存在显著差异。
  • 基于模式的检测框架在五个WASM运行时中成功识别出53个此前未知的错误,展现出强大的检测能力。
  • 在报告的53个错误中,14个被运行时维护者确认,6个已根据研究人员的报告修复,验证了该框架的实际应用价值。
  • 本研究的数据集、检测脚本和工具已公开发布,以支持复现和未来研究。
  • 结果表明,利用实证错误特征分析可有效指导低级系统(如WASM运行时)中的自动化检测。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。