Bug 1236954 (CVE-2015-2730) - CVE-2015-2730 NSS: ECDSA signature validation fails to handle some signatures correctly (MFSA 2015-64)
Summary: CVE-2015-2730 NSS: ECDSA signature validation fails to handle some signatures...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2015-2730
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Elio Maldonado Batiz
QA Contact:
URL:
Whiteboard:
Depends On: 1247487 1251548 1251549 1251550 1251551
Blocks: 717789 1236968
TreeView+ depends on / blocked
 
Reported: 2015-06-30 05:09 UTC by Huzaifa S. Sidhpurwala
Modified: 2023-05-12 09:23 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
A flaw was found in the way NSS verified certain ECDSA (Elliptic Curve Digital Signature Algorithm) signatures. Under certain conditions, an attacker could use this flaw to conduct signature forgery attacks.
Clone Of:
Environment:
Last Closed: 2015-09-01 07:40:43 UTC
Embargoed:


Attachments (Terms of Use)
Check for P == Q or P == -Q before adding P and Q. (2.08 KB, patch)
2015-07-28 23:11 UTC, Elio Maldonado Batiz
rrelyea: review+
Details | Diff
Mark ec_GFp_pt_dbl_jm and ec_GFp_pt_add_jm_aff as static (1.63 KB, patch)
2015-07-28 23:21 UTC, Elio Maldonado Batiz
rrelyea: review-
Details | Diff
spec file changes - in patch format (1.79 KB, patch)
2015-07-29 00:02 UTC, Elio Maldonado Batiz
rrelyea: review-
Details | Diff
spec file changes - V2 - in patch format (1.79 KB, patch)
2015-07-29 17:44 UTC, Elio Maldonado Batiz
rrelyea: review-
Details | Diff
spec file changes - V3 - in patch format (3.98 KB, patch)
2015-07-29 18:34 UTC, Elio Maldonado Batiz
rrelyea: review+
Details | Diff
spec file changes - V4 - in patch format (1.59 KB, patch)
2015-07-29 19:03 UTC, Elio Maldonado Batiz
no flags Details | Diff
Check for P == Q or P ==-Q before adding P and Q (2.08 KB, patch)
2015-08-06 16:46 UTC, Elio Maldonado Batiz
rrelyea: review+
Details | Diff
Mark two functions as static (1.63 KB, patch)
2015-08-06 16:49 UTC, Elio Maldonado Batiz
rrelyea: review-
Details | Diff
changes to nss-softon.spec (rhel-7.2) - in patch format (1.83 KB, patch)
2015-08-06 16:51 UTC, Elio Maldonado Batiz
rrelyea: review-
Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:1664 0 normal SHIPPED_LIVE Moderate: nss security, bug fix, and enhancement update 2015-08-24 19:38:26 UTC
Red Hat Product Errata RHSA-2015:1699 0 normal SHIPPED_LIVE Moderate: nss-softokn security update 2015-09-01 11:27:28 UTC

Description Huzaifa S. Sidhpurwala 2015-06-30 05:09:50 UTC
Mozilla community member Watson Ladd reported that the implementation of Elliptical Curve Cryptography (ECC) multiplication for Elliptic Curve Digital Signature Algorithm (ECDSA) signature validation in Network Security Services (NSS) did not handle exceptional cases correctly. This could potentially allow for signature forgery. This issue was fixed in NSS version 3.19.1. 


External Reference:

http://www.mozilla.org/security/announce/2015/mfsa2015-64.html


Acknowledgements:

Red Hat would like to thank the Mozilla project for reporting this issue. Upstream acknowledges Watson Ladd as the original reporter.

Comment 1 Huzaifa S. Sidhpurwala 2015-07-06 08:20:30 UTC
Upstream commits:

https://hg.mozilla.org/projects/nss/rev/2c05e861ce07
https://hg.mozilla.org/projects/nss/rev/fc6870938172

This issue was fixed in NSS version 3.19.1.

Comment 2 Huzaifa S. Sidhpurwala 2015-07-14 05:29:27 UTC
This issue was fixed in Red Hat Enterprise Linux 6 and 7 via the following advisory:

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

Comment 3 Huzaifa S. Sidhpurwala 2015-07-14 05:45:11 UTC
Statement:

(none)

Comment 8 Elio Maldonado Batiz 2015-07-28 23:11:25 UTC
Created attachment 1057176 [details]
Check for P == Q or P == -Q before adding P and Q.

Identical to https://hg.mozilla.org/projects/nss/rev/2c05e861ce07

Comment 9 Elio Maldonado Batiz 2015-07-28 23:21:31 UTC
Created attachment 1057177 [details]
Mark ec_GFp_pt_dbl_jm and ec_GFp_pt_add_jm_aff as static

Identical to https://hg.mozilla.org/projects/nss/rev/fc6870938172

Comment 10 Elio Maldonado Batiz 2015-07-29 00:02:51 UTC
Created attachment 1057190 [details]
spec file changes - in patch format

Comment 11 Elio Maldonado Batiz 2015-07-29 00:04:27 UTC
scratch build: https://brewweb.devel.redhat.com/taskinfo?taskID=9601846

Comment 12 Bob Relyea 2015-07-29 16:59:09 UTC
Comment on attachment 1057177 [details]
Mark ec_GFp_pt_dbl_jm and ec_GFp_pt_add_jm_aff as static

r- just drop this patch. it's not part of CVE, it's just cleanup.

Comment 13 Bob Relyea 2015-07-29 17:01:13 UTC
Comment on attachment 1057176 [details]
Check for P == Q or P == -Q before adding P and Q.

r+

Comment 14 Bob Relyea 2015-07-29 17:02:01 UTC
Comment on attachment 1057190 [details]
spec file changes - in patch format

drop patch 101.

Comment 15 Elio Maldonado Batiz 2015-07-29 17:44:56 UTC
Created attachment 1057375 [details]
spec file changes - V2 - in patch format

This version drops unneeded Patch101 per review request.

Comment 16 Elio Maldonado Batiz 2015-07-29 18:13:00 UTC
Comment on attachment 1057375 [details]
spec file changes - V2 - in patch format

In the change log I should replace "Backport two upstreram patches ..." with "Pick up upstream patch ...".

Comment 17 Bob Relyea 2015-07-29 18:27:35 UTC
Comment on attachment 1057375 [details]
spec file changes - V2 - in patch format

This patch isn't any different, I think you attached the wrong file;(.

Comment 18 Elio Maldonado Batiz 2015-07-29 18:34:24 UTC
Created attachment 1057379 [details]
spec file changes - V3 - in patch format

You are right, wrong copy. Let's hope 3 is the lucky one.

Comment 19 Bob Relyea 2015-07-29 18:55:00 UTC
Comment on attachment 1057379 [details]
spec file changes - V3 - in patch format

This isn't the spec patch...

Comment 20 Bob Relyea 2015-07-29 18:55:49 UTC
Comment on attachment 1057379 [details]
spec file changes - V3 - in patch format

r+ OK, this is both the spec file and the real patch combined.

Comment 21 Elio Maldonado Batiz 2015-07-29 19:03:25 UTC
Created attachment 1057382 [details]
spec file changes - V4 - in patch format

Comment 22 Elio Maldonado Batiz 2015-07-29 19:08:28 UTC
Nitpick: V4 changes "Backport" to "Pickup up" in the change log entry as I had intended.

Comment 23 Elio Maldonado Batiz 2015-07-29 22:03:37 UTC
Bob, hold on to the review for a short while, I just saw your email reminding me that I should "... include a check list of the things you checked before doing the rebase. The imporant ones are:

1) make sure you revert any upstream default changes between the current
RHEL-5 and your 3.19.1. Your RHEL-6 should help with that.
2) make sure you pick up Martin's fix for the client auth regression
caused in 3.19.1 (caused, in fact by the very fix you are trying to pick
up).
Upstream bug is: https://bugzilla.mozilla.org/show_bug.cgi?id=1173413"

Let me do that.

Comment 28 Elio Maldonado Batiz 2015-08-06 16:46:39 UTC
Created attachment 1060043 [details]
Check for P == Q or P ==-Q before adding P and Q

For nss-softokn on rhel-7as requested. Same as upstream and for rhel-5-11.

Comment 29 Elio Maldonado Batiz 2015-08-06 16:49:08 UTC
Created attachment 1060044 [details]
Mark two functions as static

For nss-softokn on rhel-7 as requested, same as upstream.

Comment 30 Elio Maldonado Batiz 2015-08-06 16:51:01 UTC
Created attachment 1060045 [details]
changes to nss-softon.spec (rhel-7.2) - in patch format

Comment 31 Elio Maldonado Batiz 2015-08-06 16:52:46 UTC
https://brewweb.devel.redhat.com/taskinfo?taskID=9654871 is a scratch build with those changes applied.

Comment 32 Bob Relyea 2015-08-06 18:38:03 UTC
Comment on attachment 1060043 [details]
Check for P == Q or P ==-Q before adding P and Q

r+ rrelyea

Comment 33 Bob Relyea 2015-08-06 18:38:33 UTC
Comment on attachment 1060044 [details]
Mark two functions as static

r- drop this patch. It's not part of the security fix.

Comment 34 Bob Relyea 2015-08-06 18:39:07 UTC
Comment on attachment 1060045 [details]
changes to nss-softon.spec (rhel-7.2) - in patch format

r- drop patch 103.

bob

Comment 37 Huzaifa S. Sidhpurwala 2015-08-10 07:57:07 UTC
(In reply to Huzaifa S. Sidhpurwala from comment #2)
> This issue was fixed in Red Hat Enterprise Linux 6 and 7 via the following
> advisory:
> 
> https://rhn.redhat.com/errata/RHSA-2015-1185.html

Upon further investigation, it seems the above statement is incorrect. The rebase was only applied to the nss package. Where as the upstream commits (mentioned in comment #1) affect the part of code which is packaged as nss-softokn (In Red Hat Enterprise Linux 6 and 7).

Comment 38 Elio Maldonado Batiz 2015-08-10 13:27:25 UTC
In comment 35, the tracking bugs have Component: nss. That should be changed to be Component: nss-softokn.

Comment 39 Elio Maldonado Batiz 2015-08-10 14:32:42 UTC
(In reply to Elio Maldonado Batiz from comment #38)
Changed all to Component: nss-softokn.

Comment 40 errata-xmlrpc 2015-08-24 15:39:10 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 5

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

Comment 41 errata-xmlrpc 2015-09-01 07:28:22 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6
  Red Hat Enterprise Linux 7

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


Note You need to log in before you can comment on or make changes to this bug.