1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00
samba-mirror/libcli/ldap/wscript_build
Gary Lockyer b0832d2016 CVE-2020-10704: libcli ldap: test recursion depth in ldap_decode_filter_tree
Add tests to check that ASN.1 ldap requests with deeply nested elements
are rejected.  Previously there was no check on the on the depth of
nesting and excessive nesting could cause a stack overflow.

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>
2020-05-04 02:59:32 +00:00

24 lines
600 B
Python

#!/usr/bin/env python
bld.SAMBA_LIBRARY('cli-ldap-common',
source='ldap_message.c ldap_ndr.c',
public_deps='samba-errors talloc ldb',
private_headers='ldap_message.h ldap_errors.h ldap_ndr.h',
deps='samba-util asn1util NDR_SECURITY tevent',
private_library=True)
bld.SAMBA_BINARY(
'test_ldap_message',
source='tests/ldap_message_test.c',
deps='''
cmocka
talloc
ldb
samba-util
asn1util
NDR_SECURITY
cli-ldap
''',
for_selftest=True
)