Bug 1094134 (CVE-2018-8012) - VUL-1: CVE-2018-8012: zookeeper: No authentication/authorization is enforced when a server attempts to join aquorum
Summary: VUL-1: CVE-2018-8012: zookeeper: No authentication/authorization is enforced ...
Status: RESOLVED INVALID
Alias: CVE-2018-8012
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P4 - Low : Normal
Target Milestone: ---
Assignee: Security Team bot
QA Contact: Security Team bot
URL: https://smash.suse.de/issue/206226/
Whiteboard: CVSSv3:SUSE:CVE-2018-8012:6.5:(AV:N/A...
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-22 06:21 UTC by Johannes Segitz
Modified: 2024-07-26 09:46 UTC (History)
8 users (show)

See Also:
Found By: Security Response Team
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Segitz 2018-05-22 06:21:35 UTC
CVE-2018-8012

No authentication/authorization is enforced when a server attempts to join a
quorum in Apache ZooKeeper before 3.4.10, and 3.5.0-alpha through 3.5.3-beta. As
a result an arbitrary end point could join the cluster and begin propagating
counterfeit changes to the leader.

VUL-1 since I assume that we firewall this anyway. Should take this with the next regular update and harden our configuration

References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2018-8012
http://seclists.org/oss-sec/2018/q2/132
http://www.cvedetails.com/cve/CVE-2018-8012/
https://lists.apache.org/thread.html/c75147028c1c79bdebd4f8fa5db2b77da85de2b05ecc0d54d708b393@%3Cdev.zookeeper.apache.org%3E
Comment 3 Nicolas Bock 2018-06-07 17:38:19 UTC
We need to modify the monasca barclamp in SOC 7 to add the necessary configuration option. I'll put up a pull request for this change.
Comment 4 Nicolas Bock 2018-06-07 20:01:41 UTC
SOC 6 does not come with Monasca
Comment 5 Nicolas Bock 2018-06-07 20:02:57 UTC
(In reply to Nicolas Bock from comment #3)
> We need to modify the monasca barclamp in SOC 7 to add the necessary
> configuration option. I'll put up a pull request for this change.

I was wrong here, we are not doing much in the barclamp code and am using the monasca installer to pull in all of the packages. So we can either modify the installed zookeeper configuration file after installation or try to get the additional options into the upstream zookeeper repository.
Comment 6 Jan Zerebecki 2018-06-25 17:16:39 UTC
One of the indirect suggestions for mitigation is using DIGEST-MD5, but that might not work because of its problems. I reported this upstream as https://issues.apache.org/jira/browse/ZOOKEEPER-3069
Comment 7 Nicolas Bock 2018-06-25 20:01:16 UTC
I am currently investigating the Kerberos based setup.
Comment 8 Nicolas Bock 2018-06-26 07:40:06 UTC
In SOC 7 the zookeeper instance is tied to the `monasca-server` role which can only be deployed on one server as the monasca barclamp is not HA enabled. This makes a fix for SOC 7 potentially a little easier:

We enable DIGEST-MD5 SASL for the single zookeeper instance.

Any security concerns with regard to DIGEST-MD5 are irrelevant in this case since  we can not have a second zookeeper instance. Any second zookeeper would be unauthorized.

Could the security team comment on this strategy?
Comment 9 Bryan Stephenson 2018-06-27 17:26:28 UTC
We should modify the config file we get from upstream to not listen for other quorum members since there can be no other valid members the way we deploy zookeeper in SOC 7. As defense in depth we should also block the port used for elections with a firewall rule. In this way more than one mistake is required before an attacker could exploit the lack of authentication to cause trouble. In the future if we actually use elections then we will need to configure proper authentication, but that is not required today for adequate mitigation of this vulnerability given the way we deploy zookeeper in SOC 7.
Comment 10 Bryan Stephenson 2018-06-27 17:31:28 UTC
To clarify, I mean a firewall rule on the zookeeper node itself, not a firewall rule on some firewall protecting access to the admin network (although that rule should also exist). Whenever possible we want to avoid making the assumption that no malicious people or software are ever on the admin network, and defend against attacks which originate on the admin network to the extent it is feasible to do so.
Comment 11 Jan Zerebecki 2018-06-27 17:32:42 UTC
The documentation https://zookeeper.apache.org/doc/current/zookeeperAdmin.html mentions that quorumListenOnAllIPs is false by default and thus it listens only on interfaces needed to connect to the its peers configured with the server list. 

Maybe that can be used to make it not listen.
Comment 12 Bryan Stephenson 2018-06-27 17:39:41 UTC
We need to understand if there are separate ports used for the communication with peers and the other things zookeeper does. If so we can probably not listen on the ports used for peer communication since there should be no peers. If not then we need to come up with a different plan to address this vulnerability.
Comment 13 Andreas Stieger 2018-09-27 11:57:52 UTC
(In reply to Nicolas Bock from comment #8)
> In SOC 7 the zookeeper instance is tied to the `monasca-server` role which
> can only be deployed on one server as the monasca barclamp is not HA
> enabled. This makes a fix for SOC 7 potentially a little easier:
> 
> We enable DIGEST-MD5 SASL for the single zookeeper instance.
> 
> Any security concerns with regard to DIGEST-MD5 are irrelevant in this case
> since  we can not have a second zookeeper instance. Any second zookeeper
> would be unauthorized.

How would we ensure that this particular usage is not enabled for HA later?



I am trying to find the change that was implemented in the end?
Comment 14 Nicolas Bock 2018-09-27 16:11:02 UTC
(In reply to Andreas Stieger from comment #13)

> I am trying to find the change that was implemented in the end?

Hi Andreas, unfortunately, I was moved into another team before this came to a resolution.
Comment 15 Joseph Davis 2018-09-27 17:00:41 UTC
Has anyone checked on a SOC7 deploy if the ports are already blocked, or aren't open?

Quick test procedure (I don't have a SOC7 system or I'd test myself):
- sudo netstat -paen | less
- search for port 2181 (the standard client connection port, must be open)
- identify the process number listening on 2181
- search for any other listening ports with the same process number

According to the https://zookeeper.apache.org/doc/r3.4.10/zookeeperStarted.html doc, the other way to identify server connection ports is in zoo.cfg and they appear to be around 2888 and 3888 (not sure what Crowbar configures for these).
Comment 17 Andrea Mattiazzo 2024-07-26 09:45:47 UTC
All done, closing.