Giving untrusted AI agent code direct access to a GPU is currently one of the riskiest moves in infrastructure. A new deep dive from Control Plane highlights that traditional CPU sandboxing techniques fail when the NVIDIA kernel driver enters the chat. The core problem is that every GPU sandbox must expose a massive attack surface through device nodes like /dev/nvidiactl and /dev/nvidia-uvm. If you aren't using a proper isolation boundary, you are essentially running arbitrary code on your host kernel.

The Isolation Hierarchy

The article identifies only two boundaries that actually work for GPU isolation today: gVisor with nvproxy and VM passthrough using Cloud Hypervisor or QEMU with VFIO. Plain containers sharing the host kernel are insufficient for untrusted code, evidenced by critical escape CVEs in the NVIDIA Container Toolkit. For instance, CVE-2025-23266 allowed arbitrary code execution with elevated permissions, while CVE-2024-0132 enabled host filesystem access via crafted images. gVisor mitigates some risks by proxying driver calls, but its own documentation admits it is less effective against vulnerabilities in the NVIDIA driver itself.

Why Time-Slicing is a Security Hole

If you are trying to save money by time-slicing a single GPU across multiple untrusted tenants, stop. NVIDIA’s documentation explicitly states that time-slicing provides no memory or fault isolation between replicas. A crash or memory leak in one agent’s job can instantly take down the GPU for everyone else. Google even warns against GPU time-sharing in sandboxed Pods on GKE. For true multi-tenant safety, you need either a dedicated whole GPU per sandbox or NVIDIA’s Multi-Instance GPU (MIG) technology, which partitions data center GPUs into instances with isolated memory paths.

The Firecracker and Confidential Computing Gap

A common misconception among builders is that Firecracker microVMs or NVIDIA Confidential Computing solve the sandbox problem. They don’t. Firecracker still lacks VFIO device passthrough, meaning it cannot support GPUs at all. Meanwhile, Confidential Computing protects the workload from the infrastructure operator, not the host from the workload. It’s a different threat model entirely. If your goal is to prevent malicious agent code from escaping its sandbox, Confidential Computing adds zero value to your host security posture.

Key Takeaways

  • Driver Patching is Non-Negotiable: The NVIDIA driver is the primary attack surface; pin versions and track security bulletins aggressively.
  • Avoid MPS for Untrusted Code: NVIDIA MPS shares a server process, meaning a fault in one client can stall all others.
  • Block Egress by Default: GPU steps should have no outbound traffic and no cloud credentials to prevent exfiltration.
  • Reset Between Tenants: Always reset the GPU and confirm health before assigning it to a new sandbox to prevent cross-tenant contamination.

The Bottom Line

Stop trying to be clever with GPU sharing for untrusted agents. If you can't afford a dedicated GPU or MIG instance per tenant, run the agent on CPU and only spin up a VM for the specific CUDA step. Security through obscurity doesn't work when the attack surface is a kernel-mode driver.