A flaw was found in the way runc handled system file descriptors when running containers.
A malicious container could use this flaw to overwrite contents of the runc binary and
consequently run arbitrary commands on the container host system.
Note: This document is written for users installing CRI onto Linux. For other operating
systems, look for documentation specific to your platform.
You should execute all the commands in this guide as root. For example, prefix commands
with sudo, or become root and run the commands as that user.
Cgroup drivers
When systemd is chosen as the init system for a Linux distribution, the init process generates
and consumes a root control group (cgroup) and acts as a cgroup manager. Systemd has a tight
integration with cgroups and will allocate cgroups per process. It’s possible to configure your
container runtime and the kubelet to use cgroupfs. Using cgroupfs alongside systemd means
that there will then be two different cgroup managers.
Control groups are used to constrain resources that are allocated to processes.
A single cgroup manager will simplify the view of what resources are being allocated
and will by default have a more consistent view of the available and in-use resources. When we have
two managers we end up with two views of those resources. We have seen cases in the field
where nodes that are configured to use cgroupfs for the kubelet and Docker, and systemd
for the rest of the processes running on the node becomes unstable under resource pressure.
Changing the settings such that your container runtime and kubelet use systemd as the cgroup driver
stabilized the system. Please note the native.cgroupdriver=systemd option in the Docker setup below.
Caution: Changing the cgroup driver of a Node that has joined a cluster is highly unrecommended.
If the kubelet has created Pods using the semantics of one cgroup driver, changing the container
runtime to another cgroup driver can cause errors when trying to re-create the PodSandbox
for such existing Pods. Restarting the kubelet may not solve such errors. The recommendation
is to drain the Node from its workloads, remove it from the cluster and re-join it.
Docker
On each of your machines, install Docker.
Version 19.03.8 is recommended, but 1.13.1, 17.03, 17.06, 17.09, 18.06 and 18.09 are known to work as well.
Keep track of the latest verified Docker version in the Kubernetes release notes.
Use the following commands to install Docker on your system:
To use the systemd cgroup driver, set plugins.cri.systemd_cgroup = true in /etc/containerd/config.toml.
When using kubeadm, manually configure the
cgroup driver for kubelet