CVE-2018-1085
Description
OpenShift and Atomic Enterprise Ansible deploys a misconfigured etcd file that causes the SSL client certificate authentication to be disabled. Quotations around the values of ETCD_CLIENT_CERT_AUTH and ETCD_PEER_CLIENT_CERT_AUTH in etcd.conf result in etcd being configured to allow remote users to connect without any authentication if they can access the etcd server bound to the network on the master nodes. An attacker could use this flaw to read and modify all the data about the Openshift cluster in the etcd datastore, potentially adding another compute node, or bringing down the entire cluster.
Statement
This issue affects Openshift Container Platform (OCP) only if you use the container installation method. The container installation method is tech preview in 3.7.1. This issue affected all users who did a containerized etcd in OCP versions 3.7.1-3.6.
If etcd is installed via RPM and run via '/usr/bin/etcd' it's not affected by this flaw. You can check if etcd is being run from '/usr//bin/etcd' using a 'ps' command such as this on the master nodes. If Installed via RPM you should get output similar to:
ps -ef | grep etcd $/usr/bin/etcd --name=master-0.example.com --data-dir=/var/lib/etcd/ --listen-client-urls=https://10.0.1.1:2379
If etcd is installed via the container method running 'docker ps' on the master will show a container running the registry.access.redhat.com/rhel7/etcd image, eg:
sudo docker ps --filter name=etcd_container $704effa9b0cc registry.access.redhat.com/rhel7/etcd "/usr/bin/etcd" 56 minutes ago Up 56 minutes etcd_container
Mitigation
On master nodes where etcd has been installed using the container method:
0. Verify you can connect to etcd without providing TLS authentication credentials. On any master node, check the ETCD_LISTEN_CLIENT_URLS in /etc/etcd/etcd.conf, and use one of the client urls to connect without providing a certificate, eg:
curl -4 curl https://10.0.1.1:2379/version -k
0a. If vulnerable output will show something like this:
{"etcdserver":"3.2.15","etcdcluster":"3.2.0"}
0b. If not affected the connection will fail with:
curl: (58) NSS: client certificate not found (nickname not specified)
1. update /etc/etcd/etcd.conf on the master nodes to remove quotes from these fields:
ETCD_PEER_CLIENT_CERT_AUTH="true"
ETCD_CLIENT_CERT_AUTH="true"
eg.
ETCD_PEER_CLIENT_CERT_AUTH=true
ETCD_CLIENT_CERT_AUTH=true
2. Restart the etcd container service:
sudo systemctl restart etcd_container
3. Test if client authentication is now required using the steps from 0. above.
Common Vulnerability Scoring System (CVSS) Score Details
Info alert:Important note
CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).
CVSS v3 Score Breakdown
| Red Hat | NVD | cve.org | |
|---|---|---|---|
| Base Score | 9 | 9.8 | 9 |
| Attack Vector | Adjacent Network | Network | Adjacent Network |
| Attack Complexity | Low | Low | Low |
| Privileges Required | Low | None | Low |
| User Interaction | None | None | None |
| Scope | Changed | Unchanged | Changed |
| Confidentiality | High | High | High |
| Integrity Impact | High | High | High |
| Availability Impact | High | High | High |
Vector
Red Hat: CVSS:3.0/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
NVD: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
cve.org: CVSS:3.0/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Understanding the Weakness (CWE)
Integrity,Confidentiality,Availability,Access Control
Technical Impact: Read Application Data; Gain Privileges or Assume Identity; Execute Unauthorized Code or Commands
This weakness can lead to the exposure of resources or functionality to unintended actors, possibly providing attackers with sensitive information or even execute arbitrary code.
Acknowledgements
Red Hat would like to thank David Hocky (Comcast) for reporting this issue.
Frequently Asked Questions
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.