WildSync: Automated Fuzzing Harness Synthesis via Wild API Usage Recovery
Open Access
- 22 June 2025
- journal article
- Published by Association for Computing Machinery (ACM) in Proceedings of the ACM on Software Engineering
- Vol. 2 (ISSTA) , 963-984
Abstract
Fuzzing stands as one of the most practical techniques for testing software efficiently. When applying fuzzing to software library APIs, high-quality fuzzing harnesses are essential, enabling fuzzers to execute the APIs with precise sequences and function parameters. Although software developers commonly rely on manual efforts to create fuzzing harnesses, there has been a growing interest in automating this process. Existing works are often constrained in scalability and effectiveness due to their reliance on compiler-based analysis or runtime execution traces, which require manual setup and configuration. Our investigation of multiple actively fuzzed libraries reveals that a large number of exported API functions externally used by various open-source projects remain untested by existing harnesses or unit-test files. The lack of testing for these API functions increase the risk of vulnerabilities going undetected, potentially leading to security issues. In order to address the lack of coverage affecting existing fuzzing methods, we propose a novel approach to automatically generate fuzzing harnesses by extracting usage patterns of untested functions from real-world scenarios, using techniques based on lightweight Abstract Syntax Tree parsing to extract API usage from external source code. Then, we integrate the usage patterns into existing harnesses to construct new ones covering these untested functions. We have implemented a prototype of this concept named WildSync, enabling the automatic synthesis of fuzzing harnesses for C/C++ libraries on OSS-Fuzz. In our experiments, WildSync successfully produced 469 new harnesses for 24 actively fuzzed libraries on OSS-Fuzz, and also 3 widely used libraries that can be later integrated into OSS-Fuzz. This results in a significant increase in test coverage spanning over 1.3k functions and 16k lines of code, while also identifying 7 previously undetected bugs.Keywords
This publication has 16 references indexed in Scilit:
- How Effective Are They? Exploring Large Language Model Based Fuzz Driver Generation2024
- Hopper: Interpretative Fuzzing for Libraries2023
- COMEX: A Tool for Generating Customized Source Code Representations2023
- UTopia: Automatic Generation of Fuzz Driver using Unit Tests2023
- Daisy: Effective Fuzz Driver Synthesis with Object Usage Sequence Analysis2023
- Automatically Seed Corpus and Fuzzing Executables Generation Using Test FrameworkIEEE Access, 2022
- GraphFuzz2022
- IntelliGen: Automatic Driver Synthesis for Fuzz Testing2021
- FUDGE: fuzz driver generation at scale2019
- An empirical study of the reliability of UNIX utilitiesCommunications of the ACM, 1990