KRAKENGUARD: Towards Fine-Grained eBPF Isolation
Jainil Patel (IIT Roorkee), Lucas Graeff Buhl-Nielsen (Quantco), Adrien Ghosn (Microsoft), Marios Kogias (Professor · Imperial College London)
23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI '26) · Day 3 · Sandboxes, Containers, and Beyond
Overview
KrakenGuard is a load-time eBPF (Extended Berkeley Packet Filter) policy enforcer designed to provide fine-grained isolation for eBPF programs with zero runtime overhead. Presented at USENIX NSDI, this research addresses a critical security and isolation gap in modern multi-tenant cloud environments where diverse, untrusted users share computing resources and load kernel-level programs. Traditional eBPF permission models rely on broad Linux capabilities—such as capbpf, capperfmon, or the legacy capsysadmin—which grant sweeping access to kernel helpers, maps, and tracing facilities once acquired.

Key moments
- 0:00 Introduction and background on eBPF and isolation challenges
- 2:00 Security vulnerabilities and limitations of current eBPF permission models
- 6:00 Core insights for constraining eBPF and symbolic execution
- 8:00 Introduction to KrakenGuard architecture and policy checks
- 10:00 Cross-program analysis for safe co-location
- 11:40 KrakenGuard policy language and rule examples
- 13:00 Evaluation results with real-world programs and CVEs
- 15:40 Conclusion and availability of KrakenGuard source code
KrakenGuard: Towards Fine-Grained eBPF Isolation
Speakers: Jainil Patel (IIT Roorkee); Lucas Graeff Buhl-Nielsen (Quantco); Adrien Ghosn (Microsoft); Marios Kogias (Imperial College London)
Conference: USENIX NSDI
YouTube: https://www.youtube.com/watch?v=dMDetmCEmJc
Overview
KrakenGuard is a load-time eBPF (Extended Berkeley Packet Filter) policy enforcer designed to provide fine-grained isolation for eBPF programs with zero runtime overhead. Presented at USENIX NSDI, this research addresses a critical security and isolation gap in modern multi-tenant cloud environments where diverse, untrusted users share computing resources and load kernel-level programs. Traditional eBPF permission models rely on broad Linux capabilities—such as cap_bpf, cap_perfmon, or the legacy cap_sys_admin—which grant sweeping access to kernel helpers, maps, and tracing facilities once acquired.
The talk outlines how these coarse-grained privileges enable real-world attacks, such as container escapes via offensive helper functions, while existing mitigation strategies either introduce severe throughput penalties or suffer from imprecise policy analysis. KrakenGuard solves this by intercepting eBPF bytecode in a trusted user-space daemon, lifting it to LLVM IR (Intermediate Representation), and performing exhaustive symbolic execution against a declarative JSON-based policy language. By verifying execution paths and checking cross-program interference at load time, KrakenGuard enables safe multi-tenant co-location—such as running multiple high-performance XDP (eXpress Data Path) programs—without sacrificing host network throughput or relying on expensive runtime monitoring.
Background
▶ Watch: Introduction and background on eBPF and isolation challenges (0:00)
The adoption of eBPF has shifted from a niche kernel diagnostic tool to core infrastructure powering hyperscale data planes, including Meta’s Katran and Cloudflare’s Unimog. In shared environments managed via Kubernetes pods, containers, or orchestrators like BPFman and Meta’s NetEd, users frequently deploy eBPF programs for networking, security observability, and performance acceleration. However, the underlying kernel permission model was never engineered for multi-tenancy.
Granting cap_bpf to a containerized application inadvertently exposes powerful kernel interfaces. For instance, privilege escalation vulnerabilities (documented in various CVEs) allow an unprivileged or containerized process to load tracing eBPF programs, target privileged host processes, and inject malicious payloads using helper functions like bpf_probe_write_user. Beyond malicious intent, co-locating multiple eBPF programs on shared kernel hooks often leads to accidental interference.
Current isolation strategies fall short. Enforcing separation by forcing eBPF programs to attach to virtual network interfaces instead of raw ingress points (e.g., bypassing XDP's early packet processing) causes severe performance degradation, with experiments showing over 40% throughput loss for UDP echo servers. Conversely, runtime enforcement frameworks incur high execution overhead, require kernel source modifications, or provide incomplete scoping. Existing load-time checkers often rely on approximate static analysis, leading to false assurances. KrakenGuard was developed to eliminate these trade-offs by combining exhaustive symbolic execution with zero-overhead load-time enforcement.
Key Findings
▶ Watch: Core insights for constraining eBPF and symbolic execution (6:00)
KrakenGuard’s evaluation across real-world frameworks and complex codebases demonstrates that rigorous load-time symbolic verification is both computationally feasible and highly effective.
- Analysis Efficiency: For complex production programs—including Katran, Electrode (a framework optimizing Paxos distributed protocols via eBPF), HXDP, Fluvio, and Linux kernel test suites—KrakenGuard completed its symbolic analysis in under 1 second while consuming less than 100 MB of memory.
- Complexity Scaling: The primary bottleneck in analysis time is the internal complexity and branching structure of the individual eBPF program, rather than the complexity or size of the user-defined policy.
- Malware and Exploit Detection: KrakenGuard successfully flagged and rejected programs attempting to misuse offensive helpers (such as unauthorized state modifications) and intercepted historical verifier bypass exploits attempting out-of-bounds kernel memory reads and writes.
- XDP-as-a-Service Performance: In multi-tenant networking benchmarks, KrakenGuard enabled safe co-location of distinct UDP services using raw XDP hooks without incurring the 40%+ throughput penalties associated with virtual interface routing workarounds.
Technical Deep Dive
▶ Watch: Cross-program analysis for safe co-location (10:00)
KrakenGuard operates as a privileged user-space daemon that acts as a secure gatekeeper between unprivileged users and the Linux kernel. When an unprivileged process submits eBPF bytecode over a socket, KrakenGuard intercepts the binary object code directly, bypassing the need for original source code.
The system architecture relies on several core technical pillars:
- Bytecode Lifter: KrakenGuard includes a dedicated lifter that translates raw eBPF instruction bytecode into LLVM IR. This lifts low-level register manipulations and jump instructions into a representation suitable for advanced compiler analysis and symbolic execution.
- Exhaustive Symbolic Execution: While general-purpose symbolic execution suffers from path explosion and non-termination, eBPF programs are uniquely constrained: the in-kernel verifier already guarantees termination and lacks unbounded loops. KrakenGuard exploits this invariant to execute symbolic inputs (such as a symbolic packet structure for XDP programs) across every feasible execution path with zero approximations.
- Four-Interface Confinement Model: The engine monitors eBPF interaction surfaces, which reduce entirely to four primary vectors: Helpers (system helper functions invoked), Maps (kernel data structures accessed), Memory (read/write byte ranges), and Return values.
- Conditional Policy Enforcement: Using a JSON-based Domain Specific Language (DSL), policies can combine memory conditions (e.g., inspecting packet headers) with action rules using logical operators (
AND,OR,NOT). For example, packet inspection rules can conditionally restrict helper access and memory modifications only when matching specific destination ports (like port 80). - Cross-Program Interference Analysis: For safe co-location, KrakenGuard builds precise read and write sets per execution path, tracking exact map identifiers and memory byte ranges accessed by competing programs. If overlapping write sets or unexpected state mutations are detected, co-location is denied.
Experimental Setup & Results
▶ Watch: KrakenGuard policy language and rule examples (11:40)
The evaluation investigated KrakenGuard’s feasibility across diverse production workloads, synthetic attack vectors, and multi-tenant networking configurations.
- Datasets & Workloads: Benchmarks utilized production-grade software including Katran (Layer 4 load balancer), Electrode (Paxos performance accelerator running in fast quorum prune mode), HXDP, Fluvio, and historical Linux kernel Common Vulnerabilities and Exposures (CVE) test cases.
- Hardware & Environment: The system was evaluated on standard Linux server architectures running modern kernels equipped with standard eBPF JIT compilation and verifier subsystems.
- Execution Performance Metrics:
- Single-program and paired-program analysis times consistently remained under 1 second.
- Memory overhead stayed strictly below 100 MB during the heaviest symbolic evaluations (notably Electrode paired with Katran).
- Security Validation: KrakenGuard successfully intercepted zero-day style proof-of-concept exploits attempting verifier bypasses and malicious state injections via
bpf_probe_write_user. - Throughput Preservation: In multi-tenant XDP routing benchmarks, avoiding virtual network interface bottlenecks preserved high-speed ingress packet handling, avoiding the >40% throughput degradation observed when forcing packet traversal through traditional host network stacks.
Practical Implications
▶ Watch: Conclusion and availability of KrakenGuard source code (15:40)
For cloud architects, platform engineers, and infrastructure teams, KrakenGuard transforms how eBPF can be safely integrated into shared, multi-tenant environments like Kubernetes clusters.
- Delegated Multi-Tenancy: Platform teams can safely delegate eBPF loading capabilities to unprivileged tenants without granting dangerous global capabilities like
cap_sys_adminor risking container breakouts. - Zero Runtime Performance Tax: Because all verification, path exploration, and cross-program interference checks occur at load time, runtime packet processing and tracing execute at native hardware speed with zero instrumentation overhead.
- Declarative Security Policies: Infrastructure operators gain fine-grained control over specific packet byte ranges, map permissions, and helper invocations, allowing precise multi-tenant isolation policies tailored to specific microservices.
- Limitations: The approach assumes that the underlying LLVM lifter and symbolic execution engine correctly model eBPF instruction semantics. Additionally, highly complex programs with combinatorial branching could theoretically push analysis times higher, though real-world evaluations remained well within practical sub-second limits.
Key Takeaways
- Privilege Mismatch: Traditional Linux capabilities (
cap_bpf,cap_sys_admin) are too coarse-grained for multi-tenant eBPF usage, opening avenues for container escapes and privilege escalation. - Load-Time Symbolic Verification: By leveraging the fact that eBPF programs are guaranteed to terminate, KrakenGuard performs exhaustive symbolic execution with zero approximations and zero runtime overhead.
- Four-Interface Constraint Model: Programs are completely constrained by regulating their interaction across four precise interfaces: helpers, maps, memory, and return values.
- Safe Co-Location: Cross-program path analysis tracks read and write sets to prevent interference, enabling multiple unprivileged eBPF programs to share kernel hooks safely.
- Production Feasibility: KrakenGuard analyzes complex real-world systems like Katran and Electrode in under 1 second and under 100 MB of RAM while maintaining native network throughput.
About the Speaker(s)
Jainil Patel completed his undergraduate studies at the Indian Institute of Technology (IIT) Roorkee and conducted this research alongside co-authors under the guidance of Professor Marios Kogias at Imperial College London. Lucas Graeff Buhl-Nielsen represents Quantco, and Adrien Ghosn represents Microsoft, reflecting a collaborative effort spanning academic and industry systems research.
Reviews
→ Top-rated talks at 23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI '26)
All talks from 23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI '26)