Unsafe Nesting in BPF Programs

dc.contributor.authorChintamaneni, Siddharthen
dc.contributor.committeechairWilliams, Daniel Johnen
dc.contributor.committeememberNikolopoulos, Dimitrios S.en
dc.contributor.committeememberNoh, Sam Hyuken
dc.contributor.departmentComputer Science and#38; Applicationsen
dc.date.accessioned2025-01-15T09:00:46Zen
dc.date.available2025-01-15T09:00:46Zen
dc.date.issued2025-01-14en
dc.description.abstractSafe kernel extensions are crucial for adding features like networking filters, security policies, and monitoring capabilities that organizations require in production environments. The Linux kernel traditionally lacked mechanisms for safe runtime extensions. BPF addressed this problem by enabling dynamic kernel extensions with safety guarantees enforced by an in-kernel verifier, ensuring kernel stability. The verifier verifies each BPF program without considering its interactions with other BPF programs, assuming these interactions will be safe. This assumption relies on both static limits enforced by the verifier and runtime checks in the kernel. However, this verification approach leaves the kernel vulnerable to safety issues when BPF programs nest within each other. This work identifies such safety issues, including stack overflows, deadlocks, performance issues, and missed events. To address these challenges, this research presents an approach for providing a global system view to the verifier to prevent uncontrolled nesting. We explored the first steps in this direction through a helper-rooted callgraph approach that provides a global view of BPF program interactions, enabling the prevention of these safety issues.en
dc.description.abstractgeneralLinux is one of the most popular mainstream operating systems, running on over 96% of the world's servers. Extending the kernel is important because users need features like network filtering and system monitoring. Recently, BPF provided a safe way to extend Linux's capabilities by using an in-kernel safety checker called the verifier, which examines each program before it runs to prevent crashes and system stalls. Due to these safety guarantees, BPF has been widely adopted in industry for various use cases. In this work, we identified that when multiple BPF programs are nested, they can cause problems even though the programs are individually verified as safe. Our experiments showed three critical issues: stack overflows, deadlocks and performance problems (such as throughput loss). We identified that these crashes occur because the verifier lacks knowledge about how BPF programs interact with each other. To address this problem, we developed an approach called helper-rooted callgraphs that shows how different programs interact. This information can then be used by the verifier to prevent unsafe program interactions.en
dc.description.degreeMaster of Scienceen
dc.format.mediumETDen
dc.identifier.othervt_gsexam:42171en
dc.identifier.urihttps://hdl.handle.net/10919/124192en
dc.language.isoenen
dc.publisherVirginia Techen
dc.rightsIn Copyrighten
dc.rights.urihttp://rightsstatements.org/vocab/InC/1.0/en
dc.subjecteBPFen
dc.subjectLinuxen
dc.subjectKernel extensionsen
dc.subjectNestingen
dc.titleUnsafe Nesting in BPF Programsen
dc.typeThesisen
thesis.degree.disciplineComputer Science & Applicationsen
thesis.degree.grantorVirginia Polytechnic Institute and State Universityen
thesis.degree.levelmastersen
thesis.degree.nameMaster of Scienceen

Files

Original bundle
Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
Chintamaneni_S_T_2025.pdf
Size:
1.39 MB
Format:
Adobe Portable Document Format

Collections