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)
committerKarolin Seeger <kseeger@samba.org>
Tue, 21 Apr 2020 11:20:31 +0000 (13:20 +0200)
commitf931ec7b3875442d0c097c62b8e82bee4cb65584
treef27c05a1b4d551cdcf4c66d60f8ea99fae070886
parent2a611988caca66ebe2b88051b3bad148b442c72c
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>
15 files changed:
auth/gensec/gensec_util.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