Specification and verification in the field: Applying formal methods to BPF just-in-time compilers in the Linux kernel
Luke Nelson, Jacob Van Geffen, Emina Torlak, Xi Wang
Abstract
This paper describes our experience applying formal methods to a critical component in the Linux kernel, the just-in-time compilers ("JITs") for the Berkeley Packet Filter (BPF) virtual machine. We verify these JITs using Jitterbug, the first framework to provide a precise specification of JIT correctness that is capable of ruling out real-world bugs, and an automated proof strategy that scales to practical implementations. Using Jitterbug, we have designed, implemented, and verified a new BPF JIT for 32-bit RISC-V, found and fixed 16 previously unknown bugs in five other deployed JITs, and developed new JIT optimizations; all of these changes have been upstreamed to the Linux kernel. The results show that it is possible to build a verified component within a large, unverified system with careful design of specification and proof strategy.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext d325800a-f308-421a-8db1-308ed85eae12Cited by top-tier papers34
- Verifying the Verifier: eBPF Range Analysis VerificationHarishankar Vishwanathan, Matan Shachnai, Srinivas Narayana, Santosh NagarakatteCAV 2023 · 37 citations
- Synthesizing safe and efficient kernel extensions for packet processingQiongwen Xu, Michael D. Wong, Tanvi Wagle, Srinivas Narayana et al.SIGCOMM 2021 · 30 citations
- Automated Verification of Network Function BinariesSolal Pirelli, Akvile Valentukonyte, Katerina J. Argyraki, George CandeaNSDI 2022 · 25 citations
- Finding Correctness Bugs in eBPF Verifier with Structured and Sanitized ProgramHao Sun, Yiru Xu, Jianzhong Liu, Yuheng Shen et al.EuroSys 2024 · 24 citations
- Validating JIT Compilers via Compilation Space ExplorationCong Li, Yanyan Jiang, Chang Xu, Zhendong SuSOSP 2023 · 22 citations
Builds on6
- Spectre Attacks: Exploiting Speculative ExecutionPaul Kocher, Jann Horn, Anders Fogh, Daniel Genkin et al.S&P 2019 · 2,435 citations
- HACL*: A Verified Modern Cryptographic LibraryJean Karim Zinzindohoué, Karthikeyan Bhargavan, Jonathan Protzenko, Benjamin BeurdoucheCCS 2017 · 258 citations
- Simple High-Level Code for Cryptographic Arithmetic - With Proofs, Without CompromisesAndres Erbsen, Jade Philipoom, Jason Gross, Robert Sloan et al.S&P 2019 · 147 citations
- EverCrypt: A Fast, Verified, Cross-Platform Cryptographic ProviderJonathan Protzenko, Bryan Parno, Aymeric Fromherz, Chris Hawblitzel et al.S&P 2020 · 114 citations
- Synthesizing JIT Compilers for In-Kernel DSLsJacob Van Geffen, Luke Nelson, Isil Dillig, Xi Wang et al.CAV 2020 · 27 citations
Related papers
- End-to-End Mechanized Proof of a JIT-Accelerated eBPF Virtual Machine for IoTShenghao Yuan, Frédéric Besson, Jean-Pierre TalpinCAV 2024 · 18 citations
- Formalizing the Linux eBPF Core ISA: A Mechanized Operational Semantics and Its Real-World ApplicationsShenghao Yuan, Yazhou Tang, Tianci Cao, Frédéric Besson et al.OOPSLA 2026
- Icarus: Trustworthy Just-In-Time Compilers with Symbolic Meta-ExecutionNaomi Smith, Abhishek Sharma, John Renner, David Thien et al.SOSP 2024 · 17 citations
- VEP: A Two-stage Verification Toolchain for Full eBPF ProgrammabilityXiwei Wu, Yueyang Feng, Tianyi Huang, Xiaoyang Lu et al.NSDI 2025 · 8 citations
- Towards a verified range analysis for JavaScript JITsFraser Brown, John Renner, Andres Nötzli, Sorin Lerner et al.PLDI 2020 · 28 citations
