openssl/crypto/x509v3
David Benjamin 8545051c36 Guard against DoS in name constraints handling.
This guards against the name constraints check consuming large amounts
of CPU time when certificates in the presented chain contain an
excessive number of names (specifically subject email names or subject
alternative DNS names) and/or name constraints.

Name constraints checking compares the names presented in a certificate
against the name constraints included in a certificate higher up in the
chain using two nested for loops.

Move the name constraints check so that it happens after signature
verification so peers cannot exploit this using a chain with invalid
signatures. Also impose a hard limit on the number of name constraints
check loop iterations to further mitigate the issue.

Thanks to NCC for finding this issue. Fix written by Martin Kreichgauer.

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4393)
2017-09-22 22:00:55 +02:00
..
build.info
ext_dat.h
pcy_cache.c
pcy_data.c
pcy_int.h
pcy_lib.c
pcy_map.c
pcy_node.c
pcy_tree.c
standard_exts.h
v3_addr.c Avoid out-of-bounds read 2017-08-28 13:26:26 -04:00
v3_admis.c
v3_admis.h
v3_akey.c
v3_akeya.c
v3_alt.c
v3_asid.c
v3_bcons.c
v3_bitst.c
v3_conf.c
v3_cpols.c
v3_crld.c
v3_enum.c
v3_extku.c
v3_genn.c
v3_ia5.c
v3_info.c
v3_int.c
v3_lib.c
v3_ncons.c Guard against DoS in name constraints handling. 2017-09-22 22:00:55 +02:00
v3_pci.c
v3_pcia.c
v3_pcons.c
v3_pku.c
v3_pmaps.c
v3_prn.c
v3_purp.c
v3_skey.c
v3_sxnet.c
v3_tlsf.c Move e_os.h to be the very first include. 2017-08-30 07:20:44 +10:00
v3_utl.c Move e_os.h to be the very first include. 2017-08-30 07:20:44 +10:00
v3err.c