openssl/crypto/x509
Dr. Stephen Henson a8565530e2 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 684400ce19)
2015-01-05 14:36:20 +00:00
..
.cvsignore
by_dir.c x509/by_dir.c: fix run-away pointer (and potential SEGV) 2014-02-24 15:23:46 +01:00
by_file.c
Makefile make update 2014-01-06 13:33:27 +00:00
x509.h Backport PSS signature support from HEAD. 2011-10-09 23:13:50 +00:00
x509_att.c
x509_cmp.c Reduce version skew. 2012-06-08 09:18:47 +00:00
x509_d2.c
x509_def.c
x509_err.c
x509_ext.c
x509_lu.c Minor compatibility fixes [from HEAD]. 2012-04-16 17:36:12 +00:00
x509_obj.c
x509_r2x.c
x509_req.c
x509_set.c
x509_trs.c
x509_txt.c
x509_v3.c
x509_vfy.c Fix bug in X509_V_FLAG_IGNORE_CRITICAL CRL handling. 2014-01-09 22:54:03 +00:00
x509_vfy.h
x509_vpm.c Fix use of NULL memory pointer in X509_VERIFY_PARAM_new in the event of a 2014-12-12 23:50:24 +00:00
x509cset.c
x509name.c
x509rset.c
x509spki.c
x509type.c ? crypto/aes/aes-armv4.S 2011-10-06 20:45:08 +00:00
x_all.c Fix various certificate fingerprint issues. 2015-01-05 14:36:20 +00:00