kubelet-started container uid changes to root after first restart or if image is already pulled to the node
Kubernetes
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| k8s.io/kubernetes/cmd/kubelet Go |
|
|
| k8s.io/kubernetes Go |
|
Kubernetes
| Product | Affected | Fixed in |
|---|---|---|
| k8s.io/kubernetes/cmd/kubelet Go |
|
|
| k8s.io/kubernetes Go |
|
|
In kubelet v1.13.6 and v1.14.2, containers for pods that do not specify an explicit runAsUser attempt to run as uid 0 (root) on container restart, or if the image was previously pulled to the node. If the pod specified mustRunAsNonRoot: true, the kubelet will refuse to start the container as root. If the pod did not specify mustRunAsNonRoot: true, the kubelet will run the container as uid 0.
From the CVE record · kubernetes
Affected kubelet versions can start a container as root when its pod does not specify runAsUser and the container restarts or its image was previously pulled to the node. If the pod does not specify mustRunAsNonRoot: true, the container runs as root; if it does, kubelet refuses to start it as root. The input does not specify attacker access requirements or user interaction.
Check deployments using the Go packages k8s.io/kubernetes or k8s.io/kubernetes/cmd/kubelet in versions 1.13.0 through 1.13.6 or 1.14.0 through 1.14.2.