Descriptionnet: fix crash when failing to import a client-side cert into NSS.
(See the attached bug for details of the crash.)
I believe the crash happens here (secitem.c:240):
SECStatus
SECITEM_CopyItem(PRArenaPool *arena, SECItem *to, const SECItem *from)
{
to->type = from->type;
This is called from sslplatf.c:87:
for (len = 0, node = CERT_LIST_HEAD(list); !CERT_LIST_END(node, list);
len++, node = CERT_LIST_NEXT(node)) {
// Check to see if the last cert to be sent is a self-signed cert,
// and if so, omit it from the list of certificates. However, if
// there is only one cert (len == 0), include the cert, as it means
// the EE cert is self-signed.
if (len > 0 && (len == chain->len - 1) && node->cert->isRoot) {
chain->len = len;
break;
}
SECITEM_CopyItem(arena, &chain->certs[len], &node->cert->derCert);
}
I think node->cert is NULL an that the compiler is confusing things by having
SECITEM_CopyItem on the stack.
The list of certs eventually comes from
SSLClientSocketNSS::PlatformClientAuthHandler which doesn't check for NULL
results when importing the certificates.
The reporter notes that the certificate had a duplicate issuer and serial,
which does cause NSS to reject certificates in some cases.
BUG=97355
TEST=none
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=102943
Patch Set 1 #
Total comments: 2
Patch Set 2 : ... #
Total comments: 9
Patch Set 3 : ... #Patch Set 4 : ... #Patch Set 5 : ... #Patch Set 6 : ... #
Total comments: 5
Messages
Total messages: 13 (0 generated)
|