Finding Correctness Bugs in Ebpf Verifier with Structured and Sanitized Program

Hao Sun,Yiru Xu,Jianzhong Liu,Yuheng Shen,Nan Guan,Yu Jiang
DOI: https://doi.org/10.1145/3627703.3629562
2024-01-01
Abstract: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.
What problem does this paper attempt to address?