Bug 1242456 (CVE-2015-2613)

Summary: CVE-2015-2613 NSS / JCE: missing EC parameter validation in ECDH_Derive() (OpenJDK JCE, 8075833)
Product: [Other] Security Response Reporter: Tomas Hoger <thoger>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: emaldona, kengert, rrelyea, security-response-team
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-25 20:31:52 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: 1300624, 1300628    
Bug Blocks: 1235167, 1244111    
Attachments:
Description Flags
OpenJDK8 / JCE patch none

Description Tomas Hoger 2015-07-13 11:47:27 UTC
It was discovered that the Elliptic Curve (EC) cryptography code as used in
Mozilla NSS (Network Security Services) library and OpenJDK JCE (Java
Cryptography Extension) component failed to properly validate EC parameters as
used in ECDH_Derive() function, which performs ECDH (Elliptic Curve
Diffie-Hellman) key derivation.  A remote attacker could use this flaw to
disclose sensitive information.

The OpenJDK packages as shipped with Red Hat Enterprise Linux 5, 6 and 7 do not
build the affected EC code and are therefore not directly affected.  Future
versions may provide EC support via NSS, see e.g. bug 1075702.

Comment 2 Tomas Hoger 2015-07-13 11:52:19 UTC
Created attachment 1051378 [details]
OpenJDK8 / JCE patch

Comment 3 Tomas Hoger 2015-07-15 06:24:12 UTC
Public now via Oracle Critical Patch Update - July 2015.  Fixed in Oracle Java SE 7u85 and 8u51.

External References:

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

Comment 4 Tomas Hoger 2015-07-15 11:09:12 UTC
This issue was already known to NSS upstream for a while, and is tracked via the following upstream bug:

https://bugzilla.mozilla.org/show_bug.cgi?id=380351

It seems it was handled as low priority issue there, as the only place where NSS called ECDH_Derive() is preceded by a call to EC_ValidatePublicKey(), making another call to EC_ValidatePublicKey() in ECDH_Derive() redundant.  However, ECDH_Derive() is part of the exposed NSS API, other applications using NSS may call it without performing parameter validation before the call.

Comment 5 Tomas Hoger 2015-07-16 14:53:04 UTC
OpenJDK 8 upstream commit:

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

Comment 6 errata-xmlrpc 2015-07-17 08:05:40 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 7 errata-xmlrpc 2015-07-17 08:08:42 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 8 errata-xmlrpc 2015-07-22 19:57:17 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 9 errata-xmlrpc 2015-07-23 19:21:49 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 10 Huzaifa S. Sidhpurwala 2015-08-17 06:11:20 UTC
This issue was addressed by Mozilla upstream via the following commit:

https://hg.mozilla.org/projects/nss/rev/a3a37589ba7d

(This commit is on nss-3.21, no intentions to backport to older versions yet.)