Skip to content

Commit

Permalink
PKINIT null pointer deref [CVE-2013-1415]
Browse files Browse the repository at this point in the history
Don't dereference a null pointer when cleaning up.

The KDC plugin for PKINIT can dereference a null pointer when a
malformed packet causes processing to terminate early, leading to
a crash of the KDC process.  An attacker would need to have a valid
PKINIT certificate or have observed a successful PKINIT authentication,
or an unauthenticated attacker could execute the attack if anonymous
PKINIT is enabled.

CVSSv2 vector: AV:N/AC:M/Au:N/C:N/I:N/A:C/E:P/RL:O/RC:C

This is a minimal commit for pullup; style fixes in a followup.
[kaduk@mit.edu: reformat and edit commit message]

ticket: 7570 (new)
target_version: 1.11.1
tags: pullup
  • Loading branch information
xiw authored and kaduk committed Feb 15, 2013
1 parent 316bf74 commit c773d3c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/plugins/preauth/pkinit/pkinit_crypto_openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -3253,7 +3253,7 @@ pkinit_check_kdc_pkid(krb5_context context,
pkiDebug("found kdcPkId in AS REQ\n");
is = d2i_PKCS7_ISSUER_AND_SERIAL(NULL, &p, (int)pkid_len);
if (is == NULL)
goto cleanup;
return retval;

status = X509_NAME_cmp(X509_get_issuer_name(kdc_cert), is->issuer);
if (!status) {
Expand All @@ -3263,7 +3263,6 @@ pkinit_check_kdc_pkid(krb5_context context,
}

retval = 0;
cleanup:
X509_NAME_free(is->issuer);
ASN1_INTEGER_free(is->serial);
free(is);
Expand Down

0 comments on commit c773d3c

Please sign in to comment.