1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-04 08:22:08 +03:00

fuzzing: ndr set global_max_recursion.

Set global_max_recursion to 128, to ensure the fuzzer does not trip the
ASAN maximum stack depth which seems to be about 256?

Credit to OSS-Fuzz

REF: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19820
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14254

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Gary Lockyer
2020-01-30 08:53:10 +13:00
committed by Andrew Bartlett
parent 2f8c3b6226
commit 2ba2ce40f9

View File

@ -262,6 +262,7 @@ int LLVMFuzzerTestOneInput(uint8_t *data, size_t size) {
memset(st, '\0', sizeof(st));
ndr_pull->flags |= LIBNDR_FLAG_REF_ALLOC;
ndr_pull->global_max_recursion = 128;
if (type == TYPE_OUT) {
status = pull_chunks(ndr_pull,