Lune

EuroSys2024顶会

Finding Correctness Bugs in eBPF Verifier with Structured and Sanitized Program

Hao Sun, Yiru Xu, Jianzhong Liu, Yuheng Shen, Nan Guan, Yu Jiang

摘要

eBPF is an inspiring technique in Linux that allows user space processes to extend the kernel by dynamically injecting programs. However, it poses security issues, since the untrusted user code is now executed in the kernel space. eBPF utilizes a verifier to validate the safety of the provided programs, thus its correctness is of paramount importance as attackers may exploit vulnerabilities within it to inject malicious programs. Bug-finding tools like kernel fuzzers currently can detect memory bugs in eBPF system calls, but they experience difficulties in finding correctness bugs in the verifier, e.g., incorrect validations that allow the loading of unsafe programs. Because, unlike detecting memory bugs, where sanitizers can capture such errors once observed, automatically uncovering correctness bugs is very difficult, without an effective test oracle that determines if the verifier behaves correctly for given programs.

In this paper, we propose an effective approach to automatically detect the verifier's correctness bugs. Our core observation is that since the verifier aims to ensure that eBPF programs do not affect the security of the kernel, any illegal behaviors in verified programs are indicators of correctness bugs in the verifier. Indeed, we can convert the detection of logical errors in the verifier to traditional bug finding in eBPF programs. Based on such insight, we devise two indicators for correctness bugs and propose corresponding sanitation mechanisms to capture them, both of which naturally form an effective test oracle. We implemented our idea in a tool, namely BVF, which generates structured eBPF programs to pass the verifier, and subsequently, it finds correctness bugs

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 12 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • MoonShine: Optimizing OS Fuzzer Seed Selection with Trace Distillation 引用了 kAFL: Hardware-Assisted Feedback Fuzzing for OS Kernels
  • Krace: Data Race Fuzzing for Kernel File Systems 引用了 MoonShine: Optimizing OS Fuzzer Seed Selection with Trace Distillation
  • Krace: Data Race Fuzzing for Kernel File Systems 引用了 kAFL: Hardware-Assisted Feedback Fuzzing for OS Kernels
  • Krace: Data Race Fuzzing for Kernel File Systems 引用了 Angora: Efficient Fuzzing by Principled Search
  • Rex: Closing the language-verifier gap with safe and usable kernel extensions 引用了 Validating the eBPF Verifier via State Embedding
  • Revealing the Unstable Foundations of eBPF-Based Kernel Extensions 引用了 Validating the eBPF Verifier via State Embedding
  • Validating the eBPF Verifier via State Embedding 引用了 kAFL: Hardware-Assisted Feedback Fuzzing for OS Kernels
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper12

  1. Validating the eBPF Verifier via State EmbeddingHao Sun, Zhendong SuOSDI 2024 · 18 次引用
  2. Rex: Closing the language-verifier gap with safe and usable kernel extensionsJinghao Jia, Ruowen Qin, Milo Craun, Egor Lukiyanov 等USENIX ATC 2025 · 11 次引用
  3. PolyJuice: Detecting Mis-compilation Bugs in Tensor Compilers with Equality Saturation Based RewritingChijin Zhou, Bingzhou Qian, Gwihwan Go, Quan Zhang 等OOPSLA 2024 · 7 次引用
  4. Revealing the Unstable Foundations of eBPF-Based Kernel ExtensionsShawn Wanxiang Zhong, Jing Liu, Andrea C. Arpaci-Dusseau, Remzi H. Arpaci-DusseauEuroSys 2025 · 4 次引用
  5. AnyBlox: A Framework for Self-Decoding DatasetsMateusz Gienieczko, Maximilian Kuschewski, Thomas Neumann, Viktor Leis 等VLDB 2025 · 3 次引用

它引用的 Paper16

  1. Angora: Efficient Fuzzing by Principled SearchPeng Chen, Hao ChenS&P 2018 · 616 次引用
  2. kAFL: Hardware-Assisted Feedback Fuzzing for OS KernelsSergej Schumilo, Cornelius Aschermann, Robert Gawlik, Sebastian Schinzel 等USENIX Security 2017 · 324 次引用
  3. MoonShine: Optimizing OS Fuzzer Seed Selection with Trace DistillationShankara Pailoor, Andrew Aday, Suman JanaUSENIX Security 2018 · 180 次引用
  4. EnFuzz: Ensemble Fuzzing with Seed Synchronization among Diverse FuzzersYuanliang Chen, Yu Jiang, Fuchen Ma, Jie Liang 等USENIX Security 2019 · 139 次引用
  5. Krace: Data Race Fuzzing for Kernel File SystemsMeng Xu, Sanidhya Kashyap, Hanqing Zhao, Taesoo KimS&P 2020 · 131 次引用

相关 Paper

  1. eBPF Misbehavior Detection: Fuzzing with a Specification-Based OracleTao Lyu, Kumar Kartikeya Dwivedi, Thomas Bourgeat, Mathias Payer 等SOSP 2025
  2. Verifying the Verifier: eBPF Range Analysis VerificationHarishankar Vishwanathan, Matan Shachnai, Srinivas Narayana, Santosh NagarakatteCAV 2023 · 37 次引用
  3. SoK: Challenges and Paths Toward Memory Safety for eBPFKaiming Huang, Mathias Payer, Zhiyun Qian, Jack Sampson 等S&P 2025
  4. VEP: A Two-stage Verification Toolchain for Full eBPF ProgrammabilityXiwei Wu, Yueyang Feng, Tianyi Huang, Xiaoyang Lu 等NSDI 2025 · 8 次引用
  5. Prove It to the Kernel: Precise Extension Analysis via Proof-Guided Abstraction RefinementHao Sun, Zhendong SuSOSP 2025
黄昏的海面,两侧是细线勾勒的悬崖