Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AMBARI-23065] Upgrading org.apache.httpcomponents:httpclient dependecy to v4.5.5 and removing commons-httpclient:commons-httpclient dependency due to security reasons #454

Merged
merged 1 commit into from
Feb 28, 2018

Conversation

smolnar82
Copy link
Contributor

@smolnar82 smolnar82 commented Feb 23, 2018

What changes were proposed in this pull request?

Per CVE-2014-3577

org.apache.http.conn.ssl.AbstractVerifier in Apache HttpComponents HttpClient before 4.3.5 and HttpAsyncClient before 4.0.2 does not properly verify that the server hostname matches a domain name in the subject's Common Name (CN) or subjectAltName field of the X.509 certificate, which allows man-in-the-middle attackers to spoof SSL servers via a "CN=" string in a field in the distinguished name (DN) of a certificate, as demonstrated by the "foo,CN=www.apache.org" string in the O field.

Per CVE-2015-5262

http/conn/ssl/SSLConnectionSocketFactory.java in Apache HttpComponents HttpClient before 4.3.6 ignores the http.socket.timeout configuration setting during an SSL handshake, which allows remote attackers to cause a denial of service (HTTPS call hang) via unspecified vectors.

So that we need to upgrade to a more recent version (>4.3.6); at the time of this issue is being fixed the latest one is 4.5.5

How was this patch tested?

After updating the affected pom.xml files I've done the following:

1.) Checking Maven's dependency resolution:

ambari-server smolnar$ mvn dependency:tree -Dincludes=*:*httpclient*

[INFO] Scanning for projects...
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building Ambari Server 2.6.1.0.0
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ ambari-server ---
[INFO] org.apache.ambari:ambari-server:jar:2.6.1.0.0
[INFO] \- org.apache.httpcomponents:httpclient:jar:4.5.5:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.269 s
[INFO] Finished at: 2018-02-23T15:36:27+01:00
[INFO] Final Memory: 25M/446M
[INFO] ------------------------------------------------------------------------

2.) I executed mvn clean install in utility and in ambari-server:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 36:20 min
[INFO] Finished at: 2018-02-23T16:03:24+01:00
[INFO] Final Memory: 77M/1343M
[INFO] ------------------------------------------------------------------------

3.) In addition to this; I replaced the content of usr/lib/ambari-server in my vagrant host with the content from ambari-server/target/ambari-server-2.6.0.0.0-dist/usr/lib/ambari-server (where the relevant JAR(s) were replaced with version 4.5.5) and restarted the server; logged in and did some actions (in this case I used the REST API to get information about my cluster I created before); there were no any issues.

@smolnar82
Copy link
Contributor Author

@rlevas @zeroflag @adoroszlai @oleewere Please review this PR; thanks!

@asfgit
Copy link

asfgit commented Feb 23, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/787/
Test FAILed.
Test FAILured.

@smolnar82 smolnar82 changed the title AMBARI-23065. Upgrading org.apache.httpcomponents:httpclient dependecy to v4.5.5 and removing commons-httpclient:commons-httpclient dependency due to security reasons [AMBARI-23065] Upgrading org.apache.httpcomponents:httpclient dependecy to v4.5.5 and removing commons-httpclient:commons-httpclient dependency due to security reasons Feb 23, 2018
@smolnar82
Copy link
Contributor Author

retest this please

@asfgit
Copy link

asfgit commented Feb 24, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/799/
Test FAILed.
Test FAILured.

@smolnar82
Copy link
Contributor Author

retest this please

@asfgit
Copy link

asfgit commented Feb 24, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/808/
Test FAILed.
Test FAILured.

@smolnar82
Copy link
Contributor Author

retest this please

@asfgit
Copy link

asfgit commented Feb 26, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/815/
Test FAILed.
Test FAILured.

…y to v4.5.5 and removing commons-httpclient:commons-httpclient dependency due to security reasons
@asfgit
Copy link

asfgit commented Feb 28, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/863/
Test PASSed.

@adoroszlai adoroszlai merged commit 2ebb3dd into apache:branch-2.6 Feb 28, 2018
@asfgit
Copy link

asfgit commented Mar 1, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/880/
Test PASSed.

mpapirkovskyy pushed a commit to mpapirkovskyy/ambari that referenced this pull request Apr 12, 2019
…y to v4.5.5 and removing commons-httpclient:commons-httpclient dependency due to security reasons (apache#454)

(cherry picked from commit 2ebb3dd)

Change-Id: I20422c5391f5207ab31e3d47df008ae1e989596f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants