{"id":{"repo_id":"vt","oai_identifier":"oai:vtechworks.lib.vt.edu:10919/143311"},"canonical_url":"https://search.ndltd.org/etd/vt/oai:vtechworks.lib.vt.edu:10919/143311","repository":{"repo_id":"vt","name":"Virginia Tech","base_url":"https://vtechworks.lib.vt.edu/oai/request"},"display":{"title":"ReachForge: Automated Vulnerability-Directed Fuzz Harness Generation for C/C++ Libraries","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).","abstract_html":"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&#x27;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).","abstract_has_math":true,"creators":["Tiwari, Shubham"],"institution":"Virginia Tech","degree_name":"Master of Science","degree_level":"masters","degree_discipline":"Computer Engineering","degree_department":"Electrical and Computer Engineering","school":null,"contributors":[],"advisors":[],"committee_chairs":["Ravindran, Binoy"],"committee_members":["Fu, Zhoulai","Giles, Kendall Everett"],"year":2026,"date_issued":"2026-06-08","date_published":"2026-06-08","updated_at":"2026-11-18T20:14:22Z","subjects":["Fuzzing","Program analysis","Memory Errors","Sanitizers","ML for vulnerability discovery or analysis","Software Testing","Vulnerability Analysis"],"languages":["en"],"rights":["Creative Commons Attribution-NonCommercial 4.0 International"],"rights_urls":["http://creativecommons.org/licenses/by-nc/4.0/"],"identifier_entries":[{"key":"dc:identifier.other","label":"Dc Identifier Other","values":["vt_gsexam:47081"],"render_values":[{"text":"vt_gsexam:47081","href":null,"code":true}]}],"person_identifier_entries":[]},"links":{"outbound_url":"https://hdl.handle.net/10919/143311","outbound_label":"Handle","outbound_source":"dc:identifier.uri","record_url":"https://hdl.handle.net/10919/143311","record_label":"Repository record","record_kind":"handle","record_source":"dc:identifier.uri","download_url":null,"download_label":null,"download_source":null,"access_status":null,"embargo_until":null,"access_note":null},"source_record":{"url":"https://vtechworks.lib.vt.edu/oai/request?verb=GetRecord&metadataPrefix=dim&identifier=oai%3Avtechworks.lib.vt.edu%3A10919%2F143311","prefix":"dim"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:contributor.committeechair","label":"Committee Chair","values":["Ravindran, Binoy"]},{"key":"dc:contributor.committeemember","label":"Committee Member","values":["Fu, Zhoulai","Giles, Kendall Everett"]},{"key":"dc:contributor.department","label":"Department","values":["Electrical and Computer Engineering"]},{"key":"dc:creator","label":"Author","values":["Tiwari, Shubham"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date.accessioned","label":"Dc Date Accessioned","values":["2026-06-09T08:05:32Z"]},{"key":"dc:date.available","label":"Dc Date Available","values":["2026-06-09T08:05:32Z"]},{"key":"dc:date.issued","label":"Date","values":["2026-06-08"]},{"key":"dc:publisher","label":"Institution","values":["Virginia Tech"]},{"key":"dc:type","label":"Dc Type","values":["Thesis"]},{"key":"thesis:degree_discipline","label":"Discipline","values":["Computer Engineering"]},{"key":"thesis:degree_level","label":"Degree Level","values":["masters"]},{"key":"thesis:degree_name","label":"Degree Name","values":["Master of Science"]},{"key":"thesis:institution_name","label":"Thesis Institution Name","values":["Virginia Polytechnic Institute and State University"]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject","label":"Dc Subject","values":["Fuzzing","Program analysis","Memory Errors","Sanitizers","ML for vulnerability discovery or analysis","Software Testing","Vulnerability Analysis"]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:language.iso","label":"Language (ISO)","values":["en"]},{"key":"dc:rights","label":"Dc Rights","values":["Creative Commons Attribution-NonCommercial 4.0 International"]},{"key":"dc:rights.uri","label":"Rights URI","values":["http://creativecommons.org/licenses/by-nc/4.0/"]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier.other","label":"Dc Identifier Other","values":["vt_gsexam:47081"]},{"key":"dc:identifier.uri","label":"Identifier URI","values":["https://hdl.handle.net/10919/143311"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description.abstract","label":"Abstract","values":["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)."]},{"key":"dc:description.abstractgeneral","label":"General Abstract","values":["Software vulnerabilities are bugs that attackers can exploit to compromise systems and they are discovered at a rate of over 25,000 per year. One of the best ways to find and confirm these bugs is through fuzz testing, a technique that feeds random or semi-random inputs to a program and monitors for crashes. However, to fuzz a software library, an engineer must first write a \"harness\": a small program that knows how to call the library's functions correctly. Writing these harnesses by hand is slow, tedious, and requires expert knowledge. This thesis presents REACHFORGE, a tool that automates this process. Given only the identifier of a known vulnerability and the name of the affected software package, REACHFORGE automat- ically retrieves information about the bug from public databases, analyzes the library's compiled code to find which functions to call, uses an AI language model to generate the harness, vali- dates and repairs the result and produces inputs designed to trigger the vulnerability. We tested REACHFORGE on thirty-six real security bugs in fifteen widely used open-source libraries including cJSON, zlib, libyaml, c-ares, json-c, bzip2, Expat, libpng, libtiff, libxml2, pcre2, libarchive, file, sqlite3, and libjpeg-turbo. It successfully reproduced 22 of 36 (61%) target vulnerabilities, each in roughly three minutes of automated work and at a total cost of about five dollars across all 36 attempts."]},{"key":"dc:description.degree","label":"Dc Description Degree","values":["Master of Science"]},{"key":"dc:format.medium","label":"Dc Format Medium","values":["ETD"]},{"key":"dc:title","label":"Title","values":["ReachForge: Automated Vulnerability-Directed Fuzz Harness Generation for C/C++ Libraries"]}]}],"canonical_facts":{"dc:contributor.committeechair":["Ravindran, Binoy"],"dc:contributor.committeemember":["Fu, Zhoulai","Giles, Kendall Everett"],"dc:contributor.department":["Electrical and Computer Engineering"],"dc:creator":["Tiwari, Shubham"],"dc:date.accessioned":["2026-06-09T08:05:32Z"],"dc:date.available":["2026-06-09T08:05:32Z"],"dc:date.issued":["2026-06-08"],"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)."],"dc:description.abstractgeneral":["Software vulnerabilities are bugs that attackers can exploit to compromise systems and they are discovered at a rate of over 25,000 per year. One of the best ways to find and confirm these bugs is through fuzz testing, a technique that feeds random or semi-random inputs to a program and monitors for crashes. However, to fuzz a software library, an engineer must first write a \"harness\": a small program that knows how to call the library's functions correctly. Writing these harnesses by hand is slow, tedious, and requires expert knowledge. This thesis presents REACHFORGE, a tool that automates this process. Given only the identifier of a known vulnerability and the name of the affected software package, REACHFORGE automat- ically retrieves information about the bug from public databases, analyzes the library's compiled code to find which functions to call, uses an AI language model to generate the harness, vali- dates and repairs the result and produces inputs designed to trigger the vulnerability. We tested REACHFORGE on thirty-six real security bugs in fifteen widely used open-source libraries including cJSON, zlib, libyaml, c-ares, json-c, bzip2, Expat, libpng, libtiff, libxml2, pcre2, libarchive, file, sqlite3, and libjpeg-turbo. It successfully reproduced 22 of 36 (61%) target vulnerabilities, each in roughly three minutes of automated work and at a total cost of about five dollars across all 36 attempts."],"dc:description.degree":["Master of Science"],"dc:format.medium":["ETD"],"dc:identifier.other":["vt_gsexam:47081"],"dc:identifier.uri":["https://hdl.handle.net/10919/143311"],"dc:language.iso":["en"],"dc:publisher":["Virginia Tech"],"dc:rights":["Creative Commons Attribution-NonCommercial 4.0 International"],"dc:rights.uri":["http://creativecommons.org/licenses/by-nc/4.0/"],"dc:subject":["Fuzzing","Program analysis","Memory Errors","Sanitizers","ML for vulnerability discovery or analysis","Software Testing","Vulnerability Analysis"],"dc:title":["ReachForge: Automated Vulnerability-Directed Fuzz Harness Generation for C/C++ Libraries"],"dc:type":["Thesis"],"thesis:degree_discipline":["Computer Engineering"],"thesis:degree_level":["masters"],"thesis:degree_name":["Master of Science"],"thesis:institution_name":["Virginia Polytechnic Institute and State University"]},"updated_at":"2026-11-18T20:14:22Z"}