No Harness, No Problem: Oracle-guided Harnessing for Auto-generating C API Fuzzing Harnesses
Gabriel Sherman, Stefan Nagy
摘要
Library APIs are used by virtually every modern application and system, making them among today's most security-critical software. In recent years, library bug-finding efforts have overwhelmingly adopted the powerful testing strategy of coverage-guided fuzzing. At its core, API fuzzing operates on harnesses: wrapper programs that initialize an API before feeding random inputs to its functions. Successful fuzzing demands correct and thorough harnesses, making manual harnessing challenging without sufficient domain expertise. To overcome this, recent strategies propose “learning” libraries' intended usage to automatically generate their fuzzing harnesses. Yet, despite their high code coverage, resulting harnesses frequently miss key API semantics-bringing with them invalid, unrealistic, or otherwise-impossible data and call sequences-derailing fuzzing with false-positive crashes. Thus, without a precise, semantically-correct harnessing, many critical APIs will remain beyond fuzzing's reach-leaving their hidden vulnerabilities ripe for attackers. This paper introduces Oracle-guided Harnessing: a technique for fully-automatic, semantics-aware API fuzzing har-ness synthesis. At a high level, Oracle-guided Harnessing mimics the trial-and-error process of manual harness creation-yet au-tomates it via fuzzing. Specifically, we leverage information from API headers to mutationally stitch-together candidate harnesses; and evaluate their validity via a set of Correctness Oracles: compilation, execution, and changes in coverage. By keeping-and further mutating-only correct candidates, our approach produces a diverse set of semantically-correct harnesses for complex, real-world libraries in as little as one hour. We integrate Oracle-guided Harnessing as a prototype, OG HARN; and evaluate it alongside today's leading fully-automatic harnessing approach, Hopper, and a plethora of developer-written harnesses from OSS-Fuzz. Across 20 real-world APIs, OGHARN outperforms developer-written harnesses by a median 14% code coverage, while uncovering 31 and 30 more vulnerabilities than both Hopper and developer-written harnesses, respectively-with zero false-positive crashes. Of the 41 new vulnerabilities found by OGHARN, all 41 are confirmed by developers-40 of which are since fixed-with many found in APIs that, until now, lacked harnesses whatsoever.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 6 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Belobog: Move Language Fuzzing Framework for Real-World Smart Contracts 引用了 LibAFL: A Framework to Build Modular and Reusable Fuzzers
- LibAFL: A Framework to Build Modular and Reusable Fuzzers 引用了 Seed selection for successful fuzzing
- LibAFL: A Framework to Build Modular and Reusable Fuzzers 引用了 Boosting fuzzer efficiency: an information theoretic perspective
- SnakeCharmer: Automatic Fuzzing Harness Generation for Pure and Hybrid Python Libraries 引用了 Seed selection for successful fuzzing
- SnakeCharmer: Automatic Fuzzing Harness Generation for Pure and Hybrid Python Libraries 引用了 Evaluating Fuzz Testing
- Seed selection for successful fuzzing 引用了 Designing New Operating Primitives to Improve Fuzzing Performance
- Seed selection for successful fuzzing 引用了 Boosting fuzzer efficiency: an information theoretic perspective
- Seed selection for successful fuzzing 引用了 Evaluating Fuzz Testing
- Bennet: Randomized Specification Testing for Heap-Manipulating Programs 引用了 Seed selection for successful fuzzing
- Bennet: Randomized Specification Testing for Heap-Manipulating Programs 引用了 Boosting fuzzer efficiency: an information theoretic perspective
- Bennet: Randomized Specification Testing for Heap-Manipulating Programs 引用了 Evaluating Fuzz Testing
- PoCGen: Generating Proof-of-Concept Exploits for Vulnerabilities in Npm Packages 引用了 Evaluating Fuzz Testing
- Boosting fuzzer efficiency: an information theoretic perspective 引用了 Evaluating Fuzz Testing
- Evaluating Fuzz Testing 引用了 Designing New Operating Primitives to Improve Fuzzing Performance
引用它的顶会 Paper6
- Bennet: Randomized Specification Testing for Heap-Manipulating ProgramsZain K. Aamer, Benjamin C. PierceOOPSLA 2025 · 4 次引用
- PoCGen: Generating Proof-of-Concept Exploits for Vulnerabilities in Npm PackagesDeniz Simsek, Aryaz Eghbali, Michael PradelFSE 2026 · 4 次引用
- Belobog: Move Language Fuzzing Framework for Real-World Smart ContractsZiqiao Kong, Wanxu Xia, Zhengwei Li, Yi Lu 等ISSTA 2026
- Thinking More, Harnessing Better: Automatic Harness Generation with Dataflow Aggregation and Workflow DecompositionXing Zhang, Zikang Huang, Gang Yang, CongChong Wang 等CCS 2026
- SnakeCharmer: Automatic Fuzzing Harness Generation for Pure and Hybrid Python LibrariesGabriel Sherman, Stefan NagyFSE 2026
它引用的 Paper11
- Evaluating Fuzz TestingGeorge Klees, Andrew Ruef, Benji Cooper, Shiyi Wei 等CCS 2018 · 753 次引用
- Designing New Operating Primitives to Improve Fuzzing PerformanceWen Xu, Sanidhya Kashyap, Changwoo Min, Taesoo KimCCS 2017 · 139 次引用
- Boosting fuzzer efficiency: an information theoretic perspectiveMarcel Böhme, Valentin J. M. Manès, Sang Kil ChaFSE 2020 · 115 次引用
- Seed selection for successful fuzzingAdrian Herrera, Hendra Gunadi, Shane Magrath, Michael Norrish 等ISSTA 2021 · 95 次引用
- LibAFL: A Framework to Build Modular and Reusable FuzzersAndrea Fioraldi, Dominik Christian Maier, Dongjia Zhang, Davide BalzarottiCCS 2022 · 71 次引用
相关 Paper
- WildSync: Automated Fuzzing Harness Synthesis via Wild API Usage RecoveryWei-Cheng Wu, Stefan Nagy, Christophe HauserISSTA 2025 · 1 次引用
- Hopper: Interpretative Fuzzing for LibrariesPeng Chen, Yuxuan Xie, Yunlong Lyu, Yuxiao Wang 等CCS 2023 · 23 次引用
- FuzzGen: Automatic Fuzzer GenerationKyriakos K. Ispoglou, Daniel Austin, Vishwath Mohan, Mathias PayerUSENIX Security 2020
- Prompt Fuzzing for Fuzz Driver GenerationYunlong Lyu, Yuxuan Xie, Peng Chen, Hao ChenCCS 2024 · 21 次引用
- Automatic, Expressive, and Scalable Fuzzing with StitchingHarrison Green, Fraser Brown, Claire Le GouesCCS 2026 · 1 次引用
