Bug 1914714 (CVE-2020-35514)

Summary: CVE-2020-35514 openshift/machine-config-operator: /etc/kubernetes/kubeconfig is given incorrect privileges
Product: [Other] Security Response Reporter: Mark Cooper <mcooper>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: amurdaca, bmontgom, eparis, jburrell, jokerman, nstielau, sponnaga
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
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.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-28 01:45:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1895030    
Bug Blocks: 1895465    

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
Acknowledgments:

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
Statement:

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