BRF: Fuzzing the eBPF Runtime
Hsin-Wei Hung, Ardalan Amiri Sani
摘要
The eBPF technology in the Linux kernel has been widely adopted for different applications, such as networking, tracing, and security, thanks to the programmability it provides. By allowing user-supplied eBPF programs to be executed directly in the kernel, it greatly increases the flexibility and efficiency of deploying customized logic. However, eBPF also introduces a new and wide attack surface: malicious eBPF programs may try to exploit the vulnerabilities in the eBPF subsystem in the kernel.
Fuzzing is a promising technique to find such vulnerabilities. Unfortunately, our experiments with the stateof-the-art kernel fuzzer, Syzkaller, show that it cannot effectively fuzz the eBPF runtime, those components that are in charge of executing an eBPF program, for two reasons. First, the eBPF verifier (which is tasked with verifying the safety of eBPF programs) rejects many fuzzing inputs because (1) they do not comply with its required semantics or (2) they miss some dependencies, i.e., other syscalls that need to be issued before the program is loaded. Second, Syzkaller fails to attach and trigger the execution of eBPF programs most of the times.
This paper introduces the BPF Runtime Fuzzer (BRF), a fuzzer that can satisfy the semantics and dependencies required by the verifier and the eBPF subsystem. Our experiments show, in 48-hour fuzzing sessions, BRF can successfully execute 8× more eBPF programs compared to Syzkaller (and 32× more programs compared to Buzzer, an eBPF fuzzer released recently from Google). Moreover, eBPF programs generated by BRF are much more expressive than Syzkaller's. As a result, BRF achieves 101% higher code coverage. Finally, BRF has so far managed to find 6 vulnerabilities (2 of them have been assigned CVE numbers) in the eBPF runtime, proving its effectiveness.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 3 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- NAUTILUS: Fishing for Deep Bugs with Grammars 引用了 Angora: Efficient Fuzzing by Principled Search
- SoK: Challenges and Paths Toward Memory Safety for eBPF 引用了 Specification and verification in the field: Applying formal methods to BPF just-in-time compilers in the Linux kernel
- eBPF Misbehavior Detection: Fuzzing with a Specification-Based Oracle 引用了 Specification and verification in the field: Applying formal methods to BPF just-in-time compilers in the Linux kernel
- Program Analysis Combining Generalized Bit-Level and Word-Level Abstractions 引用了 Specification and verification in the field: Applying formal methods to BPF just-in-time compilers in the Linux kernel
- One Engine to Fuzz 'em All: Generic Language Processor Testing with Semantic Validation 引用了 NAUTILUS: Fishing for Deep Bugs with Grammars
- One Engine to Fuzz 'em All: Generic Language Processor Testing with Semantic Validation 引用了 Fuzzing JavaScript Engines with Aspect-preserving Mutation
- One Engine to Fuzz 'em All: Generic Language Processor Testing with Semantic Validation 引用了 Angora: Efficient Fuzzing by Principled Search
- Fuzzing JavaScript Engines with Aspect-preserving Mutation 引用了 NAUTILUS: Fishing for Deep Bugs with Grammars
引用它的顶会 Paper3
- Program Analysis Combining Generalized Bit-Level and Word-Level AbstractionsGuangsheng Fan, Liqian Chen, Banghu Yin, Wenyu Zhang 等ISSTA 2025 · 2 次引用
- SoK: Challenges and Paths Toward Memory Safety for eBPFKaiming Huang, Mathias Payer, Zhiyun Qian, Jack Sampson 等S&P 2025
- eBPF Misbehavior Detection: Fuzzing with a Specification-Based OracleTao Lyu, Kumar Kartikeya Dwivedi, Thomas Bourgeat, Mathias Payer 等SOSP 2025
它引用的 Paper7
- Angora: Efficient Fuzzing by Principled SearchPeng Chen, Hao ChenS&P 2018 · 616 次引用
- NAUTILUS: Fishing for Deep Bugs with GrammarsCornelius Aschermann, Tommaso Frassetto, Thorsten Holz, Patrick Jauernig 等NDSS 2019 · 291 次引用
- Fuzzing JavaScript Engines with Aspect-preserving MutationSoyeon Park, Wen Xu, Insu Yun, Daehee Jang 等S&P 2020 · 126 次引用
- 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 次引用
- One Engine to Fuzz 'em All: Generic Language Processor Testing with Semantic ValidationYongheng Chen, Rui Zhong, Hong Hu, Hangfan Zhang 等S&P 2021 · 70 次引用
相关 Paper
- LDBF: Deep Exploration of eBPF Runtime via LLM-Driven Program Generation and Adaptive Context OrchestrationYinhao Hu, Kaiyan Mei, Zeyu Sun, Quan Sun 等CCS 2026
- Toss a Fault to BpfChecker: Revealing Implementation Flaws for eBPF runtimes with Differential FuzzingChaoyuan Peng, Muhui Jiang, Lei Wu, Yajin ZhouCCS 2024 · 7 次引用
- NetPanic: the Attack Surface You Can't SyscallTianshuo Han, Zong Cao, Zhen Dong, Xiapu Luo 等S&P 2026
- Finding Correctness Bugs in eBPF Verifier with Structured and Sanitized ProgramHao Sun, Yiru Xu, Jianzhong Liu, Yuheng Shen 等EuroSys 2024 · 24 次引用
- Validating the eBPF Verifier via State EmbeddingHao Sun, Zhendong SuOSDI 2024 · 18 次引用
