Automated Software Vulnerability Patching using Large Language Models
<|reference_start|>Automated Software Vulnerability Patching using Large Language Models: Timely and effective vulnerability patching is essential for cybersecurity defense, for which various approaches have been proposed yet still struggle to generate valid and correct patches for real-world vulnerabilities. In this paper, we leverage the power and merits of pre-trained large language models (LLMs) to enable automated vulnerability patching using no test input/exploit evidence and without model training/fine-tuning. To elicit LLMs to effectively reason about vulnerable code behaviors, which is essential for quality patch generation, we introduce adaptive prompting on LLMs and instantiate the methodology as LLMPATCH, an automated LLM-based patching system. Our evaluation of LLMPATCH on real-world vulnerable code including zeroday vulnerabilities demonstrates its superior performance to both existing prompting methods and state-of-the-art non-LLM-based techniques (by 98.9% and 65.4% in F1 over the best baseline performance). LLMPATCH has also successfully patched 7 out of 11 zero-day vulnerabilities, including 2 that none of the four baselines compared were able to.<|reference_end|>
@article{nong2024automated,
    title={Automated Software Vulnerability Patching using Large Language Models},
    author={Yu Nong, Haoran Yang, Long Cheng, Hongxin Hu, and Haipeng Cai},
    journal={arXiv preprint arXiv:2408.13597},
    year={2024},
    archivePrefix={arXiv},
    eprint={2408.13597},
    primaryClass={cs.CR cs.SE}
}