---
title: "Isolation"
url: https://www.daytona.com/compute-glossary/sandboxes/isolation
---

# Isolation

Part of the [Compute Glossary](https://www.daytona.com/compute-glossary.md), section [Sandboxes](https://www.daytona.com/compute-glossary/sandboxes.md).

Also called Isolation boundary.

Isolation is the separation that keeps a [workload](https://www.daytona.com/compute-glossary/foundations/workload.md) from reaching anything outside it, such as other workloads and the host. A layer called an isolation boundary enforces it, and code inside can reach the outside only by going through that layer. A boundary also works the other way, keeping neighbors from reading or changing what runs inside. No boundary is perfect, so the useful question is what it takes to cross one.

Every [sandbox](https://www.daytona.com/compute-glossary/sandboxes/sandbox.md) has a boundary somewhere, and its strength depends on what enforces it. A boundary held by a [hypervisor](https://www.daytona.com/compute-glossary/virtualization/hypervisor.md) and the processor is harder to cross than one held by a shared [kernel](https://www.daytona.com/compute-glossary/kernel/kernel.md). The processor checks memory access in hardware for every process, but under a shared kernel that kernel sets the rules and enforces the rest in software. A virtual machine adds a second layer of address translation that only the hypervisor controls. Stronger kinds cost more memory and start time, so platforms choose based on how far they trust the code.

The amount of code on the line matters as much as what enforces it. A bug in the boundary is a way out, so a boundary with less code offers fewer ways out. Hypervisors built for isolation drop features for this reason, since each feature brings code that someone must get right. Code that is small enough can be reviewed closely or even proven correct.

## Kinds of boundary

Kinds of boundary are told apart by what enforces them and what the code inside can reach. The weakest rely on the memory protection of a shared kernel, and the strongest put workloads on separate machines. Most platforms pick a point between those ends, trading strength against cost. Weaker kinds start faster and pack more densely onto a host.

A process or [container](https://www.daytona.com/compute-glossary/virtualization/container.md) shares the host kernel, which exposes a large set of [system calls](https://www.daytona.com/compute-glossary/kernel/system-call.md) and a very large body of code behind them. Every system call is a door into that code. Namespaces narrow what the code can see, but not which kernel code it can run. System call filters narrow that code, but every allowed call still leads into the shared kernel.

A [virtual machine](https://www.daytona.com/compute-glossary/virtualization/virtual-machine.md) has its own kernel, so an attacker who controls it still faces the hypervisor. The hypervisor and its emulated devices form a much smaller interface than a full kernel. A guest can crash or corrupt its own kernel without affecting the host. The cost is a kernel per workload, which takes memory and time to boot.

| **Boundary**        | **Enforced by**                                                   | **What the workload can reach**                        |
| ------------------- | ----------------------------------------------------------------- | ------------------------------------------------------ |
| **Process**         | The memory protection and permissions of the kernel.              | The whole kernel, through every system call it allows. |
| **Container**       | The shared kernel, with namespaces and control groups.            | The same kernel, with a narrower view.                 |
| **Virtual machine** | A hypervisor and the virtualization features of the processor.    | A guest kernel, then a small set of virtual devices.   |
| **Hardware**        | Separate machines, or encrypted memory in confidential computing. | The network, or very little.                           |

## Attack surface and escapes

An attack surface is the code that a workload inside a boundary can reach and try to exploit. It includes every system call the boundary allows and every device it emulates. The surface is not fixed, since every new kernel feature or device adds to it. Shrinking it is often the cheapest way to make a boundary stronger.

An escape is an exploit that turns a bug in that surface into control outside the boundary. Kernel bugs that allow a container escape are found regularly, while hypervisor escapes are rarer and usually involve an emulated device. Escapes are often chained, with one bug to gain control and another to break out. Many are found by fuzzing, which feeds the boundary random input until something breaks.

Processor flaws such as Spectre showed that even hardware can leak data across a boundary. Those leaks travel through timing side channels and need no bug in the software at all. Fixes came as processor microcode and software changes, some of which slowed system calls and switches between guests. Sharing a core between tenants is the riskiest case, so some providers avoid it.

## Defense in depth

Defense in depth is the practice of stacking several boundaries, so that an escape through one still leaves another in the way. It exists because any single layer can have a bug. The layers should fail in different ways, so that one bug rarely opens two of them. Each layer costs some speed and complexity, so the number of layers follows how much harm a breach would do.

A common pattern runs the virtual machine monitor as an unprivileged process inside its own [namespaces](https://www.daytona.com/compute-glossary/kernel/namespace.md), with a [seccomp](https://www.daytona.com/compute-glossary/kernel/seccomp.md) filter that allows only the system calls it needs. The guest then sits behind three boundaries instead of one. An attacker who escapes the guest lands in a process that can see little and do less. Those extra layers cost little next to the virtual machine itself.

Network rules such as [egress control](https://www.daytona.com/compute-glossary/networking/egress-control.md) add one more, limiting what code can reach even if it never escapes. For [untrusted code](https://www.daytona.com/compute-glossary/agents/untrusted-code.md), the usual rule is at least one boundary stronger than a shared kernel. Logging does not stop an escape, but it shows when a boundary is being probed. A probe caught early can be stopped before it turns into an escape.

## Related terms

- [Sandbox](https://www.daytona.com/compute-glossary/sandboxes/sandbox.md)
- [Hypervisor](https://www.daytona.com/compute-glossary/virtualization/hypervisor.md)
- [Container](https://www.daytona.com/compute-glossary/virtualization/container.md)
- [System call](https://www.daytona.com/compute-glossary/kernel/system-call.md)
- [Seccomp](https://www.daytona.com/compute-glossary/kernel/seccomp.md)
- [Untrusted code](https://www.daytona.com/compute-glossary/agents/untrusted-code.md)
