USENIX Security2024Top-tier venue
MOAT: Towards Safe BPF Kernel Extension
Hongyi Lu, Shuai Wang, Yechang Wu, Wanning He, Fengwei Zhang
Abstract
The Linux kernel extensively uses the Berkeley Packet Filter (BPF) to allow user-written BPF applications to execute in the kernel space. The BPF employs a verifier to check the security of user-supplied BPF code statically. Recent attacks show that BPF programs can evade security checks and gain unauthorized access to kernel memory, indicating that the verification process is not flawless. In this paper, we present MOAT, a system that isolates potentially malicious BPF programs using Intel Memory Protection Keys (MPK). Enforcing BPF program isolation with MPK is not straightforward; MOAT is designed to alleviate technical obstacles, such as limited hardware keys and the need to protect a wide variety of BPF helper functions. We implement MOAT on Linux (ver. 6.1.38), and our evaluation shows that MOAT delivers low-cost isolation of BPF programs under mainstream use cases, such as isolating a BPF packet filter with only 3% throughput loss.
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.
9 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
- SoK: Challenges and Paths Toward Memory Safety for eBPF cites HIVE: A Hardware-assisted Isolated Execution Environment for eBPF on AArch64
- SoK: Challenges and Paths Toward Memory Safety for eBPF cites Specification and verification in the field: Applying formal methods to BPF just-in-time compilers in the Linux kernel
- Selective On-Device Execution of Data-Dependent Read I/Os cites XRP: In-Kernel Storage Functions with eBPF
- HIVE: A Hardware-assisted Isolated Execution Environment for eBPF on AArch64 cites XRP: In-Kernel Storage Functions with eBPF
- Rex: Closing the language-verifier gap with safe and usable kernel extensions cites HIVE: A Hardware-assisted Isolated Execution Environment for eBPF on AArch64
- Rex: Closing the language-verifier gap with safe and usable kernel extensions cites XRP: In-Kernel Storage Functions with eBPF
- Rex: Closing the language-verifier gap with safe and usable kernel extensions cites Specification and verification in the field: Applying formal methods to BPF just-in-time compilers in the Linux kernel
- Revealing the Unstable Foundations of eBPF-Based Kernel Extensions cites XRP: In-Kernel Storage Functions with eBPF
- Revealing the Unstable Foundations of eBPF-Based Kernel Extensions cites Specification and verification in the field: Applying formal methods to BPF just-in-time compilers in the Linux kernel
Cited by top-tier papers9
- Rex: Closing the language-verifier gap with safe and usable kernel extensionsJinghao Jia, Ruowen Qin, Milo Craun, Egor Lukiyanov et al.USENIX ATC 2025 · 11 citations
- HIVE: A Hardware-assisted Isolated Execution Environment for eBPF on AArch64Peihua Zhang, Chenggang Wu, Xiangyu Meng, Yinqian Zhang et al.USENIX Security 2024 · 8 citations
- Revealing the Unstable Foundations of eBPF-Based Kernel ExtensionsShawn Wanxiang Zhong, Jing Liu, Andrea C. Arpaci-Dusseau, Remzi H. Arpaci-DusseauEuroSys 2025 · 4 citations
- Selective On-Device Execution of Data-Dependent Read I/OsChanyoung Park, Minu Chung, Hyungon MoonFAST 2025 · 2 citations
- SoK: Challenges and Paths Toward Memory Safety for eBPFKaiming Huang, Mathias Payer, Zhiyun Qian, Jack Sampson et al.S&P 2025
Builds on12
- ERIM: Secure, Efficient In-process Isolation with Protection Keys (MPK)Anjo Vahldiek-Oberwagner, Eslam Elnikety, Nuno O. Duarte, Michael Sammler et al.USENIX Security 2019 · 247 citations
- SKEE: A lightweight Secure Kernel-level Execution Environment for ARMAhmed M. Azab, Kirk Swidowski, Rohan Bhutkar, Jia Ma et al.NDSS 2016 · 105 citations
- XRP: In-Kernel Storage Functions with eBPFYuhong Zhong, Haoyu Li, Yu Jian Wu, Ioannis Zarkadas et al.OSDI 2022 · 100 citations
- 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
- SoK: Practical Foundations for Software Spectre DefensesSunjay Cauligi, Craig Disselkoen, Daniel Moghimi, Gilles Barthe et al.S&P 2022 · 59 citations
Related papers
- Extending Applications Safely and EfficientlyYusheng Zheng, Tong Yu, Yiwei Yang, Yanpeng Hu et al.OSDI 2025 · 7 citations
- EPF: Evil Packet FilterDi Jin, Vaggelis Atlidakis, Vasileios P. KemerlisUSENIX ATC 2023 · 14 citations
- 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
- VEP: A Two-stage Verification Toolchain for Full eBPF ProgrammabilityXiwei Wu, Yueyang Feng, Tianyi Huang, Xiaoyang Lu et al.NSDI 2025 · 8 citations
- Synthesizing safe and efficient kernel extensions for packet processingQiongwen Xu, Michael D. Wong, Tanvi Wagle, Srinivas Narayana et al.SIGCOMM 2021 · 30 citations
