Proceedings of the ACM on Software Engineering

E2WR: An Effective and Efficient Reduction Framework for WebAssembly Binaries

Shiyao Zhou, Ningyu He, David Lo, Xiapu Luo

Key points

From the paper's conclusion
  • To address these challenges, we propose E 2 WR, an effective and efficient reduction framework for Wasm binaries.

Abstract

WebAssembly (Wasm) is a prominent programming language enabling high-performance execution across diverse computing environments. However, bugs in Wasm runtimes, which execute Wasm binaries, can lead to severe security breaches and system failures. Manually debugging Wasm binaries that trigger such runtime bugs is exceedingly difficult due to their poor human readability, stemming from low-level stack-based instructions, complex control flow structures, and extraordinary length. Thus, there is a critical need for automated reduction techniques that minimize Wasm binaries while preserving the ability to trigger the original bug. However, existing reducers often suffer from significant limitations in effectiveness and efficiency: language-agnostic reducers frequently generate invalid variants without Wasm validation awareness, while Wasm-specific reducers still lack efficient intra-function instruction-sequence reduction and reduce definitions inefficiently. To address these challenges, we propose E 2 WR, an effective and efficient reduction framework for Wasm binaries. E 2 WR introduces a two-stage approach for intra-function instruction-sequence reduction, consisting of operand-dependency guided instruction reduction and combination-aware redundancy elimination to enable efficient delta debugging while avoiding unnecessary padding instructions, and a definition reduction approach that combines static analysis with delta-debugging-guided trials to remove property-irrelevant definitions efficiently. Compared with Wasm-Shrink and Wasm-Reduce, E 2 WR produces binaries that are 95.0% and 68.6% smaller, respectively, and achieves reduction speedups of 7.9×–12.4×.

Read the paper

Discussion

Science Skim's AI key points, plus readers' public thoughts

Readers' thoughts

No reader thoughts yet.

Related papers