Why Shared Infrastructure Agent Deployments Fail Without Guest Kernel Ownership

Guest kernels isolate agent code execution where shared containers cannot.

· 8 min read
Cover illustration for “Why Shared Infrastructure Agent Deployments Fail Without Guest Kernel Ownership”
Agent Isolation · November 5, 2026 · 8 min read · 1,876 words

Firecracker micro-VM isolation for AI agents gives each workload its own guest kernel behind a boundary enforced by hardware, while containers share the host kernel. For agents that generate and execute arbitrary code, guest kernel ownership is the necessary isolation primitive. Production deployments also need application-layer policy, persistent state, and snapshot-restore scheduling to contain misuse without paying for idle compute.

Why containers feel like the right answer for agent sandboxing

For a developer already using Docker or Kubernetes, containers are the natural place to put a code-executing agent. They are fast, cheap, and familiar to deployment pipelines. The isolation controls also look substantial. Linux namespaces partition what a process sees, cgroups cap what it consumes, and seccomp filters which syscalls it can make. Together, they support the familiar model of a process in a box.

That model works for much of the application development teams already do. A web application runs code the team wrote and reviewed, with a known threat model and a tractable patch cycle. Mature tooling and straightforward CI/CD integration strengthen the case for reusing the same infrastructure. The difficulty begins when the team no longer controls the code inside the box.

What actually changes when the workload is an AI agent generating code at runtime

A code-generating agent executes instructions derived from untrusted input, including user prompts, pulled documents, and CI events. The platform has not reviewed that code before execution. Untrusted execution is the feature. An attacker who steers the agent, or an errant prompt that produces unsafe behavior, reaches a capability that conventional application security tries to withhold.

OWASP's LLM application guidance directs teams to treat the model as any other user and validate model responses passed to backend functions. MITRE ATT&CK classifies container escape as T1611, “Escape to Host”. The usual chain moves from foothold to enumeration, escalation, and breakout. For a code-executing agent, the foothold is already supplied. Getting code to run inside the container is precisely what the product does.

Generated code can try kernel exploits, make external API calls that leak credentials, corrupt shared filesystem volumes, or spawn processes without limits. These behaviors need not reflect an intentional decision by the customer. The boundary must withstand the resulting execution, rather than depend on confidence in how the code was produced. Hardening remains useful, but it cannot substitute for choosing an isolation primitive suited to that threat model.

Why the shared kernel is not a configuration problem but a structural one

Container controls work only as long as the kernel can be trusted. Namespaces, cgroups, seccomp, and Landlock all rely on that enforcement substrate, while an egress proxy running beside the workload depends on its integrity. Red Hat's analysis of OpenShell identifies this dependency directly. The network egress proxy and supervisor share the workload's kernel and page cache, so a kernel attack can both evade rules and corrupt enforcement.

CVE-2026-31431 makes the distinction concrete. The vulnerability allows an unprivileged process to corrupt the page cache of a readable file, including a setuid binary, and gain root. CISA's Known Exploited Vulnerabilities catalog lists it because of active exploitation. Under runc with overlayfs, containers share the host kernel's page cache. Corruption of a shared image layer from one container therefore becomes visible to other containers using that layer.

The runtime itself adds another escape surface. The runc vulnerabilities disclosed in November 2025, CVE-2025-31133, CVE-2025-52565, and CVE-2025-52881, were fixed in runc 1.2.8, 1.3.3, and 1.4.0-rc.3. CNCF warned that they “could be abused in real-world setups where a user can run a container from a malicious or compromised image”. Its warning also identified multi-tenant environments where users define their own containers.

Patching closes identified vulnerabilities while leaving the shared-kernel dependency in place. Privileged mode, a mounted Docker socket, writable host mounts, and excess capabilities introduce paths that require no exploit at all. Correct configuration closes those paths, but untrusted code can still send permitted syscalls to the same kernel that protects neighboring workloads. That is the structural failure of containers as the sole boundary for arbitrary agent code.

How the shared kernel failure compounds in multi-tenant agent deployments

In conventional multi-tenant SaaS, database rows, API keys, and role-based access controls keep customers separate because the vendor controls which application code runs. Agent products change that relationship. A customer's prompt helps decide which code runs, so the execution environment must also keep tenants separate. Application authorization cannot contain every action of a process that the application deliberately starts.

One agent enters an infinite loop and consumes the pool's available CPU. Other customers then experience degraded performance despite making no change to their own workloads. Resource limits can constrain consumption, but they do not create separate kernels.

A filesystem or memory access flaw can expose another tenant's data when isolation stops at the process boundary. CVE-2026-31431 shows how the shared-page-cache behavior can spread corruption across containers that use the affected layer. Kubernetes documentation describes containers as offering “a weaker isolation boundary” than hardware-based virtual machines. For an agent product, that difference defines how far one customer's failure can spread.

How do you give each AI agent its own isolated kernel?

Guest kernel ownership means assigning each workload a dedicated kernel instance behind hardware virtualization. VT-x or AMD-V extensions, enforced by the hypervisor, separate the workload from the host and neighboring guests. Compromising the guest kernel does not itself cross that boundary. An attacker must also compromise the virtualization layer, rather than turn a shared kernel against its other tenants.

Red Hat's Kata test demonstrates the difference at the page-cache level. The splice-based primitive used by CVE-2026-31431 ran inside the Kata VM under OpenShift sandboxed containers but failed outright. Virtiofs did not expose the host's page cache to the guest, leaving the primitive without a valid target. Both guest and host page caches remained unchanged. The result came from a different boundary.

Firecracker, the open-source micro-VM technology originating at AWS, makes this boundary practical for short-lived execution. It boots in well under a second with small memory overhead per VM. Its Rust VMM uses a deliberately small device model, reducing the attack surface presented to a hostile guest compared with a full hypervisor. The agent gains freedom within that smaller enclosure. It can install packages, modify system state, and break and rebuild its environment without making the host kernel the enforcement authority it is allowed to corrupt.

How layered sandboxing handles the threats a guest kernel alone does not close

A dedicated guest kernel does not decide whether an HTTP request is legitimate. Data exfiltration, unauthorized API calls, and credential leakage remain application-layer threats. From the hypervisor's perspective, a request to an attacker-controlled server is an ordinary network operation. Hardware isolation keeps kernel compromise inside the guest, but it does not set the policy for what information may leave it.

NVIDIA OpenShell addresses that complementary surface with a network egress proxy. The proxy evaluates destination, port, calling binary, and optionally HTTP method and path, with a default deny-all posture. Red Hat's testing used a prompt injection that triggered curl -d "$(cat /proc/self/environ)". OpenShell's inspection of the action intercepted the request and kept the secrets inside the sandbox.

The July 2026 architecture places the agent inside an OpenShell sandbox enforcing egress filtering, filesystem isolation through Linux Landlock, and process restrictions. That sandbox runs inside a Kata micro-VM providing the guest kernel. The layers address different failure modes. OpenShell handles HTTP exfiltration, while Kata handles the kernel attack that could undermine OpenShell on a shared host. For multi-tenant products, this also supports a hybrid deployment, with micro-VMs for customer-facing agents executing arbitrary code and containers for internal background jobs running platform-written code.

Diagram: Two Layers, Two Failure Modes. Visualizes: Show how a Kata micro-VM (guest kernel boundary) and an OpenShell egress proxy (application-layer policy) address two distinct and non-overlapping failure modes.

Snapshot-restore scheduling and why persistent state is inseparable from the isolation question

Agents that work on long-running tasks need their state to last between sessions. A coding agent that must clone its repository and reinstall dependencies on every invocation loses the working environment its earlier actions established. Recycling execution environments therefore compromises correctness and adds a startup penalty. Serverless execution built around each invocation, including Lambda and Cloud Run, does not on its own keep an environment in place for multi-turn work.

Keeping every environment running would keep its state but cost too much. Agents spend much of their time idle. Snapshot-restore scheduling lets the operator keep their state while paying only for storage during idle periods. The same micro-VM boundary that separates kernels becomes the unit of suspension and resumption. Per-agent isolation can then track when the workload runs without requiring a premium reserved-compute tier.

SpecBox, a July 2026 paper from Beihang University, University of Leeds, and The University of Sydney, addresses the remaining preparation delay. Its predictive serving system uses keyword matching and streaming semantic embedding to identify pending tool execution during token generation. It then prewarms sandboxes before the tool call arrives, overlapping environment preparation with model execution. The work demonstrates a scheduling approach rather than eliminating the need to evaluate resume latency. Its benchmarks use traces from Model Context Protocol-driven tool calls to check whether sandboxes are ready at the protocol boundary where agents ask to run code.

What production adoption looks like in AWS and Red Hat architectures

AWS has selected micro-VM execution through two product lines, AgentCore and Lambda MicroVMs. Red Hat has documented a corresponding architecture through OpenShift sandboxed containers. The providers converge on Firecracker or Kata as the execution primitive rather than treating process isolation as sufficient for arbitrary agent code. The implementations differ, but the kernel boundary is shared.

The OpenShift reference architecture gives each pod its own kernel inside a lightweight VM, enforced by hardware virtualization. It pairs that boundary with OpenShell's application-layer policy. The July 2026 material provides architectural guidance, with a production rollout still unverified, and the Red Hat build of Agent Sandbox was announced as a Technology Preview. Even so, the documented choices show that independent providers have chosen guest kernels and policy layers for the same kind of workload.

What developers building agent-native products should actually provision

The practical consequence is to evaluate infrastructure on four properties, namely guest kernel ownership, sub-second wake latency, persistent disk across sessions, and idle-cost billing. Developers first need to establish whether each agent receives a hardware-isolated guest kernel or shares one across tenants. That answer sets where a future kernel vulnerability starts: inside one tenant's boundary or inside the mechanism that protects every tenant.

Resume latency needs to be tested separately from initial boot time. A sleeping agent should wake and serve a tool call in under one second. The brief's 100 ms instantaneous-response threshold is stricter than that wake target, so sub-second resumption does not imply an imperceptible delay. The first call of a session exposes that delay directly to the user, while chained tool calls can compound it. Evaluation therefore needs to distinguish acceptable wake performance from merely fast VM creation.

Filesystem contents, package state, and working context should carry over from one session to the next without having to be rebuilt from scratch. Idle periods should incur storage charges alone. Developers who do not want to manage TAP interfaces, IP tables, routing, and snapshot scheduling should seek managed platforms that expose these properties through a simple deployment workflow. The procurement target is an isolated, resumable agent environment for running generated code.

Sources

  1. Layered sandboxing for AI agents: OpenShift and OpenShell
  2. SpecBox: Speculative Sandbox Scheduling for Efficient LLM Agent Serving
Filed underAgent Isolation

More in Agent Isolation