Fuzzm: Finding Memory Bugs through Binary-Only Instrumentation and Fuzzing of WebAssembly

10/28/2021
by   Daniel Lehmann, et al.
0

WebAssembly binaries are often compiled from memory-unsafe languages, such as C and C++. Because of WebAssembly's linear memory and missing protection features, e.g., stack canaries, source-level memory vulnerabilities are exploitable in compiled WebAssembly binaries, sometimes even more easily than in native code. This paper addresses the problem of detecting such vulnerabilities through the first binary-only fuzzer for WebAssembly. Our approach, called Fuzzm, combines canary instrumentation to detect overflows and underflows on the stack and the heap, an efficient coverage instrumentation, a WebAssembly VM, and the input generation algorithm of the popular AFL fuzzer. Besides as an oracle for fuzzing, our canaries also serve as a stand-alone binary hardening technique to prevent the exploitation of vulnerable binaries in production. We evaluate Fuzzm with 28 real-world WebAssembly binaries, some compiled from source and some found in the wild without source code. The fuzzer explores thousands of execution paths, triggers dozens of crashes, and performs hundreds of program executions per second. When used for binary hardening, the approach prevents previously published exploits against vulnerable WebAssembly binaries while imposing low runtime overhead.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/26/2020

IdSan: An identity-based memory sanitizer for fuzzing binaries

Most memory sanitizers work by instrumenting the program at compile time...
research
07/05/2020

Static Detection of Uninitialized Stack Variables in Binary Code

More than two decades after the first stack smashing attacks, memory cor...
research
02/18/2020

ShadowGuard : Optimizing the Policy and Mechanism of Shadow Stack Instrumentation using Binary Static Analysis

A shadow stack validates on-stack return addresses and prevents arbitrar...
research
08/19/2021

MESH: A Memory-Efficient Safe Heap for C/C++

While memory corruption bugs stemming from the use of unsafe programming...
research
07/05/2020

EvilCoder: Automated Bug Insertion

The art of finding software vulnerabilities has been covered extensively...
research
02/05/2023

LExecutor: Learning-Guided Execution

Executing code is essential for various program analysis tasks, e.g., to...
research
06/15/2017

Experimental Study of Compressed Stack Algorithms in Limited Memory Environments

The compressed stack is a data structure designed by Barba et al. (Alg...

Please sign up or login with your details

Forgot password? Click here to reset