Bug 1715726 (CVE-2019-11245) - CVE-2019-11245 kubernetes: container uid changes to root after first restart
Summary: CVE-2019-11245 kubernetes: container uid changes to root after first restart
Keywords:
Status: CLOSED NOTABUG
Alias: CVE-2019-11245
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1715727
TreeView+ depends on / blocked
 
Reported: 2019-05-31 05:57 UTC by Dhananjay Arunesh
Modified: 2021-02-16 21:52 UTC (History)
25 users (show)

Fixed In Version: kubernetes 1.13.7, kubernetes 1.14.3
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-10 10:56:25 UTC
Embargoed:


Attachments (Terms of Use)

Description Dhananjay Arunesh 2019-05-31 05:57:38 UTC
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.

Reference:
https://github.com/kubernetes/kubernetes/issues/78308
https://github.com/rancher/k3s/issues/511
https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod

Comment 4 Hardik Vyas 2019-05-31 06:56:03 UTC
Gluster embeds very old kubernetes version v1.5.5 with heketi, which is not affected by this vulnerability.

v1.5.5
======
140         uid, username, err := m.getImageUser(container.Image)
141         if err != nil {
142                 return nil, err
143         }

Comment 5 Hardik Vyas 2019-05-31 06:56:09 UTC
Statement:

This vulnerability only affects upstream Kubernetes versions 1.13.6 and 1.14.2. All released versions of Red Hat OpenShift Container Platform and Red Hat Gluster Storage 3 are not affected by this flaw as they do not contain the vulnerable code.

Comment 7 Hardik Vyas 2019-05-31 07:07:58 UTC
Mitigation:

There are two potential mitigations to this issue:

1. Downgrade to kubelet v1.13.5 or v1.14.1 as instructed by your Kubernetes distribution.
2. Set RunAsUser on all pods in the cluster that should not run as root. This is a Security Context feature; the docs are at https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod


Note You need to log in before you can comment on or make changes to this bug.