Closed
Bug 74343
Opened 24 years ago
Closed 23 years ago
PSM fails to handle very large CRLs
Categories
(Core Graveyard :: Security: UI, defect, P1)
Tracking
(Not tracked)
VERIFIED
FIXED
psm2.0
People
(Reporter: lord, Assigned: ddrinan0264)
References
()
Details
(Whiteboard: PDT+; verified.)
Attachments
(2 files)
842 bytes,
patch
|
Details | Diff | Splinter Review | |
944 bytes,
patch
|
Details | Diff | Splinter Review |
From a user:
I found that two large CRLs (114 KB and 38 KB) would not load, while
smaller ones (under 17 KB) loaded without a problem.
Comment 3•23 years ago
|
||
version -> 2.0
Need to keep this on the radar. RTM bugs query
we ran used version 2.0.
Version: 1.01 → 2.0
Assignee | ||
Comment 4•23 years ago
|
||
Adding relyea to cc-list.
I've traced the problem into NSS. The import of the crl is successful, it's the
retrieval that fails. Here is the stack trace:
DecodeDBCrlEntry(_certDBEntryRevocation * 0x0012716c, SECItemStr * 0x00127194)
line 876
CollectCrls(SECItemStr * 0x001271ec, SECItemStr * 0x001271d4, int 4, void *
0x0500e2f8) line 6677 + 13 bytes
SEC_TraverseDBEntries(CERTCertDBHandleStr * 0x02c09c58, int 4, int (SECItemStr
*, SECItemStr *, int, void *)* 0x0255e681 CollectCrls(SECItemStr *, SECItemStr
*, int, void *), void * 0x0500e2f8) line 4546 + 19 bytes
SEC_LookupCrls(CERTCertDBHandleStr * 0x02c09c58, CERTCrlHeadNodeStr * *
0x001274ec, int -1) line 6749 + 20 bytes
In DecodeDBCrlEntry, there is a check on the db entry length that fails:
/* is database entry correct length? */
entry->derCrl.len = ( ( dbentry->data[0] << 8 ) | dbentry->data[1] );
nnlen = ( ( dbentry->data[2] << 8 ) | dbentry->data[3] );
if ( ( entry->derCrl.len + nnlen + DB_CRL_ENTRY_HEADER_LEN ) != dbentry->len)
{PORT_SetError(SEC_ERROR_BAD_DATABASE);
goto loser;
}
When I try to retrieve the RSASecureServer.crl (size of 814K), entry->derCrl.len
is 47682, nnlen is 42 and dbentry->len is 834160. The above length check fails
and the crl cannot be retrieved.
Comment 5•23 years ago
|
||
Ah ha! Our current database format cannot handle any object greater then 64k-1
because it only has a 2 byte length! The good news is I can easily see what is
broken. The bad news is it will require a database change to make this work. I
may be able to hack something where we used the stored length to determine the
real length of the CRL, but I'm not sure what the risk is if you move this
database to an older application.
bob
Comment 6•23 years ago
|
||
Comment 7•23 years ago
|
||
David,
Try the above patch and see if the large CRL still fails now....
bob
Assignee | ||
Comment 8•23 years ago
|
||
That works. I'm able to view the 850K CRL!
Assignee | ||
Comment 9•23 years ago
|
||
r=ddrinan for the patch proposed by relyea.
Javi, please review this patch also.
Comment 10•23 years ago
|
||
I don't understand Bob's patch but I did spot a typo.
"64 M" should be "64 K".
Ian, could you please review Bob's patch?
Comment 11•23 years ago
|
||
looks fine to me.
Assignee | ||
Comment 12•23 years ago
|
||
Ian,
Please give it an r=mcgreer.
Thanks.
Comment 13•23 years ago
|
||
r=mcgreer
Comment 14•23 years ago
|
||
David, remember to fix the "64 M" in the comments. :)
Assignee | ||
Comment 15•23 years ago
|
||
Assignee | ||
Comment 16•23 years ago
|
||
Adding blizzard to cc-list.
Chris,
Please super review.
Thanks,
David.
a=dbaron for trunk (or whatever NSS branch that the mozilla trunk uses) checkin
(on behalf of drivers)
Comment 19•23 years ago
|
||
sr=blizzard
Updated•23 years ago
|
Whiteboard: PDT+ → PDT+; ready for checkin
Assignee | ||
Comment 21•23 years ago
|
||
Checked into the NSS 3.2 branch and updated the NSS_CLIENT_TAG. I will close
this bug when I check into the NSS trunk.
Assignee | ||
Comment 22•23 years ago
|
||
Checked in to thge trunk of NSS. Marking FIXED.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 23•23 years ago
|
||
I'll need a testcase in order to verify this.
Assignee | ||
Comment 24•23 years ago
|
||
To get large crls go to crl.verisign.com. You will have to host the crl on a web
server which has the mime type application/x-pkcs7-crl set for .crl files. I
believe that all iPlanet/Netscape webservers have this mime type enabled by
default. Then point your mozilla/N6.1 browser to the crl (or a link to it),
click and the crl should be downloaded. To verify that is has downloaded
successfully, go to edit|preferences|privacy and security|validation and click
on "Manage CRLs..." button. A dialog will appear with a list of the crls in your
database.
Comment 25•23 years ago
|
||
updated whiteboard: needs verification
Whiteboard: PDT+; ready for checkin → PDT+; checked in needs verification.
Comment 26•23 years ago
|
||
Verified with a 497K CRL at http://junruh.mcom.com/crl/497k.crl
Status: RESOLVED → VERIFIED
Whiteboard: PDT+; checked in needs verification. → PDT+
Updated•8 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•