Skip to main navigation Skip to search Skip to main content

Logs In, Patches Out: Automated Vulnerability Repair via Tree-of-Thought LLM Analysis

  • Korea University

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

Abstract

Research on automated vulnerability repair often requires extensive program analysis and expert input, making it challenging to deploy in practice. We propose SAN2PATCH, a system that generates patches using only sanitizer logs and source code, eliminating the need for costly program analysis or manual intervention. SAN2PATCH employs multi-stage reasoning with Large Language Models (LLMs) to decompose the patching process into four distinct tasks: vulnerability comprehension, fault localization, fix strategy formulation, and patch generation. Through tree-structured prompting and rigorous validation, SAN2PATCH can generate diverse, functionally-correct patches. Evaluations on the VulnLoc dataset show that SAN2PATCH successfully patches 79.5% of vulnerabilities, surpassing state-of-the-art tools like ExtractFix (43%) and VulnFix (51%) by significant margins. On our newly curated SAN2VULN dataset of 27 new vulnerabilities from various open-source projects, SAN2PATCH achieves a 63% success rate, demonstrating its effectiveness on modern security flaws. Notably, SAN2PATCH excels at patching complex memory-related vulnerabilities, successfully fixing 81.8% of buffer overflows while preserving program functionality. This high performance, combined with minimal deployment requirements and elimination of manual steps, makes SAN2PATCH a practical solution for real-world vulnerability remediation.

Original languageEnglish
Title of host publicationProceedings of the 34th USENIX Security Symposium
PublisherUSENIX Association
Pages4401-4419
Number of pages19
ISBN (Electronic)9781939133526
StatePublished - 2025
Event34th USENIX Security Symposium, USENIX Security 2025 - Seattle, United States
Duration: 13 Aug 202515 Aug 2025

Publication series

NameProceedings of the 34th USENIX Security Symposium

Conference

Conference34th USENIX Security Symposium, USENIX Security 2025
Country/TerritoryUnited States
CitySeattle
Period13/08/2515/08/25

Fingerprint

Dive into the research topics of 'Logs In, Patches Out: Automated Vulnerability Repair via Tree-of-Thought LLM Analysis'. Together they form a unique fingerprint.

Cite this