IPSec: fix infinite loop in metadata extraction#3172
Merged
Conversation
```
/mnt/scratch0/clusterfuzz/bot/builds/clusterfuzz-builds_ndpi_8ec636d63c380d6e8784fdc4e3a5a5ea467b122e/revisions/fuzz_ndpi_reader_pl7m_simplest: Running 1 inputs 100 time(s) each.
Running: /mnt/scratch0/clusterfuzz/bot/inputs/fuzzer-testcases/timeout-bdc73040de594626d68f86ad706399c15afb5e89
ALARM: working on the last Unit for 61 seconds
and the timeout value is 60 (use -timeout=N to change)
==249== ERROR: libFuzzer: timeout after 61 seconds
#0 0x5732e0833364 in __sanitizer_print_stack_trace /src/llvm-project/compiler-rt/lib/ubsan/ubsan_diag_standalone.cpp:31:3
ntop#1 0x5732e07a78e8 in fuzzer::PrintStackTrace() /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerUtil.cpp:210:5
ntop#2 0x5732e078a3bd in fuzzer::Fuzzer::AlarmCallback() /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:304:5
ntop#3 0x7f16d999b32f in libc.so.6
ntop#4 0x5732e091c173 in ikev2_parse_transforms ndpi/src/lib/protocols/ipsec.c:86:5
ntop#5 0x5732e091c173 in ndpi_dissect_ikev2_sa_init ndpi/src/lib/protocols/ipsec.c:237:11
ntop#6 0x5732e091bafc in ndpi_search_ipsec ndpi/src/lib/protocols/ipsec.c:428:7
ntop#7 0x5732e08b99be in check_ndpi_detection_func ndpi/src/lib/ndpi_main.c:8840:5
```
Found by oss-fuzz
See: https://issues.oss-fuzz.com/issues/504814687
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Found by oss-fuzz
See: https://issues.oss-fuzz.com/issues/504814687