summaryrefslogtreecommitdiff
path: root/auth
diff options
context:
space:
mode:
authorGary Lockyer <gary@catalyst.net.nz>2020-04-03 12:18:03 +1300
committerKarolin Seeger <kseeger@samba.org>2020-04-22 12:50:42 +0200
commit109b128ec1db7ffc90c43c075d86b1c3de344cba (patch)
treeb4a9ea56b0ebb387d6b497e6f8756be4ac21e9a3 /auth
parentfecb05c8980100e32ab5812cc97d15edd5b83b50 (diff)
downloadsamba-109b128ec1db7ffc90c43c075d86b1c3de344cba.tar.gz
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>
Diffstat (limited to 'auth')
-rw-r--r--auth/gensec/gensec_util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/auth/gensec/gensec_util.c b/auth/gensec/gensec_util.c
index 20c9c2a1fbb..e185acc0c20 100644
--- a/auth/gensec/gensec_util.c
+++ b/auth/gensec/gensec_util.c
@@ -76,7 +76,7 @@ NTSTATUS gensec_generate_session_info_pac(TALLOC_CTX *mem_ctx,
static bool gensec_gssapi_check_oid(const DATA_BLOB *blob, const char *oid)
{
bool ret = false;
- struct asn1_data *data = asn1_init(NULL);
+ struct asn1_data *data = asn1_init(NULL, ASN1_MAX_TREE_DEPTH);
if (!data) return false;