liveBook · Manning

System call

As explained in Kubernetes in Action, Second Edition

A system call is an interface through which a user-space process requests services or operations from the operating system kernel.

A system call is an interface through which a user-space process requests services from the operating system kernel. Calls can create processes, manipulate files and devices, or establish communication channels. section 2.3.4

Applications in containers and virtual machines use system calls differently. A virtual-machine application calls its guest kernel, while containers call the single kernel running in the host operating system. section 2.1.1

System calls matter to container security because:

  • Some calls are generally safe, while others require elevated privileges. section 2.3.4
  • An unrestricted process could change the system clock, modify kernel memory, add or remove kernel modules, or otherwise affect neighboring containers. section 2.3.4
  • Running containers without elevated privileges reduces the risk when applications do not need privileged operations. section 2.3.4

A shared-kernel risk

Imagine several containers on one Kubernetes node. Namespaces and cgroups give each container separate environments and resource limits, but a rogue program could still use a dangerous system call against the shared kernel, such as changing the system clock. section 2.3.4

Figure 2.3 The difference between running applications on bare metal, in VMs, and in containers
figure

Compare applications running on bare metal, in virtual machines, and in containers to see how kernel sharing changes the isolation boundary. section 2.1.1

How Kubernetes in Action, Second Edition covers it

How deep it goes
Defines system calls and illustrates their security consequences, but defers detailed syscall-filtering technologies.
Examples
Uses process creation, file and device access, communication channels, system-clock changes, and kernel-module modification as examples.
What it assumes
Builds from the distinction between applications, operating-system kernels, containers, and virtual machines.
What you can do after
Evaluate how container and VM architectures route system calls and assess the security implications of elevated privileges.
How it connects
Connects system calls with operating-system kernels, containers, virtual machines, Linux namespaces, cgroups, and hypervisors.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kubernetes in Action, Second Edition. The section links point to the parts of the book it draws on.