]> git.ipfire.org Git - thirdparty/openssl.git/commit - CHANGES
Fix various certificate fingerprint issues.
authorDr. Stephen Henson <steve@openssl.org>
Sat, 20 Dec 2014 15:09:50 +0000 (15:09 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Mon, 5 Jan 2015 14:36:06 +0000 (14:36 +0000)
commit85cfc188c06bd046420ae70dd6e302f9efe022a9
tree04702ea9952a329a99cd49dd2d584665e4a62a39
parent6ee7de1eb3cb3a47a824cf5de1e6a2522fb1e998
Fix various certificate fingerprint issues.

By using non-DER or invalid encodings outside the signed portion of a
certificate the fingerprint can be changed without breaking the signature.
Although no details of the signed portion of the certificate can be changed
this can cause problems with some applications: e.g. those using the
certificate fingerprint for blacklists.

1. Reject signatures with non zero unused bits.

If the BIT STRING containing the signature has non zero unused bits reject
the signature. All current signature algorithms require zero unused bits.

2. Check certificate algorithm consistency.

Check the AlgorithmIdentifier inside TBS matches the one in the
certificate signature. NB: this will result in signature failure
errors for some broken certificates.

3. Check DSA/ECDSA signatures use DER.

Reencode DSA/ECDSA signatures and compare with the original received
signature. Return an error if there is a mismatch.

This will reject various cases including garbage after signature
(thanks to Antti Karjalainen and Tuomo Untinen from the Codenomicon CROSS
program for discovering this case) and use of BER or invalid ASN.1 INTEGERs
(negative or with leading zeroes).

CVE-2014-8275
Reviewed-by: Emilia Käsper <emilia@openssl.org>
(cherry picked from commit 684400ce192dac51df3d3e92b61830a6ef90be3e)
CHANGES
crypto/asn1/a_verify.c
crypto/dsa/dsa_asn1.c
crypto/ecdsa/ecs_vrf.c
crypto/x509/x_all.c