CVE-2020-10704: lib util asn1: Check parse tree depth
commitef35bb12674bf591385c4629c84b1a76f231755b
authorGary Lockyer <gary@catalyst.net.nz>
Wed, 8 Apr 2020 03:30:52 +0000 (8 15:30 +1200)
committerKarolin Seeger <kseeger@samba.org>
Tue, 21 Apr 2020 11:20:31 +0000 (21 13:20 +0200)
tree0b175c86255b39fdafb1a72eae5c69a772c5274f
parentf9d5c246f8ac0bc14706059df5c615acddef13db
CVE-2020-10704: lib util asn1: Check parse tree depth

Check the current depth of the parse tree and reject the input if the
depth exceeds that passed to asn1_init

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>
lib/util/asn1.c
selftest/knownfail.d/ldap_message [deleted file]