agent-readings / Isolation and Sandboxing
VM isolation at serverless density
The one sentence
For agent infrastructure, Firecracker is the practical default answer when untrusted agent-generated code needs a real tenant boundary without giving up cloud-scale density.
Before this paper
Serverless providers need to run many tenants on the same hardware while preserving security, performance isolation, and fast startup.
Linux containers are dense and fast but share the host kernel, creating a security-versus-compatibility tradeoff through seccomp and syscall restrictions.
Traditional VMs provide stronger boundaries but carry large VMM, device-model, memory, and boot-time overheads.
The paper asks whether a VM boundary can be made cheap enough for serverless function/container density while preserving broad Linux compatibility.
Core idea
Keep the hardware virtualization boundary but aggressively specialize the VMM for serverless: minimal devices, one process per microVM, Rust implementation, REST configuration API, Linux/KVM host primitives, and no BIOS, PCI, migration, GPU, USB, or...
Use KVM for hardware virtualization instead of relying only on host-kernel container isolation.
Replace QEMU with a purpose-built Rust VMM around 50k lines of code.
Expose only the devices required by serverless/container workloads.
Boot minimal Linux kernels directly, avoiding BIOS and legacy hardware emulation.
Action grammar
host: Linux machine running KVM.
Firecracker process: one userspace VMM process per microVM.
guest: minimal Linux kernel/userland or OSv.
configuration API: REST over Unix socket before VM start.
Executable shape
Evidence
The paper contrasts containers, where untrusted code calls the host kernel directly, with KVM virtualization, where untrusted code runs with a guest kernel and the VMM/KVM...
Firecracker intentionally does not provide BIOS, arbitrary-kernel boot, legacy devices, PCI, USB, GPU, video/audio, or migration, and exposes only a limited device set such as...
The paper states QEMU is over 1.4 million lines of code, while Firecracker contains approximately 50k lines of Rust, about 96% fewer lines.
The introduction reports less than 5MB memory overhead per container, boot to application code in less than 125ms, and up to 150 microVM creations per second per host.
Claim map
Firecracker shifts the isolation boundary from shared host-kernel container isolation to KVM-backed virtualization with a much smaller VMM than QEMU.
The low overhead comes from specialization: Firecracker omits BIOS, arbitrary kernels, PCI, USB, video, audio, migration, and many legacy devices.
Firecracker is roughly 50k lines of Rust, around 96% fewer lines than QEMU in the paper's comparison.
With a minimal Linux guest, Firecracker offers less than 5MB memory overhead, boots to application code in under 125ms in the paper's introduction claim, and...
Agent infrastructure
When an agent can run arbitrary code, a VM boundary is the honest security default for multi-tenant or untrusted workloads.
Firecracker's lesson is deletion as security engineering: remove devices, firmware, compatibility paths, and management features not required by the...
Agent sandboxes should separate orchestration from execution. Firecracker gives a microVM, not a policy engine, scheduler, package manager, or...
Cold-start and memory overhead are product constraints. Fine-grained agent tool execution needs sandbox creation and recycling to be fast enough for...
Caveats
The paper is AWS-authored and reports AWS production experience.
Firecracker is not a general VM replacement; it intentionally omits many VM features.
Firecracker secures the compute boundary but does not solve tool authorization, data exfiltration, prompt injection, or network policy alone.
Boot and memory results depend on minimal kernel/userland configuration and may not hold for arbitrary guest images.
Run it
No PoC yet - contributions welcome. A PoC could compare local tool execution in a host process versus a microVM/container boundary and record startup, memory, and egress-control behavior.