Back to search

Virginia Tech

ReachForge: Automated Vulnerability-Directed Fuzz Harness Generation for C/C++ Libraries

Abstract

dc:description.abstract

Fuzz testing is one of the most effective techniques for discovering software vulnerabilities, yet its success critically depends on the quality of fuzz harnesses - driver programs that bridge generic fuzzers to specific library APIs. Writing high-quality harnesses is labor-intensive, requires deep understanding of library internals and does not scale to the thousands of Common Vulnerabilities and Exposures (CVEs) disclosed annually. Existing automated approaches either generate coverage-oriented harnesses without vulnerability awareness or apply Large Language Models (LLMs) without grounding their output in static analysis of the target library. This thesis presents REACHFORGE, a fully automated pipeline that takes a CVE identifier and a package name as input and produces a compiled fuzz harness, targeted seed inputs and crash artifacts that reproduce the vulnerability. REACHFORGE combines three complementary techniques: (1) LLVM IR callgraph analysis with function pointer resolution to identify public API entry points that reach vulnerable internal functions, (2) a CVE enrichment pipeline that retrieves vulnerability metadata and fix patch diffs from NVD, OSV.dev and GitHub in a retrieval-augmented generation pattern, and (3) structured multi-variant LLM prompting with a multi-stage validation and repair loop. The system is implemented in approximately 17,900 lines of Python across 15 modules, uses no external frameworks beyond the standard library and libclang bindings and operates inside OSS-Fuzz Docker containers for reproducible builds. We evaluate REACHFORGE on thirty-six real-world CVEs across fifteen open-source C/C++ libraries (cJSON, zlib, libyaml, c-ares, json-c, bzip2, Expat, libpng, libtiff, libxml2, pcre2, libarchive, file, sqlite3, libjpeg-turbo) spanning three build systems, eleven CWE classes (CWE- 20, 121, 122, 125, 189, 190, 369, 416, 476, 674, 787), and CVSS scores from 5.5 to 9.8. REACHFORGE compiles a harness on 35 of 36 CVEs and reproduces 22 of 36 (61%) under a criterion that the generated sanitizer crash matches the publicly documented crash for the CVE, with a median generation time of 130 seconds, median fuzz-to-crash time of 21 seconds and a total LLM API cost of $4.96 across all 36 attempts ($0.12 median per CVE). We compare directly against the existing OSS-FUZZ harness on the same vulnerable revisions (2 of 22 reproductions), Google's OSS-FUZZ-GEN on a 17-CVE subset (no reproductions), and a GPT-5.4 agent CLI baseline (18 of 22 reproducing CVEs, 2.4× slower median wall-clock time).

Degree

thesis:*
Name thesis:degree_name
Master of Science
Level thesis:degree_level
masters
Discipline thesis:degree_discipline
Computer Engineering
Department dc:contributor.department
Electrical and Computer Engineering
Grantor dc:publisher
Virginia Tech
Year dc:date.issued
2026

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Tiwari, Shubham
Chair dc:contributor.committeechair
  • Ravindran, Binoy
Committee members dc:contributor.committeemember
  • Fu, Zhoulai
  • Giles, Kendall Everett

Subjects

dc:subject × 7

Rights

dc:rights
Statement dc:rights
  • Creative Commons Attribution-NonCommercial 4.0 International
Language dc:language.iso
en

Identifiers

dc:identifier.*
Dc Identifier Other
vt_gsexam:47081

Chain of custody

source
Harvested from
Virginia Tech
Base URL
vtechworks.lib.vt.edu/oai/request
Last updated
2026-11-18
Source record
OAI-PMH GetRecord
citation

Tiwari, Shubham. ReachForge: Automated Vulnerability-Directed Fuzz Harness Generation for C/C++ Libraries. masters thesis, Virginia Tech, 2026. https://hdl.handle.net/10919/143311