SecWest / Technical analysis
Shirudo: the limits of automated runtime mitigation
Shirudo baseline
In this analysis
You are going to hear a lot about “Shirudo”, OpenAI and Cisco’s rework/extension of Isovalent’s Tetragon eBPF runtime enforcement technology, because of the hyperbole-laden announcement they just put out.
Having examined the technical documentation, I see several fundamental problems, some specific to Shirudo and others inherent to eBPF-based vulnerability mitigation:
Shirudo’s own documentation is considerably more restrained than the launch announcements. It explicitly describes the software as pre-release and not yet suitable for production deployment.
- The flagship Java4Shell demonstration did not actually use eBPF to mitigate the vulnerability.
- Validating that a shield does not break legitimate functionality remains a difficult engineering problem.
- The infrastructure introduces additional privileged code, kernel dependencies and attack surface.
- The eBPF verifier does not establish the security correctness of generated mitigations.
- eBPF cannot transparently repair arbitrary vulnerable code.
- Performance costs accumulate with the number, complexity and invocation frequency of deployed shields.
OpenAI and Cisco’s Shirudo project combines AI-generated vulnerability mitigations with signed eBPF programs, a distribution mechanism and a modified Linux kernel that restricts the loading and removal of those programs. The idea is to deploy temporary defenses while the vulnerable software remains in service, without waiting for the vendor’s patch or restarting the machine. There are environments where this would be useful, particularly when the vulnerable functionality can be isolated at a kernel hook and the cost of restarting a machine is high.
There is less evidence for the broader proposition that this will provide a general defense against the volume of vulnerabilities AI systems are expected to discover. The limitations are partly performance-related, but the more interesting problems concern what eBPF can intercept, what it can change, and how one establishes that the resulting mitigation works. The project documentation is rather more circumspect about these issues than the launch material; Shirudo is pre-release software, not a production-ready security platform.
Performance and the accumulation of shields
The published performance measurements were made on a four-vCPU KVM guest with 4 GiB of RAM, running on a Ryzen 9 3950X host with a development kernel and a software TPM. Before installing any vulnerability-specific shields, Shirudo loads 48 BPF LSM programs at 39 kernel hooks. The reported costs are BPF execution times, not complete syscall latency measurements.
| Operation | Reported cost |
|---|---|
| fork() and execve() | 3.2 µs |
| File open | 150 ns |
| File creation, writing, renaming and unlinking | 650 ns |
| mmap() | 37 ns |
| mprotect() | 150 ns |
| ioctl() | 280 ns |
| Loading a small shield | 500 ms |
| TPM attestation | 460 ms |
Additional overhead from observability shields
These measurements exclude some of the surrounding trampoline, RCU and recursion-handling costs, while the instrumentation used to measure BPF execution introduces overhead of its own. The kernel-obs package adds another 35 programs and 18 maps, including an arena that can occupy 16 MiB. With this package installed, the BPF execution time associated with fork and exec increases from 3.2 to 7.3 microseconds, and file opens from 150 to 290 nanoseconds. Neither figure means that the entire syscall takes twice as long.
| Operation | Base BPF | With kernel-obs | Increase in BPF time |
|---|---|---|---|
| fork() + execve() | 3.2 µs | 7.3 µs | 128% |
| File open | 150 ns | 290 ns | 93% |
With just this one observability package, the program count rises from 48 to 83. These are additional costs before deploying a collection of vulnerability-specific shields. They are increases in BPF execution time, not in total syscall latency.
What matters is how often the hooks execute. A cumulative five microseconds of BPF execution at a million invocations per second consumes five CPU-seconds per second, or the equivalent of five continuously occupied CPUs. On a 16-CPU machine this is 31.25% of nominal CPU capacity, before accounting for map contention, cache effects, telemetry and scheduling. A shield on an obscure kernel function might cost virtually nothing; several shields on a busy filesystem or networking path can have quite different economics. Shirudo currently has no aggregate budget for the number of programs and maps installed by an upatch or the frequency with which they execute.
CPU equivalents = invocations/sec × execution time in microseconds / 1,000,000. Illustrative model, not a measured workload benchmark. Excludes contention, telemetry and scheduling effects. Logical CPU capacity is a nominal approximation; SMT siblings do not provide independent physical-core throughput.
There is some relevant historical data from Isovalent’s 2023 Tetragon presentation. In a parallel compilation workload, the basic loader sensor added 2.79% to execution time, monitoring 190 syscalls with filtering and export added 6.42%, and extensive syscall and file monitoring added 23%. The latter configuration consumed 27.5% more CPU cycles and recorded 27.46 million events while losing another 48.79 million, approximately 64% of the combined total. These are Tetragon results, not Shirudo benchmarks, and event loss in an observability pipeline does not establish loss of enforcement. They do illustrate why a microbenchmark of one BPF program is insufficient to characterize a heavily instrumented system.
What can actually be patched?
Traditional live patching can replace a vulnerable kernel function. An eBPF upatch generally cannot. It can inspect arguments, reject certain operations, collect state and, at eligible attachment points, prevent a function from executing. The distinction becomes important when the defect is in the internal state of a subsystem rather than in an argument passed to it.
| Attachment mechanism | Principal limitation |
|---|---|
| kprobe / fentry | Primarily observational; not arbitrary function replacement. |
| fexit | The defect may already have occurred. |
| fmod_ret | Return modification is restricted to eligible functions. |
| BPF LSM | Enforcement is limited to available security hooks and their context. |
| XDP | Limited application-level semantic information. |
| uprobe | Instrumentation, not general userspace code repair. |
A malformed argument to an interceptable function may be amenable to a narrow shield. A reference counting error or a use-after-free generally requires correcting object lifetime management. A race condition may require changes to synchronization across several functions. An application authorization error can be entirely invisible to the kernel because authorized and unauthorized requests produce the same syscalls. Cryptographic implementation defects and internal arithmetic errors present similar problems. One can sometimes block a path to the defect, but this is not necessarily equivalent to correcting it.
Which vulnerability classes can eBPF address?
| Vulnerability class | Suitability | Limitation |
|---|---|---|
| Optional vulnerable subsystem | High | Disable access if the functionality is dispensable. |
| Unauthorized filesystem access or process execution | High | Deny operations at appropriate LSM hooks. |
| Invalid function argument | Conditional | Requires an interceptable path and sufficient context. |
| Internal integer overflow | Limited | May block inputs; cannot generally repair arithmetic. |
| Use-after-free / reference counting | Limited | Blocking a path does not repair object lifetime. |
| Race condition | Poor | Usually requires changes to synchronization. |
| Application heap corruption | Poor | Kernel hooks lack internal application state. |
| Application authorization flaw | Poor | Legitimate and malicious requests may look identical at kernel hooks. |
| Cryptographic implementation flaw | Poor | Generally requires correcting the implementation. |
Qualitative architectural assessment, not measured CVE coverage. Suitability depends on the available hooks and whether blocking the vulnerable operation is acceptable.
The examples in the Shirudo repository illustrate the range. Some kernel CVE detectors use source-derived, unvalidated predicates and count suspicious operations without preventing them. The IPv6 routing-header tutorial implements detection because the relevant functions cannot be intercepted using return modification. The Copy Fail mitigation disables AF_ALG sockets, which is a reasonable emergency measure on machines that do not need them. The PHP2Shell example restricts subsequent process execution, filesystem modification and network access. This is containment of some consequences of exploitation, rather than a repair of PHP.
| Published example | Actual mechanism |
|---|---|
| IPv6 routing-header tutorial | Detection only |
| Kernel CVE detectors | Observation, not prevention |
| Copy Fail | Subsystem disabling (AF_ALG) |
| PHP2Shell | Post-exploitation containment |
| Java4Shell | Java bytecode instrumentation, not eBPF |
The Java4Shell demonstration
One of the more instructive details of the launch is that its prominent Java4Shell demonstration does not use eBPF to correct the vulnerability. As Isovalent’s technical account explains, the mitigation is Java bytecode installed using JVM instrumentation, adding validation to the Base64 decoder. Java agents and runtime class instrumentation have existed for decades; using them here makes sense because they have access to the application semantics that the kernel does not.
The vulnerable optimization is specific to x86-64 processors
supporting AVX-512 VBMI. Elastic’s documented alternative is to disable
the Base64 intrinsics with -XX:-UseBASE64Intrinsics, which
requires a restart. Elasticsearch supports rolling restarts, so the
relevant comparison is not necessarily between runtime instrumentation
and an outage of the entire service. It is between the cost and risk of
the instrumentation and the cost and risk of a rolling deployment. No
comparative performance data was identified in the earlier review.
Ordinary Shirudo Java-agent deployment also relies on JVM startup
configuration; live attachment is a separate operation, and Java agents
do not have the same kernel-enforced tamper resistance as BPF
upatches.
Verification, concurrency and the trusted computing base
The BPF verifier checks a program against the kernel’s execution and memory-access rules. It does not establish that the program implements the correct security policy, that its predicate covers every manifestation of a vulnerability, or that the program will not deny legitimate operations. Signing an upatch establishes authorization by a signing key. TPM attestation provides evidence about measured system state. None establishes that the mitigation is effective. Shirudo includes formal verification work using CBMC and Lean 4, but this should not be confused with a general proof of the correctness of AI-generated shields.
The implementation notes and concurrency documentation describe a number of less obvious problems. Some tracing and return-modification invocations can be suppressed under recursion and concurrency conditions; for a return-modification shield this can mean that the original operation proceeds. LSM hooks are preferable where applicable, although they may not expose the information needed for a precise predicate. Map allocation failures, concurrent map access, compiler inlining, softirq process attribution and differences in memory ordering between ARM64 and x86-64 further complicate the implementation. CO-RE and BTF address structural compatibility, not behavioral equivalence between kernels.
There is also the history of vulnerabilities in the BPF infrastructure itself, including CVE-2021-3490, CVE-2021-31440, CVE-2022-23222 and CVE-2023-2163. Restricting BPF loading to signed artifacts can reduce exposure on systems where privileged BPF loading would otherwise be unrestricted. But a signed, automatically generated program can still exercise defects in the verifier, JIT or helper implementations. The loader, kernel modifications, package processing and signing infrastructure also become part of the trusted computing base.
Known weaknesses in the implementation
The project’s threat model is worth reading. It distinguishes documented limitations from issues identified through code inspection that have not necessarily been reproduced. Among the more consequential items are:
| Reference | Issue |
|---|---|
| R6 / U11 | Boot can continue without complete enforcement after initialization failure. |
| R16 | No enforced version floor, expiration or per-target authorization for signed artifacts. |
| R17 | Runtime telemetry lacks reliable authenticated provenance. |
| R21 | A measured and loaded shield can cease to provide effective coverage. |
| R24 | Java-agent deployment is not a kernel-enforced security boundary. |
| U1 | Attestation depends on operator-supplied trust and expected-state parameters. |
| U6 | Event log has an 8 MiB reader limit and no rotation. |
| U10 | Some kernel-hardening prerequisites are not verified at initialization. |
R21 is particularly relevant to the design. An attestation system may report that the expected shield was loaded, while changes in the runtime environment or limitations of its attachment mechanism mean it no longer intercepts the operations it was intended to prevent. Measuring the presence of the control is easier than measuring its effectiveness.
Deployment and coexistence with existing infrastructure
Shirudo requires a kernel with its signed BPF loader ABI and additional patches, along with TPM 2.0, BPF LSM, BTF, JIT support, dm-verity and a suitable boot configuration. There is no legacy-kernel compatibility mode. This is a somewhat awkward requirement for the class of installations that cannot readily update their kernels in the first place.
The interoperability documentation describes another cost: independent BPF loading is restricted, so Cilium, Tetragon, Falco’s eBPF driver, bpftrace and BCC cannot load programs in their usual manner. Non-BPF perf functionality remains available. Repackaging the required functionality as signed upatches is possible in principle, but it creates additional integration and release work, particularly for Kubernetes installations using Cilium as their network datapath. It also restricts the tools an operator would ordinarily use to diagnose an unexpected performance regression.
Fleet scaling
The scalability documentation describes a default map export interval of approximately five seconds, with separate requests for each map. Including a once-per-minute request per host, the approximate request rate is N(12M+1)/60, where N is the host count and M the exported map count per host.
For a fleet of 10,000 hosts, the projected request rates are:
| Maps per host | Requests per second |
|---|---|
| 1 | 2,167 |
| 5 | 10,167 |
| 18 | 36,167 |
| 50 | 100,167 |
| 100 | 200,167 |
Serialization, map memory, transport, registry synchronization, attestation and log storage add further costs. There are also finite attachment limits: the documented x86-64 configuration accommodates approximately 35 LSM or return-modification programs at a function trampoline, subject to implementation and composition. Consolidating shields into shared programs may help, but requires policy composition and regression testing. The number of shields a machine can usefully run is not unlimited.
Generating a shield is not the difficult part
The development workflow still requires someone to determine whether the proposed mitigation covers the vulnerability, whether it interferes with normal operation, and whether its cost is acceptable. An AI system that misunderstands the vulnerability may produce both an incomplete mitigation and tests that confirm its incomplete model. Stopping the original reproducer is useful evidence, but does not establish coverage of the underlying defect. Independent validation is particularly important here.
Each additional shield also needs to coexist with the previous ones, across kernel versions, configurations, CPU architectures, application releases and workload profiles. Much of the testing that makes conventional patch deployment expensive has not disappeared. It has moved to a second codebase that implements a temporary workaround.
The appropriate comparisons are Linux livepatch, kpatch and Ksplice for actual kernel function corrections; SELinux, AppArmor and seccomp for established access restrictions; Cilium and Tetragon for runtime enforcement; and rolling deployments or immutable infrastructure for applying vendor fixes. JVM instrumentation and disabling vulnerable optional functionality are also alternatives in specific cases. Shirudo’s contribution is the integration of generation, signing, distribution and measured enforcement, rather than the invention of these individual defensive techniques.
Bottom line: It might be useful in some cases, but it’s being oversold.
There is a useful place for temporary runtime mitigations, particularly when a vulnerable subsystem can be disabled or a precise check can be added at an existing enforcement point. The economic question is how often this is preferable to having the AI generate the source-level correction and deploying it through conventional live-patching or rolling-update infrastructure. If the time required to validate the temporary shield approaches the time required to validate the actual fix, the advantage is largely confined to the difference in deployment cost. That is the comparison Shirudo needs to demonstrate.

