Security Risks of Porting C Programs to WebAssembly
Quentin Sti\'evenart, Coen De Roover, Mohammad Ghafari

TL;DR
This study examines the security implications of porting C programs to WebAssembly, revealing that differences in execution can introduce security risks and may require source code modifications.
Contribution
It provides a comprehensive analysis of security risks and execution differences when porting C programs to WebAssembly, highlighting the need for source code adaptations.
Findings
4,911 binaries produced different results across platforms
Differences caused by standard library, environment semantics, and security measures
Porting may require source code changes to ensure security
Abstract
WebAssembly is a compilation target for cross-platform applications that is increasingly being used. In this paper, we investigate whether one can transparently cross-compile C programs to WebAssembly, and if not, what impact porting can have on their security. We compile 17,802 programs that exhibit common vulnerabilities to 64-bit x86 and to WebAssembly binaries, and we observe that the execution of 4,911 binaries produces different results across these platforms. Through manual inspection, we identify three classes of root causes for such differences: the use of a different standard library implementation, the lack of security measures in WebAssembly, and the different semantics of the execution environments. We describe our observations and discuss the ones that are critical from a security point of view and need most attention from developers. We conclude that compiling an existing…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
