Static Stack-Preserving Intra-Procedural Slicing of WebAssembly Binaries
Quentin Stiévenart, David W. Binkley, Coen De Roover
Abstract
The recently introduced WebAssembly standard aims to be a portable compilation target, enabling the cross-platform distribution of programs written in a variety of languages. We propose an approach to slice WebAssembly programs in order to enable applications in reverse engineering, code comprehension, and security among others. Given a program and a location in that program, program slicing produces a minimal version of the program that preserves the behavior at the given location. Specifically, our approach is a static, intra-procedural, backward slicing approach that takes into account WebAssembly-specific dependences to identify the instructions of the slice. To do so it must correctly overcome the considerable challenges of performing dependence analysis at the binary level. Furthermore, for the slice to be executable, the approach needs to ensure that the stack behavior of its output complies with WebAssembly's validation requirements. We implemented and evaluated our approach on a suite of 8 386 real-world WebAssembly binaries, finding that the average size of the 495 204 868 slices computed is 53% of the original code, an improvement over the 60% attained by related work slicing ARM binaries. To gain a more qualitative understanding of the slices produced by our approach, we compared them to 1 956 source-level slices of benchmark C programs. This inspection helps to illustrate the slicer's strengths and to uncover potential future improvements.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 79f23f4d-ddd8-4c9e-b554-3f828a205a0bCited by top-tier papers4
- Exploring Missed Optimizations in WebAssembly OptimizersZhibo Liu, Dongwei Xiao, Zongjie Li, Shuai Wang et al.ISSTA 2023 · 24 citations
- WADIFF: A Differential Testing Framework for WebAssembly RuntimesShiyao Zhou, Muhui Jiang, Weimin Chen, Hao Zhou et al.ASE 2023 · 14 citations
- That's a Tough Call: Studying the Challenges of Call Graph Construction for WebAssemblyDaniel Lehmann, Michelle Thalakottur, Frank Tip, Michael PradelISSTA 2023 · 11 citations
- Bringing Managed Language Support to WebAssembly with External Library LinkingShuyao Jiang, Ruiying Zeng, Yangfan Zhou, Michael R. LyuFSE 2026
Builds on3
- An Empirical Study of Real-World WebAssembly Binaries: Security, Languages, Use CasesAaron Hilbig, Daniel Lehmann, Michael PradelWWW 2021 · 114 citations
- Twine: An Embedded Trusted Runtime for WebAssemblyJämes Ménétrey, Marcelo Pasin, Pascal Felber, Valerio SchiavoniICDE 2021 · 58 citations
- Everything Old is New Again: Binary Security of WebAssemblyDaniel Lehmann, Johannes Kinder, Michael PradelUSENIX Security 2020
Related papers
- Multi-modal Learning for WebAssembly Reverse EngineeringHanxian Huang, Jishen ZhaoISSTA 2024 · 1 citation
- When Function Inlining Meets WebAssembly: Counterintuitive Impacts on Runtime PerformanceAlan Romano, Weihang WangFSE 2023 · 7 citations
- An Empirical Study of Bugs in WebAssembly CompilersAlan Romano, Xinyue Liu, Yonghwi Kwon, Weihang WangASE 2021 · 43 citations
- NotDec: WebAssembly Decompilation With Inter-Procedural Type RecoveryJikai Wang, Ningyu He, Tianming Liu, Junhai Wang et al.ICSE 2026
- An Empirical Study of WebAssembly Usage in Node.jsMichelle Thalakottur, Maxwell Bernstein, Daniel Lehmann, Michael Pradel et al.ICSE 2026
