Bug 1385290 - nss-softokn 3.27-0-1.0 RSA_PopulatePrivateKey API call failure
Summary: nss-softokn 3.27-0-1.0 RSA_PopulatePrivateKey API call failure
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: nss-softokn
Version: 24
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Daiki Ueno
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-15 23:24 UTC by Stefan Berger
Modified: 2017-06-28 15:44 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-28 15:44:05 UTC
Type: Bug


Attachments (Terms of Use)

Description Stefan Berger 2016-10-15 23:24:55 UTC
The error is the same error as described here: 

https://bugzilla.redhat.com/show_bug.cgi?id=1249720



The nss-sfotokn-freebl-3.27.0-1.0 package seems to have a bug described here (also referenced in above BZ):

https://bugzilla.redhat.com/show_bug.cgi?id=1249720


The patch that's missing is this one:

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


As an example, the function rsa_get_primes_from_exponents in nss/lib/freebl/rsa.c in the Fedora version has this signature:

static mp_err
rsa_get_primes_from_exponents(mp_int *e, mp_int *d, mp_int *p, mp_int *q,
                              mp_int *n, PRBool hasModulus,
                              unsigned int keySizeInBits)


The patch modifies it as follows:

 static mp_err
-rsa_get_primes_from_exponents(mp_int *e, mp_int *d, mp_int *p, mp_int *q,
-                              mp_int *n, PRBool hasModulus,
-                              unsigned int keySizeInBits)
+rsa_get_prime_from_exponents(mp_int *e, mp_int *d, mp_int *p, mp_int *q,
+                             mp_int *n, unsigned int keySizeInBits)
 {


So, we are still at the old version.


Here's a link to the source repo's that has the patched version of this function:

https://hg.mozilla.org/projects/nss/file/0c845c900217/lib/freebl/rsa.c#l530

Comment 1 Stefan Berger 2016-10-15 23:31:41 UTC
How can I help?

Comment 2 Kai Engert (:kaie) (inactive account) 2016-10-18 13:59:43 UTC
The other bug you're referring to has a reference to an upstream bug:
  https://bugzilla.mozilla.org/show_bug.cgi?id=992240

That bug has a fix that will apparently released with NSS 3.28.

Unless there's an urgent reason to immediately backport, Fedora will get this fix after the upstream release of NSS 3.28, which is expected later this year.

Comment 3 Stefan Berger 2016-10-20 20:32:25 UTC
I think a crypto library should not be left with this typo of bug...

Comment 4 Kai Engert (:kaie) (inactive account) 2017-06-28 15:44:05 UTC
Fedora uses NSS 3.28 or newer, so this should be fixed.


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