Skip to main content
QUICK REVIEW

[Paper Review] Characterizing and Detecting WebAssembly Runtime Bugs

Yixuan Zhang, Shangtong Cao|arXiv (Cornell University)|Jan 28, 2023
Software Engineering ResearchComputer Science3 citations
TL;DR

This paper presents the first systematic study of WebAssembly (WASM) runtime bugs, characterizing 31 distinct bug categories and their fix strategies through analysis of 311 real-world bug reports from GitHub. It introduces a pattern-based detection framework that identifies 53 previously unknown bugs across five WASM runtimes, with 14 confirmed and 6 fixed by developers.

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.

Motivation & Objective

  • To address the lack of systematic understanding of WebAssembly runtime bugs, which frequently cause WASM application crashes.
  • To characterize the root causes and fix strategies of real-world WASM runtime bugs through empirical analysis of 311 reported issues.
  • To develop an automated, pattern-based detection framework for identifying previously unknown bugs in WASM runtimes.
  • To validate the framework's effectiveness and generalizability across multiple popular and emerging WASM runtimes.
  • To contribute a publicly available dataset, scripts, and detector to support future research and tool development.

Proposed method

  • Collected 903 GitHub posts related to WASM runtime bugs and manually curated 311 high-quality real-world bug reports.
  • Constructed a taxonomy of 31 distinct bug categories based on symptom patterns and root causes observed in the bug reports.
  • Identified and summarized common fix strategies for each bug category through manual analysis of patch commits.
  • Designed a pattern-based static analysis framework that matches code patterns indicative of known bug categories.
  • Applied the detector to five WASM runtimes—wasmtime, wasmer, WAMR, wasm3, and WASMEdge—to uncover new vulnerabilities.
  • Reported findings to runtime maintainers, with 14 confirmed and 6 fixed based on the detection results.

Experimental results

Research questions

  • RQ1What are the most common categories of bugs in WebAssembly runtimes, and what are their underlying root causes?
  • RQ2What are the recurring fix strategies used by developers to resolve these runtime bugs?
  • RQ3Can a pattern-based detection framework effectively identify previously unknown bugs in WASM runtimes?
  • RQ4How generalizable is the proposed detection framework across diverse WASM runtimes, including emerging ones?
  • RQ5To what extent can the empirical findings and detection framework support automated debugging and future tool development?

Key findings

  • The study identified 31 distinct categories of WebAssembly runtime bugs, revealing a diverse spectrum of issues ranging from memory safety violations to incorrect control flow handling.
  • Common fix strategies include input validation, null pointer checks, and proper error handling, with patterns varying significantly across bug categories.
  • The pattern-based detection framework successfully uncovered 53 previously unknown bugs across five WASM runtimes, demonstrating strong detection capability.
  • Of the 53 reported bugs, 14 were confirmed by runtime maintainers, and 6 were fixed based on the researchers' reports, validating the framework's practical utility.
  • The study's dataset, detection scripts, and tools have been made publicly available to support replication and future research.
  • The results highlight the feasibility of using empirical bug characterization to guide automated detection in low-level systems like WASM runtimes.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.