Lune

USENIX Security2025

Waltzz: WebAssembly Runtime Fuzzing with Stack-Invariant Transformation

Lingming Zhang, Binbin Zhao, Jiacheng Xu, Peiyu Liu, Qinge Xie, Yuan Tian, Jianhai Chen, Shouling Ji

2025年份

摘要

WebAssembly (Wasm) is a binary instruction format proposed by major browser vendors to achieve near-native performance on the web and other platforms. By design, Wasm modules should be executed in a memory-safe runtime, which acts as a trusted computing base. Therefore, security vulnerabilities inside runtime implementation can have severe impacts and should be identified and mitigated promptly. Fuzzing is a practical and widely adopted technique for uncovering bugs in real-world programs. However, to apply fuzzing effectively to the domain of Wasm runtimes, it is vital to address two primary challenges: (1) Wasm is a stack-based language and runtimes should verify the correctness of stack semantics, which requires fuzzers to meticulously maintain desired stack semantics to reach deeper states. (2) Wasm acts as a compilation target and includes hundreds of instructions, making it hard for fuzzers to explore different combinations of instructions and cover the input space effectively. To address these challenges, we design and implement WALTZZ, a practical greybox fuzzing framework tailored for Wasm runtimes. Specifically, WALTZZ proposes the concept of stack-invariant code transformation to preserve appropriate stack semantics during fuzzing. Next, WALTZZ introduces a versatile suite of mutators designed to systematically traverse diverse combinations of instructions in terms of both control and data flow. Moreover, WALTZZ designs a skeletonbased generation algorithm to produce code snippets that are rarely seen in the seed corpus. To demonstrate the efficacy of WALTZZ, we evaluate it on seven well-known Wasm runtimes. Compared to the state-of-the-art works, WALTZZ can surpass the nearest competitor by finding 12.4% more code coverage even within the large code bases and uncovering 1.38× more unique bugs. Overall, WALTZZ has discovered 20 new bugs which have all been confirmed and 17 CVE IDs have been assigned.