The Hitchhiker's Guide to Program Analysis, Part II: Deep Thoughts by LLMs
By: Haonan Li , Hang Zhang , Kexin Pei and more
Potential Business Impact:
Finds software bugs better by checking code carefully.
Static analysis plays a crucial role in software vulnerability detection, yet faces a persistent precision-scalability tradeoff. In large codebases like the Linux kernel, traditional static analysis tools often generate excessive false positives due to simplified vulnerability modeling and overapproximation of path and data constraints. While large language models (LLMs) demonstrate promising code understanding capabilities, their direct application to program analysis remains unreliable due to inherent reasoning limitations. We introduce BugLens, a post-refinement framework that significantly enhances static analysis precision for bug detection. BugLens guides LLMs through structured reasoning steps to assess security impact and validate constraints from the source code. When evaluated on Linux kernel taint-style bugs detected by static analysis tools, BugLens improves precision approximately 7-fold (from 0.10 to 0.72), substantially reducing false positives while uncovering four previously unreported vulnerabilities. Our results demonstrate that a well-structured, fully automated LLM-based workflow can effectively complement and enhance traditional static analysis techniques.
Similar Papers
Static Analysis as a Feedback Loop: Enhancing LLM-Generated Code Beyond Correctness
Software Engineering
Makes computer code safer and easier to read.
LASHED: LLMs And Static Hardware Analysis for Early Detection of RTL Bugs
Cryptography and Security
Finds hidden computer chip security flaws.
A Contemporary Survey of Large Language Model Assisted Program Analysis
Software Engineering
Helps computers understand code better for security.