KNighter: Transforming Static Analysis with LLM-Synthesized Checkers
Chenyuan Yang, Zijie Zhao, Zichen Xie, Haoyu Li, Lingming Zhang
摘要
Static analysis is a powerful technique for bug detection in critical systems like operating system kernels. However, designing and implementing static analyzers is challenging, time-consuming, and typically limited to predefined bug patterns. While large language models (LLMs) have shown promise for static analysis, directly applying them to scan large systems remains impractical due to computational constraints and contextual limitations.
We present KNighter, the first approach that unlocks scalable LLM-based static analysis by automatically synthesizing static analyzers from historical bug patterns. Rather than using LLMs to directly analyze massive systems, our key insight is leveraging LLMs to generate specialized static analyzers guided by historical patch knowledge. KNighter implements this vision through a multi-stage synthesis pipeline that validates checker correctness against original patches and employs an automated refinement process to iteratively reduce false positives. Our evaluation on the Linux kernel demonstrates that KNighter generates high-precision checkers capable of detecting diverse bug patterns overlooked by existing human-written analyzers. To date, KNightersynthesized checkers have discovered 92 new, critical, longlatent bugs (average 4.3 years) in the Linux kernel; 77 are confirmed, 57 fixed, and 30 have been assigned CVE numbers. This work establishes an entirely new paradigm for scalable, reliable, and traceable LLM-based static analysis for real-world systems via checker synthesis.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 6 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Locus: Agentic Predicate Synthesis for Directed Fuzzing 引用了 Large Language Models Are Zero-Shot Fuzzers: Fuzzing Deep-Learning Libraries via Large Language Models
- Locus: Agentic Predicate Synthesis for Directed Fuzzing 引用了 Enhancing Static Analysis for Practical Bug Detection: An LLM-Integrated Approach
- NESA: Relational Neuro-Symbolic Static Program Analysis 引用了 Enhancing Static Analysis for Practical Bug Detection: An LLM-Integrated Approach
- Large Language Models Are Zero-Shot Fuzzers: Fuzzing Deep-Learning Libraries via Large Language Models 引用了 Automated Program Repair in the Era of Large Pre-trained Language Models
- PBFuzz: Agentic Directed Fuzzing for PoV Generation 引用了 Locus: Agentic Predicate Synthesis for Directed Fuzzing
- PBFuzz: Agentic Directed Fuzzing for PoV Generation 引用了 Large Language Models Are Zero-Shot Fuzzers: Fuzzing Deep-Learning Libraries via Large Language Models
- RFCAudit: AI Agent for Auditing Protocol Implementations Against RFC Specifications 引用了 Enhancing Static Analysis for Practical Bug Detection: An LLM-Integrated Approach
- Automated Program Repair via Conversation: Fixing 162 out of 337 Bugs for $0.42 Each using ChatGPT 引用了 Automated Program Repair in the Era of Large Pre-trained Language Models
引用它的顶会 Paper6
- QLCoder: A Query Synthesizer For Static Analysis of Security VulnerabilitiesClaire Wang, Ziyang Li, Saikat Dutta, Mayur NaikICLR 2026 · 22 次引用
- RFCAudit: AI Agent for Auditing Protocol Implementations Against RFC SpecificationsMingwei Zheng, Chengpeng Wang, Xuwei Liu, Jinyao Guo 等ASE 2025 · 5 次引用
- NESA: Relational Neuro-Symbolic Static Program AnalysisChengpeng Wang, Yifei Gao, Wuqi Zhang, Xuwei Liu 等FSE 2026 · 1 次引用
- Locus: Agentic Predicate Synthesis for Directed FuzzingJie Zhu, Chihao Shen, Ziyang Li, Jiahao Yu 等ICSE 2026
- PBFuzz: Agentic Directed Fuzzing for PoV GenerationHaochen Zeng, Andrew Bao, Jiajun Cheng, Chengyu SongCCS 2026
它引用的 Paper21
- Self-Consistency Improves Chain of Thought Reasoning in Language ModelsXuezhi Wang, Jason Wei, Dale Schuurmans, Quoc V. Le 等ICLR 2023 · 681 次引用
- Automated Program Repair in the Era of Large Pre-trained Language ModelsChunqiu Steven Xia, Yuxiang Wei, Lingming ZhangICSE 2023 · 321 次引用
- Large Language Models Are Zero-Shot Fuzzers: Fuzzing Deep-Learning Libraries via Large Language ModelsYinlin Deng, Chunqiu Steven Xia, Haoran Peng, Chenyuan Yang 等ISSTA 2023 · 253 次引用
- Enhancing Static Analysis for Practical Bug Detection: An LLM-Integrated ApproachHaonan Li, Yu Hao, Yizhuo Zhai, Zhiyun QianOOPSLA 2024 · 142 次引用
- Automated Program Repair via Conversation: Fixing 162 out of 337 Bugs for $0.42 Each using ChatGPTChunqiu Steven Xia, Lingming ZhangISSTA 2024 · 105 次引用
相关 Paper
- SpecAuditor: Generating Audit Specifications for LLM-Driven Bug DetectionMiaoqian Lin, Hao ChenS&P 2026 · 3 次引用
- Towards More Accurate Static Analysis for Taint-Style Bug Detection in Linux KernelHaonan Li, Hang Zhang, Kexin Pei, Zhiyun QianASE 2025 · 5 次引用
- DR. CHECKER: A Soundy Analysis for Linux Kernel DriversAravind Machiry, Chad Spensky, Jake Corina, Nick Stephens 等USENIX Security 2017 · 126 次引用
- KernelGPT: Enhanced Kernel Fuzzing via Large Language ModelsChenyuan Yang, Zijie Zhao, Lingming ZhangASPLOS 2025 · 45 次引用
- One Bug, Hundreds Behind: LLMs for Large-Scale Bug DiscoveryQiushi Wu, Yue Xiao, Dhilung Kirat, Kevin Eykholt 等ICML 2026 · 5 次引用
