Lune

SOSP2025Top-tier venue

eBPF Misbehavior Detection: Fuzzing with a Specification-Based Oracle

Tao Lyu, Kumar Kartikeya Dwivedi, Thomas Bourgeat, Mathias Payer, Meng Xu, Sanidhya Kashyap

Abstract

Bugs in the Linux eBPF verifier may cause it to mistakenly accept unsafe eBPF programs or reject safe ones, causing either security or usability issues. While prior works on fuzzing the eBPF verifier have been effective, their bug oracles only hint at the existence of bugs indirectly (e.g., when a memory error occurs in downstream execution) instead of showing the root cause, confining them to uncover a narrow range of security bugs only with no detection of usability issues.

In this paper, we propose SpecCheck, a specification-based oracle integrated with our fuzzer Veritas, to detect a wide range of bugs in the eBPF verifier. SpecCheck encodes eBPF instruction semantics and safety properties as a specification and turns the claim of whether a concrete eBPF program is safe into checking the satisfiability of the corresponding safety constraints, which can be reasoned automatically without abstraction. The output from the oracle will be crosschecked with the eBPF verifier for any discrepancies. Using SpecCheck, Veritas uncovered 13 bugs in the Linux eBPF verifier, including severe bugs that can cause privilege escalation or information leakage, as well as bugs that cause frustration in even experienced kernel developers.

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.

1 top-tier paper has cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Verifying the Verifier: eBPF Range Analysis Verification 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 Verifying the Verifier: eBPF Range Analysis Verification
  • 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
  • State-Aware Fuzzing of JavaScript Engines with LLM-Guided Instrumentation cites Validating the eBPF Verifier via State Embedding
  • Validating the eBPF Verifier via State Embedding cites Verifying the Verifier: eBPF Range Analysis Verification
  • 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
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers1

  1. State-Aware Fuzzing of JavaScript Engines with LLM-Guided InstrumentationWai Kin Wong, Dongwei Xiao, Anthony Cheuk Tung Lai, Ping Fan Ke et al.SOSP 2026

Builds on6

  1. 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
  2. Verifying the Verifier: eBPF Range Analysis VerificationHarishankar Vishwanathan, Matan Shachnai, Srinivas Narayana, Santosh NagarakatteCAV 2023 · 37 citations
  3. Finding Correctness Bugs in eBPF Verifier with Structured and Sanitized ProgramHao Sun, Yiru Xu, Jianzhong Liu, Yuheng Shen et al.EuroSys 2024 · 24 citations
  4. Validating the eBPF Verifier via State EmbeddingHao Sun, Zhendong SuOSDI 2024 · 18 citations
  5. Monarch: A Fuzzing Framework for Distributed File SystemsTao Lyu, Liyi Zhang, Zhiyao Feng, Yueyang Pan et al.USENIX ATC 2024 · 17 citations

Related papers

  1. 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
  2. Prove It to the Kernel: Precise Extension Analysis via Proof-Guided Abstraction RefinementHao Sun, Zhendong SuSOSP 2025
  3. BRF: Fuzzing the eBPF RuntimeHsin-Wei Hung, Ardalan Amiri SaniFSE 2024 · 8 citations
  4. SoK: Challenges and Paths Toward Memory Safety for eBPFKaiming Huang, Mathias Payer, Zhiyun Qian, Jack Sampson et al.S&P 2025
  5. LDBF: Deep Exploration of eBPF Runtime via LLM-Driven Program Generation and Adaptive Context OrchestrationYinhao Hu, Kaiyan Mei, Zeyu Sun, Quan Sun et al.CCS 2026
Dusk over the sea between two cliffs drawn in fine vertical lines