CVE-2020-10704: lib util asn1: Add ASN.1 max tree depth
authorGary Lockyer <gary@catalyst.net.nz>
Thu, 2 Apr 2020 23:18:03 +0000 (12:18 +1300)
committerGary Lockyer <gary@samba.org>
Mon, 4 May 2020 02:59:31 +0000 (02:59 +0000)
commitf467727db5ff6a6e58d9b590e4d443a1d974b679
tree9269acc0655bcfee4676215c85f8c2ad79ef2744
parent62621bd686a91328ae378cd56f9876c66be8eac4
CVE-2020-10704: lib util asn1: Add ASN.1 max tree depth

Add maximum parse tree depth to the call to asn1_init, which will be
used to limit the depth of the ASN.1 parse tree.

Credit to OSS-Fuzz

REF: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20454
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14334

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
16 files changed:
auth/gensec/gensec_util.c
lib/fuzzing/fuzz_ldap_decode.c
lib/util/asn1.c
lib/util/asn1.h
lib/util/tests/asn1_tests.c
libcli/auth/spnego_parse.c
libcli/cldap/cldap.c
libcli/ldap/ldap_message.c
source3/lib/tldap.c
source3/lib/tldap_util.c
source3/libsmb/clispnego.c
source3/torture/torture.c
source4/auth/gensec/gensec_krb5.c
source4/ldap_server/ldap_server.c
source4/libcli/ldap/ldap_client.c
source4/libcli/ldap/ldap_controls.c