b86be3617d
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. Change-Id: I112ba76fe75d1579c45291042e448850b830cbb7 Reviewed-on: https://boringssl-review.googlesource.com/19164 Reviewed-by: Martin Kreichgauer <martinkr@google.com> Commit-Queue: Martin Kreichgauer <martinkr@google.com> CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org> |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
ext_dat.h | ||
pcy_cache.c | ||
pcy_data.c | ||
pcy_int.h | ||
pcy_lib.c | ||
pcy_map.c | ||
pcy_node.c | ||
pcy_tree.c | ||
tab_test.cc | ||
v3_akey.c | ||
v3_akeya.c | ||
v3_alt.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 | ||
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_utl.c | ||
v3name_test.cc |