A New Era in Software Security: Towards Self-Healing Software via Large Language Models and Formal Verification
Norbert Tihanyi, Ridhi Jain, Yiannis Charalambous, Mohamed Amine, Ferrag, Youcheng Sun, Lucas C. Cordeiro

TL;DR
This paper presents ESBMC-AI, a novel framework combining Large Language Models and Formal Verification to automatically detect and repair vulnerabilities in C programs, enhancing software security through an innovative, automated approach.
Contribution
It introduces a new method that integrates LLMs with Bounded Model Checking for automated vulnerability detection and repair in software, demonstrating high accuracy on a large dataset.
Findings
Successfully repaired buffer overflow, arithmetic overflow, and pointer errors
High accuracy in vulnerability detection and fixing in 50,000 C programs
Potential for integration into CI/CD pipelines for continuous security improvement
Abstract
This paper introduces an innovative approach that combines Large Language Models (LLMs) with Formal Verification strategies for automatic software vulnerability repair. Initially, we employ Bounded Model Checking (BMC) to identify vulnerabilities and extract counterexamples. These counterexamples are supported by mathematical proofs and the stack trace of the vulnerabilities. Using a specially designed prompt, we combine the original source code with the identified vulnerability, including its stack trace and counterexample that specifies the line number and error type. This combined information is then fed into an LLM, which is instructed to attempt to fix the code. The new code is subsequently verified again using BMC to ensure the fix succeeded. We present the ESBMC-AI framework as a proof of concept, leveraging the well-recognized and industry-adopted Efficient SMT-based…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Software Reliability and Analysis Research · Software Testing and Debugging Techniques
MethodsMulti-Head Attention · Attention Is All You Need · Repair · Absolute Position Encodings · Softmax · Layer Normalization · Byte Pair Encoding · Dropout · Linear Layer · Label Smoothing
