Explore

Containers and the limits of isolation

by Froga

Compares containers with virtual machines (namespaces, control groups, layered images), then tests the claim that guests are isolated: hypervisor escapes, leaking hardware, hygiene failures, container escapes and microVMs. You will be able to judge how strong each boundary is. About 15 minutes.

You're previewing this room. Log in or create a free account to answer the questions and track your progress.
Study material

What this room is about. This room first explains containers, a lighter way to share one server than a full virtual machine, and then puts the isolation that virtualization promises to the test. It covers namespaces, control groups and layered images, then real attacks: hypervisor escapes, hardware that leaks, careless habits, container escapes, and the microVM compromise. It is the point in the course story where sharing hardware meets security.

Why it matters. A cloud provider puts many customers on the same hardware, so everything depends on the walls between them. Containers start in milliseconds and cost little, but they share the host's kernel, so a container that breaks out is on the host itself. Knowing exactly what each boundary is made of lets you judge how much to trust it, instead of trusting the word isolated.

Words you will meet.

  • Container: an ordinary process on the host's kernel that has been restricted so it sees only its own files, processes and network.
  • Namespace: a kernel feature that gives a process a private view of one kind of resource, such as process IDs, network or mounted files.
  • Control group (cgroup): a kernel feature that limits how much CPU, memory and other resources a process may use.
  • Image: a stack of read-only layers that containers start from, with a thin writable layer added on top for each running container.
  • Attack surface and escape: the attack surface is everything a guest can reach to attack the host, and an escape is an attack that breaks out of the guest.
  • Side channel: a leak of information through shared hardware, such as caches and timing, without breaking the hypervisor, as with Spectre and Meltdown.
  • microVM: a virtual machine stripped to the essentials, used to give each container its own small VM.

By the end you should be able to:

  • Compare containers and virtual machines on kernel, start-up time, size and which guest operating systems they allow.
  • Explain how namespaces, control groups and layered images together make a container, and predict what happens without one of them.
  • Explain why a type 1 hypervisor is argued to be more secure than a general-purpose operating system, and why that is not a guarantee.
  • Tell hypervisor escapes, leaking hardware and hygiene failures apart in a described case.
  • Judge which container settings make an escape easy, which hardening measures help, and why the industry uses microVMs.

How to use it. Each question has its own study text above it, so read that first and then answer; the answers and explanations show at the end of the room.

What does a control group (cgroup) do for a container?

multiple choice

AIt limits how much CPU and memory the container's processes may consume
BIt gives the container a private view of the process list and the network
CIt stacks the read-only layers that the container starts from, plus a writable one
DIt encrypts traffic between containers so that other containers cannot read it
Log in to answer

Ready to test yourself?

Sign up free to answer, score points, and build your streak.