Closed Bug 113746 Opened 24 years ago Closed 24 years ago

cmsutil crashes in NSS_CMSSignerInfo_AddSMIMEEncKeyPrefs

Categories

(NSS :: Libraries, defect, P1)

Other
Other
defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: julien.pierre, Assigned: bugz)

References

Details

1. apply my patch from http://bugzilla.mozilla.org/attachment.cgi?id=59978&action=view which makes cmsutil to use CERT_FindCertByUsage instead of CERT_FindCertByNickname (bug http://bugzilla.mozilla.org/show_bug.cgi?id=108097 ) to a fresh 3.4 tree. 2. send a signed email using a dual-key cert. I used my newly renewed dual-key AOL cert 3. cmsutil dies in SMIME library when trying to add the public encryption cert to the message : current thread: t@1 =>[1] nss_certificate_hash(key = 0x67588), line 141 in "tdcache.c" [2] PL_HashTableLookup(ht = 0x60320, key = 0x67588), line 387 in "plhash.c" [3] nssHash_Exists(hash = 0x60300, it = 0x67588), line 326 in "hash.c" [4] add_cert_to_cache(td = 0x5fac0, cert = 0x67588), line 632 in "tdcache.c" [5] nssTrustDomain_AddCertsToCache(td = 0x5fac0, certs = 0x58950, numCerts = 4U), line 712 in "tdcache.c" [6] NSSTrustDomain_FindCertificatesBySubject(td = 0x5fac0, subject = 0x9069c, rvOpt = (nil), maximumOpt = 0, arenaOpt = (nil)), line 650 in "trustdomain.c" [7] find_issuer_cert_for_identifier(c = 0x90678, id = 0x78c18), line 208 in "certificate.c" [8] NSSCertificate_BuildChain(c = 0x90678, timeOpt = 0x71ae0, usage = 0xffbef618, policiesOpt = (nil), rvOpt = 0xffbef60c, rvLimit = 2U, arenaOpt = (nil), statusOpt = 0xffbef608), line 271 in "certificate.c" [9] CERT_FindCertIssuer(cert = 0x89fd8, validTime = 1007606908667656LL, usage = certUsageEmailRecipient), line 416 in "certvfy.c" [10] CERT_VerifyCertChain(handle = 0x5fac0, cert = 0x89fd8, checkSig = 1, certUsage = certUsageEmailRecipient, t = 1007606908667656LL, wincx = (nil), log = (nil)), line 707 in "certvfy.c" [11] CERT_VerifyCert(handle = 0x5fac0, cert = 0x89fd8, checkSig = 1, certUsage = certUsageEmailRecipient, t = 1007606908667656LL, wincx = (nil), log = (nil)), line 1143 in "certvfy.c" [12] NSS_CMSSignerInfo_AddSMIMEEncKeyPrefs(signerinfo = 0x7a978, cert = 0x89fd8, certdb = 0x5fac0), line 713 in "cmssiginfo.c" [13] signed_data(signOptions = 0xffbef9ec), line 544 in "cmsutil.c" [14] main(argc = 12, argv = 0xffbefaa4), line 1254 in "cmsutil.c" (dbx) The same test works fine in NSS 3.3 . This is an NSS 3.4 regression. The test command I used is: cat signed.txt | smime -d . -p "xxx" -S "Julien Pierre's America Online Inc ID #2"
Severity: normal → blocker
Status: NEW → ASSIGNED
Priority: -- → P1
Actually, this crash occurs regardless of whether my patch is applied or not, so you can skip applying it when testing for this. I'm not sure why the S/MIME tests in tinderbox would be passing but my simple test is definitely crashing in the NSS tip.
Target Milestone: --- → 3.4
Ian/Bob, since I haven't changed any of the SMIME library code for 3.4, I think this crash is a result of your recent changes, especially as I see some trustdomain functions on the stack. Which one of you should I reassign this to ?
Taking this. I am able to reproduce it.
Assignee: jpierre → ian.mcgreer
Status: ASSIGNED → NEW
Blocks: 108097
Actually, I'm not able to reproduce this. I am able to add the encryption key preference, but crash later on in encoding (I think it's a problem with my cert setup). Julien, you have been able to reproduce this since yesterday's checkins? Can you tell me what set of extensions your dual certs have?
Ian, I am able to reproduce this after yesterday's checkins indeed, even with single-key certs. How can I determine which extensions my certs have to list them for you ?
This doesn't show up in the QA, which is why I think it has something do to with the specific cert setup. Can you do a "certutil -L -n <nickname>" on all of the certs used in this test and attach the results?
For the new cert (dual key) : Certificate: Data: Version: 3 (0x2) Serial Number: 21006 (0x520e) Signature Algorithm: PKCS #1 MD5 With RSA Encryption Issuer: CN=Intranet Certificate Authority, OU=AOL Technologies, O=America Online Inc, L=Mountain View, ST=CA, C=US Validity: Not Before: Tue Dec 04 02:59:49 2001 Not After: Sun Jun 02 02:59:49 2002 Subject: CN=Julien Pierre, E=jpierre@netscape.com, UID=jpierre, O=America Online Inc, C=US Subject Public Key Info: Public Key Algorithm: PKCS #1 RSA Encryption RSA Public Key: Modulus: 00:a2:42:98:25:47:00:49:1b:35:26:f3:c7:77:d4: fe:45:33:8f:0b:74:b5:7f:85:24:5c:71:c1:01:e2: 1a:23:89:67:28:c0:f7:49:d1:0d:db:76:fd:46:02: 73:84:5b:63:89:43:d5:aa:c0:19:fb:31:f0:38:36: 20:57:48:f5:07:36:78:0a:1f:52:cc:9a:db:24:d9: 04:aa:e0:ec:51:b2:12:51:9b:51:34:69:94:9f:0c: 2c:b3:0f:6a:15:87:48:07:1c:97:84:ee:96:42:ae: 80:90:18:fb:c8:f8:77:27:c9:93:84:a9:59:aa:bb: 71:2f:1d:5b:8d:b2:b7:5b:23 Exponent: 65537 (0x10001) Signed Extensions: Name: Certificate Key Usage Critical: True Data: 03:03:07:80:00 Name: Certificate Comment Comment: "Issued by Netscape Certificate Management System 4.5" Name: Certificate Subject Alt Name Data: Sequence { True } Name: Certificate Authority Key Identifier Data: Sequence { 80:14:29:db:b2:2d:83:7e:7f:8b:23:bb:c2:cc:66:b9: 39:e8:29:f3:02:86 } Name: Authority Information Access Data: Sequence { Sequence { 06:08:2b:06:01:05:05:07:30:01 86:25:68:74:74:70:3a:2f:2f:63:65:72:74:69:66: 69:63:61:74:65:73:2e:6e:65:74:73:63:61:70:65: 2e:63:6f:6d:2f:6f:63:73:70 } } Fingerprint (MD5): D4:1D:8C:D9:8F:00:B2:04:E9:80:09:98:EC:F8:42:7E Fingerprint (SHA1): DA:39:A3:EE:5E:6B:4B:0D:32:55:BF:EF:95:60:18:90:AF:D8:07:09 Signature Algorithm: PKCS #1 MD5 With RSA Encryption Signature: 6f:31:dc:8a:f3:a2:ab:d1:ec:42:c0:1c:b3:59:29:8d:f7:1d: 4c:4e:59:7b:cb:ae:64:41:45:5f:13:d7:7f:56:68:66:29:98: cc:c0:ae:e1:ec:93:6f:29:01:41:e6:dc:15:e3:94:e6:dc:d7: e4:ec:76:73:7b:ef:90:b6:ef:22:e5:bb:e3:50:46:c8:24:d0: 58:a1:1d:7c:48:1b:d6:88:f7:32:e1:f8:07:26:de:b2:1a:f3: f0:74:38:85:88:ef:49:ef:d1:93:cd:0b:93:78:b9:c8:cf:07: b6:d8:a8:94:5f:4d:76:87:98:2f:c4:e1:aa:ef:ea:be:61:58: 45:8b Certificate Trust Flags: SSL Flags: User Email Flags: User Object Signing Flags: User
I think I just had a problem in my test scripts and DB. I copied my test scripts again from my 3.3 tree to 3.4 and all works fine now. I'm not sure what circumstance triggered this bug but i can no longer reproduce it either. Feel free to resolve invalid, Ian.
marking invalid
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.