Bug 1241965 (CVE-2015-2625)

Summary: CVE-2015-2625 OpenJDK: name for reverse DNS lookup used in certificate identity check (JSSE, 8067694)
Product: [Other] Security Response Reporter: Tomas Hoger <thoger>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: dbhole, fweimer, jvanek, ninsho-dav-help, sbaiduzh, security-response-team
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
A flaw was found in the way the JSSE component in OpenJDK performed X.509 certificate identity verification when establishing a TLS/SSL connection to a host identified by an IP address. In certain cases, the certificate was accepted as valid if it was issued for a host name to which the IP address resolves rather than for the IP address.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-13 12:18:30 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:    
Bug Blocks: 1235167, 1251935    

Description Tomas Hoger 2015-07-10 14:03:03 UTC
A flaw was found in the way the JSSE component in OpenJDK performed X.509 certificate identify verification when establishing TLS/SSL connection to a host identified using IP address.  In certain cases, it would incorrectly use a host name obtained after performing reverse DNS lookup of the specified IP address rather than the original IP address for the identity check, possibly leading to having a certificate issued for different identity to be accepted as valid.

This issue is know to affect cases when SSLSocketFactory.createSocket() is called with certain InetAddress instances.  It is not known to affect cases when target host IP is passed to createSocket() as string, or when IP is used in URL used for HttpsURLConnection.

With this patch, reverse DNS lookup is no longer performed.  The fix also adds new system property jdk.tls.trustNameService that can be used to allow the DNS lookup to be performed and hence have its result used during identity check.

Comment 2 Tomas Hoger 2015-07-14 20:46:43 UTC
Public now via Oracle Critical Patch Update - July 2015.  Fixed in Oracle Java SE 6u101, 7u85, and 8u51.

External References:

http://www.oracle.com/technetwork/topics/security/cpujul2015-2367936.html#AppendixJAVA

Comment 3 Tomas Hoger 2015-07-14 20:55:00 UTC
This change is also documented in Oracle JDK release notes:

Area: security-libs/javax.net.ssl
Synopsis: Improved certification checking

With this fix, JSSE endpoint identification does not perform reverse name lookup for IP addresses by default in JDK.

If an application does need to perform reverse name lookup for raw IP addresses in SSL/TLS connections, and encounter endpoint identification compatibility issue, System property "jdk.tls.trustNameService" can be used to switch on reverse name lookup. Note that if the name service is not trustworthy, enabling reverse name lookup may be susceptible to MITM attacks.

See JDK-8067695 (not public).

http://www.oracle.com/technetwork/java/javase/8u51-relnotes-2587590.html
http://www.oracle.com/technetwork/java/javase/7u85-relnotes-2587591.html
http://www.oracle.com/technetwork/java/javase/documentation/overview-156328.html

Comment 4 errata-xmlrpc 2015-07-15 12:01:35 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 5

Via RHSA-2015:1230 https://rhn.redhat.com/errata/RHSA-2015-1230.html

Comment 5 errata-xmlrpc 2015-07-15 12:36:31 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7
  Red Hat Enterprise Linux 6

Via RHSA-2015:1229 https://rhn.redhat.com/errata/RHSA-2015-1229.html

Comment 6 errata-xmlrpc 2015-07-15 12:37:36 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6
  Red Hat Enterprise Linux 7

Via RHSA-2015:1228 https://rhn.redhat.com/errata/RHSA-2015-1228.html

Comment 7 Tomas Hoger 2015-07-16 14:57:03 UTC
OpenJDK 8 upstream commit:

http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/a25640f4e518

Comment 8 Florian Weimer 2015-07-17 04:37:30 UTC
Original public report:

<http://mail.openjdk.java.net/pipermail/security-dev/2014-November/011377.html>

Comment 9 errata-xmlrpc 2015-07-17 08:04:01 UTC
This issue has been addressed in the following products:

  Oracle Java for Red Hat Enterprise Linux 5
  Oracle Java for Red Hat Enterprise Linux 7
  Oracle Java for Red Hat Enterprise Linux 6

Via RHSA-2015:1243 https://rhn.redhat.com/errata/RHSA-2015-1243.html

Comment 10 errata-xmlrpc 2015-07-17 08:05:12 UTC
This issue has been addressed in the following products:

  Oracle Java for Red Hat Enterprise Linux 6
  Oracle Java for Red Hat Enterprise Linux 7
  Oracle Java for Red Hat Enterprise Linux 5

Via RHSA-2015:1242 https://rhn.redhat.com/errata/RHSA-2015-1242.html

Comment 11 errata-xmlrpc 2015-07-17 08:08:09 UTC
This issue has been addressed in the following products:

  Oracle Java for Red Hat Enterprise Linux 6
  Oracle Java for Red Hat Enterprise Linux 7

Via RHSA-2015:1241 https://rhn.redhat.com/errata/RHSA-2015-1241.html

Comment 12 errata-xmlrpc 2015-07-22 19:33:47 UTC
This issue has been addressed in the following products:

  Supplementary for Red Hat Enterprise Linux 5
  Supplementary for Red Hat Enterprise Linux 6

Via RHSA-2015:1486 https://rhn.redhat.com/errata/RHSA-2015-1486.html

Comment 13 errata-xmlrpc 2015-07-22 19:56:53 UTC
This issue has been addressed in the following products:

  Supplementary for Red Hat Enterprise Linux 7
  Supplementary for Red Hat Enterprise Linux 6

Via RHSA-2015:1485 https://rhn.redhat.com/errata/RHSA-2015-1485.html

Comment 14 errata-xmlrpc 2015-07-23 19:21:23 UTC
This issue has been addressed in the following products:

  Supplementary for Red Hat Enterprise Linux 5

Via RHSA-2015:1488 https://rhn.redhat.com/errata/RHSA-2015-1488.html

Comment 15 errata-xmlrpc 2015-07-30 17:15:34 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 5
  Red Hat Enterprise Linux 6
  Red Hat Enterprise Linux 7

Via RHSA-2015:1526 https://rhn.redhat.com/errata/RHSA-2015-1526.html

Comment 16 errata-xmlrpc 2015-08-12 16:40:02 UTC
This issue has been addressed in the following products:

  Red Hat Satellite Server v 5.7
  Red Hat Satellite Server v 5.6

Via RHSA-2015:1604 https://rhn.redhat.com/errata/RHSA-2015-1604.html

Comment 17 Takeshi Nishimura 2015-10-17 08:20:41 UTC
This patch causes Bug 1251935 and will be fixed in later versions.