RULF: Rust Library Fuzzing via API Dependency Graph Traversal

04/25/2021
by   Jianfeng Jiang, et al.
0

Robustness is a key concern for Rust library development because Rust promises no risks of undefined behaviors if developers use safe APIs only. Fuzzing is a practical approach for examining the robustness of programs. However, existing fuzzing tools are not directly applicable to library APIs due to the absence of fuzz targets. It mainly relies on human efforts to design fuzz targets case by case which is labor-intensive. To address this problem, this paper proposes a novel automated fuzz target generation approach for fuzzing Rust libraries via API dependency graph traversal. We identify several essential requirements for library fuzzing, including validity and effectiveness of fuzz targets, high API coverage, and efficiency. To meet these requirements, we first employ breadth-first search with pruning to find API sequences under a length threshold, then we backward search longer sequences for uncovered APIs, and finally we optimize the sequence set as a set covering problem. We implement our fuzz target generator and conduct fuzzing experiments with AFL++ on several real-world popular Rust projects. Our tool finally generates 7 to 118 fuzz targets for each library with API coverage up to 0.92. We exercise each target with a threshold of 24 hours and finally find 30 previously-unknown bugs from seven libraries.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
12/30/2022

Fuzzing Deep-Learning Libraries via Large Language Models

Detecting bugs in Deep Learning (DL) libraries is critical for almost al...
research
02/14/2020

Generating a Generic Fluent API in Java

Context: The algorithms for generating a safe fluent API are actively st...
research
09/07/2023

HOPPER: Interpretative Fuzzing for Libraries

Despite the fact that the state-of-the-art fuzzers can generate inputs e...
research
08/09/2023

Is unsafe an Achilles' Heel? A Comprehensive Study of Safety Requirements in Unsafe Rust Programming

Rust is an emerging, strongly-typed programming language focusing on eff...
research
02/25/2020

Interactive, Effort-Aware Library Version Harmonization

As a mixed result of intensive dependency on third-party libraries, flex...
research
08/27/2020

M3: Semantic API Migrations

Library migration is a challenging problem, where most existing approach...
research
03/06/2022

foREST: A Tree-based Approach for Fuzzing RESTful APIs

Representational state transfer (REST) is a widely employed architecture...

Please sign up or login with your details

Forgot password? Click here to reset