Bug 1914714 (CVE-2020-35514) - CVE-2020-35514 openshift/machine-config-operator: /etc/kubernetes/kubeconfig is given incorrect privileges
Summary: CVE-2020-35514 openshift/machine-config-operator: /etc/kubernetes/kubeconfig ...
Alias: CVE-2020-35514
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
Depends On: 1895030
Blocks: 1895465
TreeView+ depends on / blocked
Reported: 2021-01-11 01:24 UTC by Mark Cooper
Modified: 2021-10-28 01:45 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
An insecure modification flaw in the /etc/kubernetes/kubeconfig file was found in OpenShift. This flaw allows an attacker with access to a running container which mounts /etc/kubernetes or has local access to the node, to copy this kubeconfig file and attempt to add their own node to the OpenShift cluster. The highest threat from this vulnerability is to confidentiality, integrity, as well as system availability.
Clone Of:
Last Closed: 2021-10-28 01:45:08 UTC

Attachments (Terms of Use)

Description Mark Cooper 2021-01-11 01:24:23 UTC
It has been found that the permissions of the /etc/kubernetes/kubeconfig on an OpenShift node are too permissive. An attacker with access to a running container which mounts /etc/kubernetes or has local access to the node, may copy this kubeconfig file and potentially attempt to add their own rogue node to the OpenShift cluster.

Comment 1 Mark Cooper 2021-01-11 01:24:28 UTC

Name: Juan Osorio Robles (Red Hat)

Comment 5 Mark Cooper 2021-01-12 01:27:04 UTC
Upstream fix/work in progress: https://github.com/openshift/machine-config-operator/pull/2202

Comment 6 RaTasha Tillery-Smith 2021-02-16 19:49:46 UTC

The kubeconfig file on the node is that of the bootstrap certificate. This means that to successfully exploit this vulnerability, the kubeconfig file must be taken and used within the first 24 hours of creation as it is created with a short expiration time. Otherwise, attempting to use the credentials after this time will result in the following:
`Failed while requesting a signed certificate from the master: cannot create certificate signing request: Unauthorized`

Further, if taken, the certificate signing request (CSR) of the joining rogue OpenShift node is not automatically approved by default. The node still needs to be approved through the use of the commands `oc get csr` and `oc adm certificate approve`.

Comment 7 Mark Cooper 2021-10-28 01:45:08 UTC
closing old flaw bug

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