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>
Wed, 22 Apr 2020 10:50:42 +0000 (12:50 +0200)
commit109b128ec1db7ffc90c43c075d86b1c3de344cba
treeb4a9ea56b0ebb387d6b497e6f8756be4ac21e9a3
parentfecb05c8980100e32ab5812cc97d15edd5b83b50
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