diff options
author | Toni <matzeton@googlemail.com> | 2021-10-18 23:16:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-18 23:16:32 +0200 |
commit | ed51987e3a4838dd9aef27dfab2c0651f2f52836 (patch) | |
tree | fde07d774b7ef89b3d4b400f0c2af3f07f4f70ce /tests | |
parent | 7d3c3b23f8b9749690b8c5f345b7bc489b3666ac (diff) |
Fix broken fuzz_process_packet fuzzer by adding a call to ndpi_finalize_initialization(). (#1334)
* fixed several memory errors (heap-overflow, unitialized memory, etc)
* ability to build fuzz_process_packet with a main()
allowing to replay crash data generated with fuzz_process_packet
by LLVMs libfuzzer
* temporarily disable fuzzing if `tests/do.sh`
executed with env FUZZY_TESTING_ENABLED=1
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/do.sh.in | 3 | ||||
-rw-r--r-- | tests/pcap/fuzz-2021-10-13.pcap | bin | 0 -> 239 bytes | |||
-rw-r--r-- | tests/result/fuzz-2021-10-13.pcap.out | 12 |
3 files changed, 15 insertions, 0 deletions
diff --git a/tests/do.sh.in b/tests/do.sh.in index 36b83b128..d04b483b6 100755 --- a/tests/do.sh.in +++ b/tests/do.sh.in @@ -3,6 +3,9 @@ cd "$(dirname "${0}")" FUZZY_TESTING_ENABLED=@BUILD_FUZZTARGETS@ +if [ "$NDPI_DISABLE_FUZZY" = "1" ]; then + FUZZY_TESTING_ENABLED=0 +fi #Remember: valgrind and *SAN are incompatible! VALGRIND="" diff --git a/tests/pcap/fuzz-2021-10-13.pcap b/tests/pcap/fuzz-2021-10-13.pcap Binary files differnew file mode 100644 index 000000000..751775397 --- /dev/null +++ b/tests/pcap/fuzz-2021-10-13.pcap diff --git a/tests/result/fuzz-2021-10-13.pcap.out b/tests/result/fuzz-2021-10-13.pcap.out new file mode 100644 index 000000000..e0d6e4c90 --- /dev/null +++ b/tests/result/fuzz-2021-10-13.pcap.out @@ -0,0 +1,12 @@ +Guessed flow protos: 1 + +DPI Packets (TCP): 1 (1.00 pkts/flow) + +TLS 1 197 1 + +JA3 Host Stats: + IP Address # JA3C + 1 3400:3a30:3035:2f75:706c:6f32:643f:6c3d 1 + + + 1 TCP [3400:3a30:3035:2f75:706c:6f32:643f:6c3d]:44288 -> [302e::3d00::8001]:0 [proto: 91/TLS][Encrypted][cat: Web/5][1 pkts/197 bytes -> 0 pkts/0 bytes][Goodput ratio: 75/0][< 1 sec][Risk: ** Known protocol on non standard port **** Obsolete TLS version (older than 1.2) **** TLS suspicious extension **][Risk Score: 160][TLS (0030)][JA3C: 7fd749763364ca3fe45ec98917f981f6][PLAIN TEXT (005/uplo2)][Plen Bins: 0,0,0,0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] |