Verifying the Verifier: eBPF Range Analysis Verification
Harishankar Vishwanathan, Matan Shachnai, Srinivas Narayana, Santosh Nagarakatte
Abstract
Abstract This paper proposes an automated method to check the correctness of range analysis used in the Linux kernel ’s eBPF verifier. We provide the specification of soundness for range analysis performed by the eBPF verifier. We automatically generate verification conditions that encode the operation of the eBPF verifier directly from the Linux kernel ’s C source code and check it against our specification. When we discover instances where the eBPF verifier is unsound, we propose a method to generate an eBPF program that demonstrates the mismatch between the abstract and the concrete semantics. Our prototype automatically checks the soundness of 16 versions of the eBPF verifier in the Linux kernel versions ranging from 4.14 to 5.19. In this process, we have discovered new bugs in older versions and proved the soundness of range analysis in the latest version of the Linux kernel.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
14 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Synthesizing safe and efficient kernel extensions for packet processing cites Synthesizing JIT Compilers for In-Kernel DSLs
- Synthesizing safe and efficient kernel extensions for packet processing cites Dataflow-based pruning for speeding up superoptimization
- Synthesizing safe and efficient kernel extensions for packet processing cites Specification and verification in the field: Applying formal methods to BPF just-in-time compilers in the Linux kernel
- Merlin: Multi-tier Optimization of eBPF Code for Performance and Compactness cites Synthesizing safe and efficient kernel extensions for packet processing
- NetEdit: An Orchestration Platform for eBPF Network Functions at Scale cites Specification and verification in the field: Applying formal methods to BPF just-in-time compilers in the Linux kernel
- Finding Correctness Bugs in eBPF Verifier with Structured and Sanitized Program cites Specification and verification in the field: Applying formal methods to BPF just-in-time compilers in the Linux kernel
- eTran: Extensible Kernel Transport with eBPF cites Synthesizing safe and efficient kernel extensions for packet processing
- eTran: Extensible Kernel Transport with eBPF cites Validating the eBPF Verifier via State Embedding
- Specification and verification in the field: Applying formal methods to BPF just-in-time compilers in the Linux kernel cites Synthesizing JIT Compilers for In-Kernel DSLs
- Validating the eBPF Verifier via State Embedding cites Finding Correctness Bugs in eBPF Verifier with Structured and Sanitized Program
- Validating the eBPF Verifier via State Embedding cites Specification and verification in the field: Applying formal methods to BPF just-in-time compilers in the Linux kernel
Cited by top-tier papers14
- 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 the eBPF Verifier via State EmbeddingHao Sun, Zhendong SuOSDI 2024 · 18 citations
- eTran: Extensible Kernel Transport with eBPFZhongjie Chen, Qingkai Meng, ChonLam Lao, Yifan Liu et al.NSDI 2025 · 17 citations
- Merlin: Multi-tier Optimization of eBPF Code for Performance and CompactnessJinsong Mao, Hailun Ding, Juan Zhai, Shiqing MaASPLOS 2024 · 15 citations
- NetEdit: An Orchestration Platform for eBPF Network Functions at ScaleTheophilus A. Benson, Prashanth Kannan, Prankur Gupta, Balasubramanian Madhavan et al.SIGCOMM 2024 · 11 citations
Builds on4
- Specification and verification in the field: Applying formal methods to BPF just-in-time compilers in the Linux kernelLuke Nelson, Jacob Van Geffen, Emina Torlak, Xi WangOSDI 2020 · 72 citations
- Synthesizing safe and efficient kernel extensions for packet processingQiongwen Xu, Michael D. Wong, Tanvi Wagle, Srinivas Narayana et al.SIGCOMM 2021 · 30 citations
- Synthesizing JIT Compilers for In-Kernel DSLsJacob Van Geffen, Luke Nelson, Isil Dillig, Xi Wang et al.CAV 2020 · 27 citations
- Dataflow-based pruning for speeding up superoptimizationManasij Mukherjee, Pranav Kant, Zhengyang Liu, John RegehrOOPSLA 2020 · 21 citations
Related papers
- 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
- eBPF Misbehavior Detection: Fuzzing with a Specification-Based OracleTao Lyu, Kumar Kartikeya Dwivedi, Thomas Bourgeat, Mathias Payer et al.SOSP 2025
- SoK: Challenges and Paths Toward Memory Safety for eBPFKaiming Huang, Mathias Payer, Zhiyun Qian, Jack Sampson et al.S&P 2025
- Prove It to the Kernel: Precise Extension Analysis via Proof-Guided Abstraction RefinementHao Sun, Zhendong SuSOSP 2025
- VEP: A Two-stage Verification Toolchain for Full eBPF ProgrammabilityXiwei Wu, Yueyang Feng, Tianyi Huang, Xiaoyang Lu et al.NSDI 2025 · 8 citations
