diff options
139 files changed, 257 insertions, 233 deletions
diff --git a/.gitignore b/.gitignore index 5f46fb3bc..c03fd9d3c 100644 --- a/.gitignore +++ b/.gitignore @@ -86,6 +86,7 @@ /fuzz/fuzz_ndpi_reader_payload_analyzer /fuzz/fuzz_filecfg_protocols /fuzz/fuzz_filecfg_categories +/fuzz/fuzz_filecfg_category /fuzz/fuzz_filecfg_malicious_sha1 /fuzz/fuzz_filecfg_malicious_ja3 /fuzz/fuzz_filecfg_risk_domains @@ -105,7 +106,6 @@ /fuzz/fuzz_alg_jitter_seed_corpus.zip /fuzz/fuzz_alg_crc32_md5_seed_corpus.zip /fuzz/fuzz_alg_bytestream_seed_corpus.zip -/fuzz/fuzz_ds_patricia_seed_corpus.zip /fuzz/fuzz_ds_libcache_seed_corpus.zip /fuzz/fuzz_ds_tree_seed_corpus.zip /fuzz/fuzz_ds_ptree_seed_corpus.zip @@ -115,6 +115,7 @@ /fuzz/fuzz_tls_certificate_seed_corpus.zip /fuzz/fuzz_filecfg_protocols_seed_corpus.zip /fuzz/fuzz_filecfg_categories_seed_corpus.zip +/fuzz/fuzz_filecfg_category_seed_corpus.zip /fuzz/fuzz_filecfg_malicious_sha1_seed_corpus.zip /fuzz/fuzz_filecfg_malicious_ja3_seed_corpus.zip /fuzz/fuzz_filecfg_risk_domains_seed_corpus.zip diff --git a/example/protos.txt b/example/protos.txt index 3020cc094..85d335830 100644 --- a/example/protos.txt +++ b/example/protos.txt @@ -62,6 +62,7 @@ ipv6:[247f:855b:5e16:3caf::]/64:100@CustomProtocolE=2048 ipv6:[247f:855b:5e16:3caf::]/64@CustomProtocolF=2049 ipv6:[fe80::76ac:b9ff:fe6c:c124]:12717@CustomProtocolG=2050 ipv6:[fe80::76ac:b9ff:fe6c:c124]:12718@CustomProtocolH=65535 +ipv6:[fe80::76ac:b9ff:fe6c:c124]:12719@CustomProtocolI=65534 # # You can use symbolic IP addreses if you want diff --git a/fuzz/Makefile.am b/fuzz/Makefile.am index a0cfc501c..162e02864 100644 --- a/fuzz/Makefile.am +++ b/fuzz/Makefile.am @@ -8,7 +8,7 @@ bin_PROGRAMS += fuzz_libinjection fuzz_binaryfusefilter #Internal crypto bin_PROGRAMS += fuzz_gcrypt_light fuzz_gcrypt_aes fuzz_gcrypt_gcm fuzz_gcrypt_cipher #Configuration files -bin_PROGRAMS += fuzz_filecfg_protocols fuzz_filecfg_categories fuzz_filecfg_malicious_sha1 fuzz_filecfg_malicious_ja3 fuzz_filecfg_risk_domains fuzz_filecfg_config +bin_PROGRAMS += fuzz_filecfg_protocols fuzz_filecfg_categories fuzz_filecfg_malicious_sha1 fuzz_filecfg_malicious_ja3 fuzz_filecfg_risk_domains fuzz_filecfg_config fuzz_filecfg_category #Reader utils bin_PROGRAMS += fuzz_readerutils_workflow fuzz_readerutils_parseprotolist @@ -576,6 +576,19 @@ fuzz_filecfg_config_LINK=$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXX) @NDPI_CFLAGS@ $(AM_CXXFLAGS) $(CXXFLAGS) \ $(fuzz_filecfg_config_LDFLAGS) @NDPI_LDFLAGS@ $(LDFLAGS) -o $@ +fuzz_filecfg_category_SOURCES = fuzz_filecfg_category.c fuzz_common_code.c +fuzz_filecfg_category_CFLAGS = -I../src/lib/ @NDPI_CFLAGS@ $(CXXFLAGS) -DNDPI_LIB_COMPILATION +fuzz_filecfg_category_LDADD = ../src/lib/libndpi.a $(ADDITIONAL_LIBS) +fuzz_filecfg_category_LDFLAGS = $(LIBS) +if HAS_FUZZLDFLAGS +fuzz_filecfg_category_CFLAGS += $(LIB_FUZZING_ENGINE) +fuzz_filecfg_category_LDFLAGS += $(LIB_FUZZING_ENGINE) +endif +# force usage of CXX for linker +fuzz_filecfg_category_LINK=$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXX) @NDPI_CFLAGS@ $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(fuzz_filecfg_category_LDFLAGS) @NDPI_LDFLAGS@ $(LDFLAGS) -o $@ + fuzz_readerutils_workflow_SOURCES = fuzz_readerutils_workflow.cpp fuzz_common_code.c ../example/reader_util.c fuzz_readerutils_workflow_CXXFLAGS = -I../example/ @NDPI_CFLAGS@ $(CXXFLAGS) fuzz_readerutils_workflow_CFLAGS = @NDPI_CFLAGS@ $(CXXFLAGS) @@ -640,10 +653,6 @@ files_corpus_fuzz_is_stun_tcp := $(wildcard corpus/fuzz_is_stun_tcp/*) fuzz_is_stun_tcp_seed_corpus.zip: $(files_corpus_fuzz_is_stun_tcp) zip -j fuzz_is_stun_tcp_seed_corpus.zip $(files_corpus_fuzz_is_stun_tcp) -files_corpus_fuzz_ds_patricia := $(wildcard corpus/fuzz_ds_patricia/*) -fuzz_ds_patricia_seed_corpus.zip: $(files_corpus_fuzz_ds_patricia) - zip -j fuzz_ds_patricia_seed_corpus.zip $(files_corpus_fuzz_ds_patricia) - files_corpus_fuzz_alg_ses_des := $(wildcard corpus/fuzz_alg_ses_des/*) fuzz_alg_ses_des_seed_corpus.zip: $(files_corpus_fuzz_alg_ses_des) zip -j fuzz_alg_ses_des_seed_corpus.zip $(files_corpus_fuzz_alg_ses_des) @@ -712,6 +721,10 @@ files_corpus_fuzz_filecfg_config := $(wildcard corpus/fuzz_filecfg_config/*) fuzz_filecfg_config_seed_corpus.zip: $(files_corpus_fuzz_filecfg_config) zip -j fuzz_filecfg_config_seed_corpus.zip $(files_corpus_fuzz_filecfg_config) +files_corpus_fuzz_filecfg_category := $(wildcard corpus/fuzz_filecfg_category/*) +fuzz_filecfg_category_seed_corpus.zip: $(files_corpus_fuzz_filecfg_category) + zip -j fuzz_filecfg_category_seed_corpus.zip $(files_corpus_fuzz_filecfg_category) + files_corpus_fuzz_readerutils_workflow := $(wildcard corpus/fuzz_readerutils_workflow/*) fuzz_readerutils_workflow_seed_corpus.zip: $(files_corpus_fuzz_readerutils_workflow) zip -j fuzz_readerutils_workflow_seed_corpus.zip $(files_corpus_fuzz_readerutils_workflow) @@ -728,7 +741,7 @@ files_corpus_fuzz_ds_domain_classify := $(wildcard corpus/fuzz_ds_domain_classi fuzz_ds_domain_classify_seed_corpus.zip: $(files_corpus_fuzz_ds_domain_classify) zip -j fuzz_ds_domain_classify_seed_corpus.zip $(files_corpus_fuzz_ds_domain_classify) -corpus: fuzz_ndpi_reader_seed_corpus.zip fuzz_ndpi_reader_alloc_fail_seed_corpus.zip fuzz_ndpi_reader_payload_analyzer_seed_corpus.zip fuzz_quic_get_crypto_data_seed_corpus.zip fuzz_ds_patricia_seed_corpus.zip fuzz_alg_ses_des_seed_corpus.zip fuzz_alg_bins_seed_corpus.zip fuzz_alg_hll_seed_corpus.zip fuzz_alg_jitter_seed_corpus.zip fuzz_ds_libcache_seed_corpus.zip fuzz_community_id_seed_corpus.zip fuzz_ds_tree_seed_corpus.zip fuzz_serialization_seed_corpus.zip fuzz_ds_ptree_seed_corpus.zip fuzz_alg_crc32_md5_seed_corpus.zip fuzz_alg_bytestream_seed_corpus.zip fuzz_libinjection_seed_corpus.zip fuzz_tls_certificate_seed_corpus.zip fuzz_filecfg_protocols_seed_corpus.zip fuzz_readerutils_workflow_seed_corpus.zip fuzz_readerutils_parseprotolist_seed_corpus.zip fuzz_ds_bitmap64_seed_corpus.zip fuzz_ds_domain_classify_seed_corpus.zip fuzz_filecfg_protocols_seed_corpus.zip fuzz_filecfg_config_seed_corpus.zip fuzz_is_stun_udp_seed_corpus.zip fuzz_is_stun_tcp_seed_corpus.zip fuzz_filecfg_malicious_sha1_seed_corpus.zip fuzz_filecfg_malicious_ja3_seed_corpus.zip fuzz_filecfg_risk_domains_seed_corpus.zip +corpus: fuzz_ndpi_reader_seed_corpus.zip fuzz_ndpi_reader_alloc_fail_seed_corpus.zip fuzz_ndpi_reader_payload_analyzer_seed_corpus.zip fuzz_quic_get_crypto_data_seed_corpus.zip fuzz_alg_ses_des_seed_corpus.zip fuzz_alg_bins_seed_corpus.zip fuzz_alg_hll_seed_corpus.zip fuzz_alg_jitter_seed_corpus.zip fuzz_ds_libcache_seed_corpus.zip fuzz_community_id_seed_corpus.zip fuzz_ds_tree_seed_corpus.zip fuzz_serialization_seed_corpus.zip fuzz_ds_ptree_seed_corpus.zip fuzz_alg_crc32_md5_seed_corpus.zip fuzz_alg_bytestream_seed_corpus.zip fuzz_libinjection_seed_corpus.zip fuzz_tls_certificate_seed_corpus.zip fuzz_filecfg_protocols_seed_corpus.zip fuzz_readerutils_workflow_seed_corpus.zip fuzz_readerutils_parseprotolist_seed_corpus.zip fuzz_ds_bitmap64_seed_corpus.zip fuzz_ds_domain_classify_seed_corpus.zip fuzz_filecfg_protocols_seed_corpus.zip fuzz_filecfg_categories_seed_corpus.zip fuzz_filecfg_config_seed_corpus.zip fuzz_filecfg_category_seed_corpus.zip fuzz_is_stun_udp_seed_corpus.zip fuzz_is_stun_tcp_seed_corpus.zip fuzz_filecfg_malicious_sha1_seed_corpus.zip fuzz_filecfg_malicious_ja3_seed_corpus.zip fuzz_filecfg_risk_domains_seed_corpus.zip cp corpus/fuzz_*seed_corpus.zip . #Create dictionaries exactly as expected by oss-fuzz. @@ -762,6 +775,7 @@ distdir: -o -path './corpus/fuzz_filecfg_malicious_ja3/*' \ -o -path './corpus/fuzz_filecfg_risk_domains/*' \ -o -path './corpus/fuzz_filecfg_config/*' \ + -o -path './corpus/fuzz_filecfg_category/*' \ -o -path './corpus/fuzz_readerutils_workflow/*' \ -o -path './corpus/fuzz_readerutils_parseprotolist/*' \ -o -path './corpus/fuzz_is_stun_udp/*' \ @@ -780,7 +794,6 @@ distdir: -o -path './corpus/fuzz_ds_tree/*' \ -o -path './corpus/fuzz_ds_bitmap64/*' \ -o -path './corpus/fuzz_ds_domain_classify/*' \ - -o -path './corpus/fuzz_ds_ptree/*' \ - -o -path './corpus/fuzz_ds_patricia/*' | xargs -I'{}' cp -r '{}' '$(distdir)/{}' + -o -path './corpus/fuzz_ds_ptree/*' | xargs -I'{}' cp -r '{}' '$(distdir)/{}' all: corpus dictionaries diff --git a/fuzz/corpus/fuzz_ds_patricia/04d093aff831ee1f106282b79281614b8142d91f b/fuzz/corpus/fuzz_ds_patricia/04d093aff831ee1f106282b79281614b8142d91f Binary files differdeleted file mode 100644 index 4dfb06a99..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/04d093aff831ee1f106282b79281614b8142d91f +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/080eefec3d658696f6fdaf478e5ac1739c74e87b b/fuzz/corpus/fuzz_ds_patricia/080eefec3d658696f6fdaf478e5ac1739c74e87b Binary files differdeleted file mode 100644 index cc89738a4..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/080eefec3d658696f6fdaf478e5ac1739c74e87b +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/090a521b47c35bf722a930e4432aa2d730ee8332 b/fuzz/corpus/fuzz_ds_patricia/090a521b47c35bf722a930e4432aa2d730ee8332 Binary files differdeleted file mode 100644 index 2b98a6029..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/090a521b47c35bf722a930e4432aa2d730ee8332 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/0925b0ebe5718061127a9644b6b7d93980d14e3d b/fuzz/corpus/fuzz_ds_patricia/0925b0ebe5718061127a9644b6b7d93980d14e3d Binary files differdeleted file mode 100644 index 75b4c3a2a..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/0925b0ebe5718061127a9644b6b7d93980d14e3d +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/0c4d7507f7afda93d5676b0756e4903fb3dacf60 b/fuzz/corpus/fuzz_ds_patricia/0c4d7507f7afda93d5676b0756e4903fb3dacf60 Binary files differdeleted file mode 100644 index d534e347d..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/0c4d7507f7afda93d5676b0756e4903fb3dacf60 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/0cde5ac31a755afdcdbb10c139831665a36dda75 b/fuzz/corpus/fuzz_ds_patricia/0cde5ac31a755afdcdbb10c139831665a36dda75 Binary files differdeleted file mode 100644 index 1d8983877..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/0cde5ac31a755afdcdbb10c139831665a36dda75 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/0d001e9c537a1cf7da294ea889f4e2e9ce3c13e0 b/fuzz/corpus/fuzz_ds_patricia/0d001e9c537a1cf7da294ea889f4e2e9ce3c13e0 Binary files differdeleted file mode 100644 index 6583bb785..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/0d001e9c537a1cf7da294ea889f4e2e9ce3c13e0 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/13ed262cfca6f60fe738ef6cdfa2b56e5dc2d8da b/fuzz/corpus/fuzz_ds_patricia/13ed262cfca6f60fe738ef6cdfa2b56e5dc2d8da Binary files differdeleted file mode 100644 index 07f49d1ce..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/13ed262cfca6f60fe738ef6cdfa2b56e5dc2d8da +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/14518d096ece2abb8a2dd7327514f24d6cd48b58 b/fuzz/corpus/fuzz_ds_patricia/14518d096ece2abb8a2dd7327514f24d6cd48b58 Binary files differdeleted file mode 100644 index 24b97cccb..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/14518d096ece2abb8a2dd7327514f24d6cd48b58 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/15eb3eb3d65eba1b2a8cb71c2148766114962ac7 b/fuzz/corpus/fuzz_ds_patricia/15eb3eb3d65eba1b2a8cb71c2148766114962ac7 Binary files differdeleted file mode 100644 index c6ef675b6..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/15eb3eb3d65eba1b2a8cb71c2148766114962ac7 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/1b33c6dae5a35eee9358136515bbe1ee207a3d49 b/fuzz/corpus/fuzz_ds_patricia/1b33c6dae5a35eee9358136515bbe1ee207a3d49 Binary files differdeleted file mode 100644 index c6e875044..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/1b33c6dae5a35eee9358136515bbe1ee207a3d49 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/1e7eb80c8e1d8f9b7314b470d92c6be020b97e68 b/fuzz/corpus/fuzz_ds_patricia/1e7eb80c8e1d8f9b7314b470d92c6be020b97e68 Binary files differdeleted file mode 100644 index 46041c9a8..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/1e7eb80c8e1d8f9b7314b470d92c6be020b97e68 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/206d5c79d04ccdb3b0d946abbc94d4b637039107 b/fuzz/corpus/fuzz_ds_patricia/206d5c79d04ccdb3b0d946abbc94d4b637039107 Binary files differdeleted file mode 100644 index 1de64153c..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/206d5c79d04ccdb3b0d946abbc94d4b637039107 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/219cdafc24a0ebab673b49203f3cbbd6efde7000 b/fuzz/corpus/fuzz_ds_patricia/219cdafc24a0ebab673b49203f3cbbd6efde7000 Binary files differdeleted file mode 100644 index fe1c06fb9..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/219cdafc24a0ebab673b49203f3cbbd6efde7000 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/21b1e04ce1c6eb7bdf43328e5c47b15fa44d6f4f b/fuzz/corpus/fuzz_ds_patricia/21b1e04ce1c6eb7bdf43328e5c47b15fa44d6f4f Binary files differdeleted file mode 100644 index c5db9d0dd..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/21b1e04ce1c6eb7bdf43328e5c47b15fa44d6f4f +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/24ccf941ae8c4b95303a148da73d2348619eab9a b/fuzz/corpus/fuzz_ds_patricia/24ccf941ae8c4b95303a148da73d2348619eab9a Binary files differdeleted file mode 100644 index 12d51dac6..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/24ccf941ae8c4b95303a148da73d2348619eab9a +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/29afd7f67f6a46c398d71cd9e5ecce787d7f1176 b/fuzz/corpus/fuzz_ds_patricia/29afd7f67f6a46c398d71cd9e5ecce787d7f1176 Binary files differdeleted file mode 100644 index fe6050b3e..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/29afd7f67f6a46c398d71cd9e5ecce787d7f1176 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/2a286cbf9d32f6de497f91438b0f93c831893d06 b/fuzz/corpus/fuzz_ds_patricia/2a286cbf9d32f6de497f91438b0f93c831893d06 Binary files differdeleted file mode 100644 index 1bf7effae..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/2a286cbf9d32f6de497f91438b0f93c831893d06 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/2be813450d93a51bd5f047adb730c7929820f643 b/fuzz/corpus/fuzz_ds_patricia/2be813450d93a51bd5f047adb730c7929820f643 Binary files differdeleted file mode 100644 index 301f0d579..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/2be813450d93a51bd5f047adb730c7929820f643 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/2c1289ca6c27b79cebb54dc39a55a3fe9fc6bbf9 b/fuzz/corpus/fuzz_ds_patricia/2c1289ca6c27b79cebb54dc39a55a3fe9fc6bbf9 Binary files differdeleted file mode 100644 index 0edbf0af5..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/2c1289ca6c27b79cebb54dc39a55a3fe9fc6bbf9 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/2c48dce4e16ebb7bbeaa65a5cf0803baa3925a06 b/fuzz/corpus/fuzz_ds_patricia/2c48dce4e16ebb7bbeaa65a5cf0803baa3925a06 Binary files differdeleted file mode 100644 index b663fb5e7..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/2c48dce4e16ebb7bbeaa65a5cf0803baa3925a06 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/2c8502a8cc05c9877c0292567494678a54ee1e38 b/fuzz/corpus/fuzz_ds_patricia/2c8502a8cc05c9877c0292567494678a54ee1e38 Binary files differdeleted file mode 100644 index 0816e402e..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/2c8502a8cc05c9877c0292567494678a54ee1e38 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/2cefff96a3039cdbef3c3a6ba41d0b2fe1a24dde b/fuzz/corpus/fuzz_ds_patricia/2cefff96a3039cdbef3c3a6ba41d0b2fe1a24dde Binary files differdeleted file mode 100644 index 986f6b32f..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/2cefff96a3039cdbef3c3a6ba41d0b2fe1a24dde +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/2dbc0e121b164c9ef8cc50247c2fadc3aae9360c b/fuzz/corpus/fuzz_ds_patricia/2dbc0e121b164c9ef8cc50247c2fadc3aae9360c Binary files differdeleted file mode 100644 index e7991e4e2..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/2dbc0e121b164c9ef8cc50247c2fadc3aae9360c +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/31416f580807982a721aa329e749589b643bde35 b/fuzz/corpus/fuzz_ds_patricia/31416f580807982a721aa329e749589b643bde35 Binary files differdeleted file mode 100644 index b6d28ca14..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/31416f580807982a721aa329e749589b643bde35 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/31accd2800389b82f8dc68979878c6556982bbb1 b/fuzz/corpus/fuzz_ds_patricia/31accd2800389b82f8dc68979878c6556982bbb1 Binary files differdeleted file mode 100644 index ad7862b3b..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/31accd2800389b82f8dc68979878c6556982bbb1 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/3676c7c3052ee8bf7202ab9cdd06f678d8c47266 b/fuzz/corpus/fuzz_ds_patricia/3676c7c3052ee8bf7202ab9cdd06f678d8c47266 Binary files differdeleted file mode 100644 index 7ff41e16d..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/3676c7c3052ee8bf7202ab9cdd06f678d8c47266 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/36b3014210a0794308ae1181d4a8ad08e98f28fd b/fuzz/corpus/fuzz_ds_patricia/36b3014210a0794308ae1181d4a8ad08e98f28fd Binary files differdeleted file mode 100644 index 311dc779a..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/36b3014210a0794308ae1181d4a8ad08e98f28fd +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/3ace63222163540c03cd16910add24236483139d b/fuzz/corpus/fuzz_ds_patricia/3ace63222163540c03cd16910add24236483139d Binary files differdeleted file mode 100644 index 6d4021771..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/3ace63222163540c03cd16910add24236483139d +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/3cd758923493dc4269e956dcd2275cacb70b3d06 b/fuzz/corpus/fuzz_ds_patricia/3cd758923493dc4269e956dcd2275cacb70b3d06 Binary files differdeleted file mode 100644 index 34ff5eb1f..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/3cd758923493dc4269e956dcd2275cacb70b3d06 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/40225fbb10ed02053853ce61f3561a1c2eaadd8f b/fuzz/corpus/fuzz_ds_patricia/40225fbb10ed02053853ce61f3561a1c2eaadd8f Binary files differdeleted file mode 100644 index 45ac04667..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/40225fbb10ed02053853ce61f3561a1c2eaadd8f +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/414970dac4e5e56fce119eee76544cf64a14dfe9 b/fuzz/corpus/fuzz_ds_patricia/414970dac4e5e56fce119eee76544cf64a14dfe9 Binary files differdeleted file mode 100644 index 3a71d9826..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/414970dac4e5e56fce119eee76544cf64a14dfe9 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/41525d340f74f45d774491a3ff3cb09b5c40ae96 b/fuzz/corpus/fuzz_ds_patricia/41525d340f74f45d774491a3ff3cb09b5c40ae96 Binary files differdeleted file mode 100644 index d510e3f26..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/41525d340f74f45d774491a3ff3cb09b5c40ae96 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/4257941232d8d6fd686dc09b71405dfd24aef634 b/fuzz/corpus/fuzz_ds_patricia/4257941232d8d6fd686dc09b71405dfd24aef634 Binary files differdeleted file mode 100644 index 95f8933cf..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/4257941232d8d6fd686dc09b71405dfd24aef634 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/442d5de73c8b73fd39975a5bd03c8d81c9397f2f b/fuzz/corpus/fuzz_ds_patricia/442d5de73c8b73fd39975a5bd03c8d81c9397f2f Binary files differdeleted file mode 100644 index c39bf4f5a..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/442d5de73c8b73fd39975a5bd03c8d81c9397f2f +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/47ed8baadac2f946a298d232123e4e84684e9564 b/fuzz/corpus/fuzz_ds_patricia/47ed8baadac2f946a298d232123e4e84684e9564 Binary files differdeleted file mode 100644 index f10228edd..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/47ed8baadac2f946a298d232123e4e84684e9564 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/49b434649dca7dfd496b4dcaa4367804c526abce b/fuzz/corpus/fuzz_ds_patricia/49b434649dca7dfd496b4dcaa4367804c526abce Binary files differdeleted file mode 100644 index 6ee874425..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/49b434649dca7dfd496b4dcaa4367804c526abce +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/4faa575adf7479a26e898cc388d43bfc56abc3ee b/fuzz/corpus/fuzz_ds_patricia/4faa575adf7479a26e898cc388d43bfc56abc3ee Binary files differdeleted file mode 100644 index cf9dcf951..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/4faa575adf7479a26e898cc388d43bfc56abc3ee +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/50973022d553441dc116887c25f6dc84912ba703 b/fuzz/corpus/fuzz_ds_patricia/50973022d553441dc116887c25f6dc84912ba703 Binary files differdeleted file mode 100644 index acf849745..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/50973022d553441dc116887c25f6dc84912ba703 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/521991a268c2e02c6f7be45c9526cfe88b2e3f7f b/fuzz/corpus/fuzz_ds_patricia/521991a268c2e02c6f7be45c9526cfe88b2e3f7f Binary files differdeleted file mode 100644 index 95ee0a99b..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/521991a268c2e02c6f7be45c9526cfe88b2e3f7f +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/530bdb11fe9270a52123f0faeed18c46b5f94fd9 b/fuzz/corpus/fuzz_ds_patricia/530bdb11fe9270a52123f0faeed18c46b5f94fd9 Binary files differdeleted file mode 100644 index 72d1cec2d..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/530bdb11fe9270a52123f0faeed18c46b5f94fd9 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/54b73015a7a5041d00f84d67d51832d48c2b9907 b/fuzz/corpus/fuzz_ds_patricia/54b73015a7a5041d00f84d67d51832d48c2b9907 Binary files differdeleted file mode 100644 index 5b2e13204..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/54b73015a7a5041d00f84d67d51832d48c2b9907 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/599faaa27c2503b734bcd44fd3de9c9adb388bbb b/fuzz/corpus/fuzz_ds_patricia/599faaa27c2503b734bcd44fd3de9c9adb388bbb Binary files differdeleted file mode 100644 index 6670b4a9c..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/599faaa27c2503b734bcd44fd3de9c9adb388bbb +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/59a871d0625a68595b0e676966b003e5d9bb2cf3 b/fuzz/corpus/fuzz_ds_patricia/59a871d0625a68595b0e676966b003e5d9bb2cf3 Binary files differdeleted file mode 100644 index 0d747622e..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/59a871d0625a68595b0e676966b003e5d9bb2cf3 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/5bbea5577dd3884eae9bb1e1979f2794d591f250 b/fuzz/corpus/fuzz_ds_patricia/5bbea5577dd3884eae9bb1e1979f2794d591f250 Binary files differdeleted file mode 100644 index db187d141..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/5bbea5577dd3884eae9bb1e1979f2794d591f250 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/63fd84fdb4c93e5051b131e7283d1edbf2346d97 b/fuzz/corpus/fuzz_ds_patricia/63fd84fdb4c93e5051b131e7283d1edbf2346d97 Binary files differdeleted file mode 100644 index 9aceece25..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/63fd84fdb4c93e5051b131e7283d1edbf2346d97 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/6420e92ebf6d3056821f7e7dd2e12d0d2dfb716f b/fuzz/corpus/fuzz_ds_patricia/6420e92ebf6d3056821f7e7dd2e12d0d2dfb716f Binary files differdeleted file mode 100644 index 232c7b6cc..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/6420e92ebf6d3056821f7e7dd2e12d0d2dfb716f +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/68765021cb1305cb14753ce1ffb2e6b0ca98f670 b/fuzz/corpus/fuzz_ds_patricia/68765021cb1305cb14753ce1ffb2e6b0ca98f670 Binary files differdeleted file mode 100644 index eac99a324..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/68765021cb1305cb14753ce1ffb2e6b0ca98f670 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/68aa130fbb2ffb67d937d0726e6335332039beb2 b/fuzz/corpus/fuzz_ds_patricia/68aa130fbb2ffb67d937d0726e6335332039beb2 Binary files differdeleted file mode 100644 index c6d7ef4ae..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/68aa130fbb2ffb67d937d0726e6335332039beb2 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/6a5d9322d42293dbbed245169604641ddcc6c736 b/fuzz/corpus/fuzz_ds_patricia/6a5d9322d42293dbbed245169604641ddcc6c736 Binary files differdeleted file mode 100644 index 6e42b2aa9..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/6a5d9322d42293dbbed245169604641ddcc6c736 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/6b9d2fb5531fdf9064209020a9f28487f94b7ad2 b/fuzz/corpus/fuzz_ds_patricia/6b9d2fb5531fdf9064209020a9f28487f94b7ad2 Binary files differdeleted file mode 100644 index e55f2ba72..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/6b9d2fb5531fdf9064209020a9f28487f94b7ad2 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/6eebb0b657faa02d74cbe782acb06014a09e1681 b/fuzz/corpus/fuzz_ds_patricia/6eebb0b657faa02d74cbe782acb06014a09e1681 Binary files differdeleted file mode 100644 index 985c59bfb..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/6eebb0b657faa02d74cbe782acb06014a09e1681 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/7218671551e49d714af5c9a0363debc41f69b07f b/fuzz/corpus/fuzz_ds_patricia/7218671551e49d714af5c9a0363debc41f69b07f Binary files differdeleted file mode 100644 index ba3469110..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/7218671551e49d714af5c9a0363debc41f69b07f +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/74cc48645729d7afccc86b88ebdc525ec8e8639e b/fuzz/corpus/fuzz_ds_patricia/74cc48645729d7afccc86b88ebdc525ec8e8639e Binary files differdeleted file mode 100644 index 6c61526ad..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/74cc48645729d7afccc86b88ebdc525ec8e8639e +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/75bfb98cd2a35dc1af93c58279ea057d45ea09e6 b/fuzz/corpus/fuzz_ds_patricia/75bfb98cd2a35dc1af93c58279ea057d45ea09e6 Binary files differdeleted file mode 100644 index 6358e5a9e..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/75bfb98cd2a35dc1af93c58279ea057d45ea09e6 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/789b485a90d58fdb8817484cd8d0fb125d1ccbeb b/fuzz/corpus/fuzz_ds_patricia/789b485a90d58fdb8817484cd8d0fb125d1ccbeb Binary files differdeleted file mode 100644 index 36d2bd060..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/789b485a90d58fdb8817484cd8d0fb125d1ccbeb +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/791eeff6a8158407fcf41885f5114b42576bdc5e b/fuzz/corpus/fuzz_ds_patricia/791eeff6a8158407fcf41885f5114b42576bdc5e Binary files differdeleted file mode 100644 index 7b5fd5471..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/791eeff6a8158407fcf41885f5114b42576bdc5e +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/800207865abd6b8e974f7d8ca1165f88fb706da7 b/fuzz/corpus/fuzz_ds_patricia/800207865abd6b8e974f7d8ca1165f88fb706da7 Binary files differdeleted file mode 100644 index 57ab491aa..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/800207865abd6b8e974f7d8ca1165f88fb706da7 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/80d1a9bbd11a273f303b92ca65e2eca5221274c7 b/fuzz/corpus/fuzz_ds_patricia/80d1a9bbd11a273f303b92ca65e2eca5221274c7 Binary files differdeleted file mode 100644 index 58da9a664..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/80d1a9bbd11a273f303b92ca65e2eca5221274c7 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/82b0d13945b9d20c7b91ed26645f1e4b0b4e5a67 b/fuzz/corpus/fuzz_ds_patricia/82b0d13945b9d20c7b91ed26645f1e4b0b4e5a67 Binary files differdeleted file mode 100644 index 46799067e..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/82b0d13945b9d20c7b91ed26645f1e4b0b4e5a67 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/83a6b52b1116271058025d5d622cf1412dfa5701 b/fuzz/corpus/fuzz_ds_patricia/83a6b52b1116271058025d5d622cf1412dfa5701 Binary files differdeleted file mode 100644 index 391b875dd..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/83a6b52b1116271058025d5d622cf1412dfa5701 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/83c0a0d3cf3f29cddddeb7c355138ae236bf5727 b/fuzz/corpus/fuzz_ds_patricia/83c0a0d3cf3f29cddddeb7c355138ae236bf5727 Binary files differdeleted file mode 100644 index b1f89eb8c..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/83c0a0d3cf3f29cddddeb7c355138ae236bf5727 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/8b3d2f65163ff2351bf9a5bbf7dfbaeace054246 b/fuzz/corpus/fuzz_ds_patricia/8b3d2f65163ff2351bf9a5bbf7dfbaeace054246 Binary files differdeleted file mode 100644 index acaab6e6a..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/8b3d2f65163ff2351bf9a5bbf7dfbaeace054246 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/8b3fa51f3ea12e0ab1f2e4338f0bbdd167995c98 b/fuzz/corpus/fuzz_ds_patricia/8b3fa51f3ea12e0ab1f2e4338f0bbdd167995c98 Binary files differdeleted file mode 100644 index a799ddcce..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/8b3fa51f3ea12e0ab1f2e4338f0bbdd167995c98 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/8dc1dd8e66922ff701c798bbe91d19b37f58495f b/fuzz/corpus/fuzz_ds_patricia/8dc1dd8e66922ff701c798bbe91d19b37f58495f Binary files differdeleted file mode 100644 index 6084afb47..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/8dc1dd8e66922ff701c798bbe91d19b37f58495f +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/8e77a1ae0ef5ee0974856f2a0318b46e98f0e4f9 b/fuzz/corpus/fuzz_ds_patricia/8e77a1ae0ef5ee0974856f2a0318b46e98f0e4f9 Binary files differdeleted file mode 100644 index c3a15d37a..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/8e77a1ae0ef5ee0974856f2a0318b46e98f0e4f9 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/8f2f7f037ede54b9812983536b8a973db7dfe5ec b/fuzz/corpus/fuzz_ds_patricia/8f2f7f037ede54b9812983536b8a973db7dfe5ec Binary files differdeleted file mode 100644 index f6ca2f3d2..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/8f2f7f037ede54b9812983536b8a973db7dfe5ec +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/8f7756178046d60be6bf9eb02d2920c208aa7a7d b/fuzz/corpus/fuzz_ds_patricia/8f7756178046d60be6bf9eb02d2920c208aa7a7d Binary files differdeleted file mode 100644 index 540e6b5c8..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/8f7756178046d60be6bf9eb02d2920c208aa7a7d +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/921441816405adb82a95beb9e829eb2d07364e39 b/fuzz/corpus/fuzz_ds_patricia/921441816405adb82a95beb9e829eb2d07364e39 Binary files differdeleted file mode 100644 index 7a9455885..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/921441816405adb82a95beb9e829eb2d07364e39 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/94cfe0c7f792ee42ff43e5559fe0375323b9b68a b/fuzz/corpus/fuzz_ds_patricia/94cfe0c7f792ee42ff43e5559fe0375323b9b68a Binary files differdeleted file mode 100644 index e6a86cf92..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/94cfe0c7f792ee42ff43e5559fe0375323b9b68a +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/95107e7dc7612da1d0905556f401953c06b3507e b/fuzz/corpus/fuzz_ds_patricia/95107e7dc7612da1d0905556f401953c06b3507e Binary files differdeleted file mode 100644 index 3c2fe90da..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/95107e7dc7612da1d0905556f401953c06b3507e +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/9764794fc2c7bcb80ca3f42525e4d4e8e32a088f b/fuzz/corpus/fuzz_ds_patricia/9764794fc2c7bcb80ca3f42525e4d4e8e32a088f Binary files differdeleted file mode 100644 index 9dc4ca1f2..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/9764794fc2c7bcb80ca3f42525e4d4e8e32a088f +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/99a846729e1fa67dde649843fdf554d3d5c14d1e b/fuzz/corpus/fuzz_ds_patricia/99a846729e1fa67dde649843fdf554d3d5c14d1e Binary files differdeleted file mode 100644 index 91662c870..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/99a846729e1fa67dde649843fdf554d3d5c14d1e +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/9ba1d8c0a69decdd9035db4c60a2aaf66daa9fc1 b/fuzz/corpus/fuzz_ds_patricia/9ba1d8c0a69decdd9035db4c60a2aaf66daa9fc1 Binary files differdeleted file mode 100644 index e85691172..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/9ba1d8c0a69decdd9035db4c60a2aaf66daa9fc1 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/9c3e465891504c1549a8f2d82dc9416c6f029d00 b/fuzz/corpus/fuzz_ds_patricia/9c3e465891504c1549a8f2d82dc9416c6f029d00 Binary files differdeleted file mode 100644 index 07f9852e3..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/9c3e465891504c1549a8f2d82dc9416c6f029d00 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/9cb9002b518cf7158ddd8023b9559f629591cf56 b/fuzz/corpus/fuzz_ds_patricia/9cb9002b518cf7158ddd8023b9559f629591cf56 Binary files differdeleted file mode 100644 index 79531c506..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/9cb9002b518cf7158ddd8023b9559f629591cf56 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/9cc3c1a480c0872bc2f3e8e9539a46951436c1c3 b/fuzz/corpus/fuzz_ds_patricia/9cc3c1a480c0872bc2f3e8e9539a46951436c1c3 Binary files differdeleted file mode 100644 index 940db7966..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/9cc3c1a480c0872bc2f3e8e9539a46951436c1c3 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/9cd8475553e593641897c96d7abd7463f49c2682 b/fuzz/corpus/fuzz_ds_patricia/9cd8475553e593641897c96d7abd7463f49c2682 Binary files differdeleted file mode 100644 index 886a24de0..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/9cd8475553e593641897c96d7abd7463f49c2682 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/9d598f7fa3cdf08e373f27caf61c012aae75ce4d b/fuzz/corpus/fuzz_ds_patricia/9d598f7fa3cdf08e373f27caf61c012aae75ce4d Binary files differdeleted file mode 100644 index d3ba8fa10..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/9d598f7fa3cdf08e373f27caf61c012aae75ce4d +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/9fa60713c5ae1f3726ae70fd4e8c230c27e10a7e b/fuzz/corpus/fuzz_ds_patricia/9fa60713c5ae1f3726ae70fd4e8c230c27e10a7e Binary files differdeleted file mode 100644 index 0dcd71b1a..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/9fa60713c5ae1f3726ae70fd4e8c230c27e10a7e +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/a7302ca6b5de89a8840072d6bc28184881e7e5c7 b/fuzz/corpus/fuzz_ds_patricia/a7302ca6b5de89a8840072d6bc28184881e7e5c7 Binary files differdeleted file mode 100644 index 6d257363b..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/a7302ca6b5de89a8840072d6bc28184881e7e5c7 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/a7780546d30ae4eb791b6cef858b87dcf915307b b/fuzz/corpus/fuzz_ds_patricia/a7780546d30ae4eb791b6cef858b87dcf915307b Binary files differdeleted file mode 100644 index bd64e4d9f..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/a7780546d30ae4eb791b6cef858b87dcf915307b +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/a91405def886e3eccd8ee813609ef32d0b02815b b/fuzz/corpus/fuzz_ds_patricia/a91405def886e3eccd8ee813609ef32d0b02815b Binary files differdeleted file mode 100644 index f843af5ff..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/a91405def886e3eccd8ee813609ef32d0b02815b +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/aa0a7045de571ac72c4bef04373965d3c062a802 b/fuzz/corpus/fuzz_ds_patricia/aa0a7045de571ac72c4bef04373965d3c062a802 Binary files differdeleted file mode 100644 index f21af4514..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/aa0a7045de571ac72c4bef04373965d3c062a802 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/acadff503aae63ba452f693f9b1af75beeb871c2 b/fuzz/corpus/fuzz_ds_patricia/acadff503aae63ba452f693f9b1af75beeb871c2 Binary files differdeleted file mode 100644 index e5f5a67ee..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/acadff503aae63ba452f693f9b1af75beeb871c2 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/ad11755d5c38e9b4f78b89ea0115891f1e503512 b/fuzz/corpus/fuzz_ds_patricia/ad11755d5c38e9b4f78b89ea0115891f1e503512 Binary files differdeleted file mode 100644 index 66a26c7f8..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/ad11755d5c38e9b4f78b89ea0115891f1e503512 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/ad56cf4fbb246dbfea16651702230fda3e0c9c83 b/fuzz/corpus/fuzz_ds_patricia/ad56cf4fbb246dbfea16651702230fda3e0c9c83 Binary files differdeleted file mode 100644 index 335e795f6..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/ad56cf4fbb246dbfea16651702230fda3e0c9c83 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/ae2ee75e6177727ac0387e2c99ae3a761827d68e b/fuzz/corpus/fuzz_ds_patricia/ae2ee75e6177727ac0387e2c99ae3a761827d68e Binary files differdeleted file mode 100644 index b1573f088..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/ae2ee75e6177727ac0387e2c99ae3a761827d68e +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/b042b35030eb170c6507e14dd6f00a6e1b670612 b/fuzz/corpus/fuzz_ds_patricia/b042b35030eb170c6507e14dd6f00a6e1b670612 Binary files differdeleted file mode 100644 index cf2b6370a..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/b042b35030eb170c6507e14dd6f00a6e1b670612 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/b41236f1031a78544a0cbed30399f5c63810c858 b/fuzz/corpus/fuzz_ds_patricia/b41236f1031a78544a0cbed30399f5c63810c858 Binary files differdeleted file mode 100644 index f1d8cafbf..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/b41236f1031a78544a0cbed30399f5c63810c858 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/b688eaaf60534a0470b8a153c71dd52f6acde043 b/fuzz/corpus/fuzz_ds_patricia/b688eaaf60534a0470b8a153c71dd52f6acde043 Binary files differdeleted file mode 100644 index 84a29ac97..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/b688eaaf60534a0470b8a153c71dd52f6acde043 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/bafbbb41dfbb7cc1be135d34ad282d54d14fb308 b/fuzz/corpus/fuzz_ds_patricia/bafbbb41dfbb7cc1be135d34ad282d54d14fb308 Binary files differdeleted file mode 100644 index 8fbae7c0c..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/bafbbb41dfbb7cc1be135d34ad282d54d14fb308 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/bcd8153bc8760c12dccfc81e6fce1cee6dc2c1b4 b/fuzz/corpus/fuzz_ds_patricia/bcd8153bc8760c12dccfc81e6fce1cee6dc2c1b4 Binary files differdeleted file mode 100644 index e2bbdff8c..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/bcd8153bc8760c12dccfc81e6fce1cee6dc2c1b4 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/bff088bb8cea1b5dd229632d70941de8c9415889 b/fuzz/corpus/fuzz_ds_patricia/bff088bb8cea1b5dd229632d70941de8c9415889 Binary files differdeleted file mode 100644 index 6ac14e540..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/bff088bb8cea1b5dd229632d70941de8c9415889 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/c4b1f93b79ffcc468bf487d36c12a53f2e20f5be b/fuzz/corpus/fuzz_ds_patricia/c4b1f93b79ffcc468bf487d36c12a53f2e20f5be Binary files differdeleted file mode 100644 index 640f6f047..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/c4b1f93b79ffcc468bf487d36c12a53f2e20f5be +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/c550a457be7c8589680c0d0eb3a36f3e48d96b17 b/fuzz/corpus/fuzz_ds_patricia/c550a457be7c8589680c0d0eb3a36f3e48d96b17 Binary files differdeleted file mode 100644 index 80cb6cc3d..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/c550a457be7c8589680c0d0eb3a36f3e48d96b17 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/c8d112d02108163b41a166b147a7a44922d7ab49 b/fuzz/corpus/fuzz_ds_patricia/c8d112d02108163b41a166b147a7a44922d7ab49 Binary files differdeleted file mode 100644 index 5172aac07..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/c8d112d02108163b41a166b147a7a44922d7ab49 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/d0b0b56e3a3b9092ab75b212aa07777c48013050 b/fuzz/corpus/fuzz_ds_patricia/d0b0b56e3a3b9092ab75b212aa07777c48013050 Binary files differdeleted file mode 100644 index 8d68c7ff3..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/d0b0b56e3a3b9092ab75b212aa07777c48013050 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/d35119bcdc064dfd438dd5dc943a7d6e64b118bc b/fuzz/corpus/fuzz_ds_patricia/d35119bcdc064dfd438dd5dc943a7d6e64b118bc Binary files differdeleted file mode 100644 index 01e5bdb5a..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/d35119bcdc064dfd438dd5dc943a7d6e64b118bc +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/d47ffc046a3a67b46138121d4b0752cb770380ae b/fuzz/corpus/fuzz_ds_patricia/d47ffc046a3a67b46138121d4b0752cb770380ae Binary files differdeleted file mode 100644 index 388654c13..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/d47ffc046a3a67b46138121d4b0752cb770380ae +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/d5c613293379f84fd9d30da74953c74336b3efc7 b/fuzz/corpus/fuzz_ds_patricia/d5c613293379f84fd9d30da74953c74336b3efc7 Binary files differdeleted file mode 100644 index 684fc6ee0..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/d5c613293379f84fd9d30da74953c74336b3efc7 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/d9ea126774547be83e8514cf14bfc46b90e04ae1 b/fuzz/corpus/fuzz_ds_patricia/d9ea126774547be83e8514cf14bfc46b90e04ae1 Binary files differdeleted file mode 100644 index 91866bdf6..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/d9ea126774547be83e8514cf14bfc46b90e04ae1 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/e0b35272e42e26f2396fb30f2601afebeec4760b b/fuzz/corpus/fuzz_ds_patricia/e0b35272e42e26f2396fb30f2601afebeec4760b Binary files differdeleted file mode 100644 index 378cbfeb1..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/e0b35272e42e26f2396fb30f2601afebeec4760b +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/e0f738b7cc91b246885c5055c7a16ab716053186 b/fuzz/corpus/fuzz_ds_patricia/e0f738b7cc91b246885c5055c7a16ab716053186 Binary files differdeleted file mode 100644 index 610bf4fda..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/e0f738b7cc91b246885c5055c7a16ab716053186 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/e1c65b55e6f0e0f9c878b4127205943903b311c0 b/fuzz/corpus/fuzz_ds_patricia/e1c65b55e6f0e0f9c878b4127205943903b311c0 Binary files differdeleted file mode 100644 index 3d048060e..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/e1c65b55e6f0e0f9c878b4127205943903b311c0 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/e47cab0e163f9522bfd4bc1f3a4f4ef170fe96fd b/fuzz/corpus/fuzz_ds_patricia/e47cab0e163f9522bfd4bc1f3a4f4ef170fe96fd Binary files differdeleted file mode 100644 index e1abf7f4a..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/e47cab0e163f9522bfd4bc1f3a4f4ef170fe96fd +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/e77f0ad2aede947e4557ca77181c17cfe628e8f9 b/fuzz/corpus/fuzz_ds_patricia/e77f0ad2aede947e4557ca77181c17cfe628e8f9 Binary files differdeleted file mode 100644 index 6a8b48ea4..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/e77f0ad2aede947e4557ca77181c17cfe628e8f9 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/e9ae65ef89f69cde2b8e5b3e2ce14ac98b2c2289 b/fuzz/corpus/fuzz_ds_patricia/e9ae65ef89f69cde2b8e5b3e2ce14ac98b2c2289 Binary files differdeleted file mode 100644 index 311f15263..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/e9ae65ef89f69cde2b8e5b3e2ce14ac98b2c2289 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/ea7d1ce3b3df957829182925f48735fd70e28d1c b/fuzz/corpus/fuzz_ds_patricia/ea7d1ce3b3df957829182925f48735fd70e28d1c Binary files differdeleted file mode 100644 index 1f3efb89b..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/ea7d1ce3b3df957829182925f48735fd70e28d1c +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/ef6a236812a8235565a4c606ea2c5a9341e4aa41 b/fuzz/corpus/fuzz_ds_patricia/ef6a236812a8235565a4c606ea2c5a9341e4aa41 Binary files differdeleted file mode 100644 index 116c41f38..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/ef6a236812a8235565a4c606ea2c5a9341e4aa41 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/f10e4c67ca64bdce1cd394fd829bf0b5aeed7071 b/fuzz/corpus/fuzz_ds_patricia/f10e4c67ca64bdce1cd394fd829bf0b5aeed7071 Binary files differdeleted file mode 100644 index 0a9d7567a..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/f10e4c67ca64bdce1cd394fd829bf0b5aeed7071 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/f24cf8ce6cf0a9e00e9fcef913843d439792379c b/fuzz/corpus/fuzz_ds_patricia/f24cf8ce6cf0a9e00e9fcef913843d439792379c Binary files differdeleted file mode 100644 index 67fe193c4..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/f24cf8ce6cf0a9e00e9fcef913843d439792379c +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/f415309e92385cbd8c7d1c6a9a7505e933cb2acf b/fuzz/corpus/fuzz_ds_patricia/f415309e92385cbd8c7d1c6a9a7505e933cb2acf Binary files differdeleted file mode 100644 index ebe797d0b..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/f415309e92385cbd8c7d1c6a9a7505e933cb2acf +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/f4d7ba52332b71166ca952780db341c5645f04b3 b/fuzz/corpus/fuzz_ds_patricia/f4d7ba52332b71166ca952780db341c5645f04b3 Binary files differdeleted file mode 100644 index 643e1c657..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/f4d7ba52332b71166ca952780db341c5645f04b3 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/f5f68d29ff553b4e63a3f0bb69e4c940bc46c291 b/fuzz/corpus/fuzz_ds_patricia/f5f68d29ff553b4e63a3f0bb69e4c940bc46c291 Binary files differdeleted file mode 100644 index f67a60d06..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/f5f68d29ff553b4e63a3f0bb69e4c940bc46c291 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/f6fd7dd2bb4542f3d8d253768b6d63777d048afa b/fuzz/corpus/fuzz_ds_patricia/f6fd7dd2bb4542f3d8d253768b6d63777d048afa Binary files differdeleted file mode 100644 index d9fed68be..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/f6fd7dd2bb4542f3d8d253768b6d63777d048afa +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/f9cce96c161f401d73f04ef031404a885eb5da37 b/fuzz/corpus/fuzz_ds_patricia/f9cce96c161f401d73f04ef031404a885eb5da37 Binary files differdeleted file mode 100644 index 2f0142c4c..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/f9cce96c161f401d73f04ef031404a885eb5da37 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/fad5cb6b51a97763038b58addeaa2bd725293ac8 b/fuzz/corpus/fuzz_ds_patricia/fad5cb6b51a97763038b58addeaa2bd725293ac8 Binary files differdeleted file mode 100644 index 62f69055d..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/fad5cb6b51a97763038b58addeaa2bd725293ac8 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/fdd08d361bc7e016b6ad2e41d8b167bff2178777 b/fuzz/corpus/fuzz_ds_patricia/fdd08d361bc7e016b6ad2e41d8b167bff2178777 Binary files differdeleted file mode 100644 index f913a3239..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/fdd08d361bc7e016b6ad2e41d8b167bff2178777 +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/ff72929db2b1fdacd24b1aed103bb307bbac7d7f b/fuzz/corpus/fuzz_ds_patricia/ff72929db2b1fdacd24b1aed103bb307bbac7d7f Binary files differdeleted file mode 100644 index eefeedb2e..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/ff72929db2b1fdacd24b1aed103bb307bbac7d7f +++ /dev/null diff --git a/fuzz/corpus/fuzz_ds_patricia/ff82aaaf9375f24492e1bc709bf1518b827fc83d b/fuzz/corpus/fuzz_ds_patricia/ff82aaaf9375f24492e1bc709bf1518b827fc83d Binary files differdeleted file mode 100644 index 648a4f052..000000000 --- a/fuzz/corpus/fuzz_ds_patricia/ff82aaaf9375f24492e1bc709bf1518b827fc83d +++ /dev/null diff --git a/fuzz/corpus/fuzz_filecfg_category/comment.txt b/fuzz/corpus/fuzz_filecfg_category/comment.txt new file mode 100644 index 000000000..99e8589b5 --- /dev/null +++ b/fuzz/corpus/fuzz_filecfg_category/comment.txt @@ -0,0 +1 @@ +#comment diff --git a/fuzz/corpus/fuzz_filecfg_category/example.txt b/fuzz/corpus/fuzz_filecfg_category/example.txt new file mode 100644 index 000000000..a4bb082c2 --- /dev/null +++ b/fuzz/corpus/fuzz_filecfg_category/example.txt @@ -0,0 +1 @@ +lop.programtts.top diff --git a/fuzz/fuzz_common_code.c b/fuzz/fuzz_common_code.c index 4dbcf3018..d4311b1b6 100644 --- a/fuzz/fuzz_common_code.c +++ b/fuzz/fuzz_common_code.c @@ -44,6 +44,7 @@ void fuzz_init_detection_module(struct ndpi_detection_module_struct **ndpi_info_ ndpi_set_config(*ndpi_info_mod, NULL, "log.level", "3"); ndpi_set_config(*ndpi_info_mod, "all", "log", "enable"); + ndpi_load_domain_suffixes(*ndpi_info_mod, "public_suffix_list.dat"); ndpi_load_categories_dir(*ndpi_info_mod, "./lists/"); ndpi_load_protocols_file(*ndpi_info_mod, "protos.txt"); ndpi_load_categories_file(*ndpi_info_mod, "categories.txt", NULL); diff --git a/fuzz/fuzz_config.cpp b/fuzz/fuzz_config.cpp index b85f3752f..f99b87358 100644 --- a/fuzz/fuzz_config.cpp +++ b/fuzz/fuzz_config.cpp @@ -32,6 +32,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { char cfg_value[32]; char cfg_proto[32]; char cfg_param[32]; + u_int64_t cat_userdata = 0; /* Just to be sure to have some data */ @@ -65,16 +66,32 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { if(fuzzed_data.ConsumeBool()) ndpi_load_protocols_file(ndpi_info_mod, "protos.txt"); if(fuzzed_data.ConsumeBool()) - ndpi_load_categories_file(ndpi_info_mod, "categories.txt", NULL); + ndpi_load_protocols_file(ndpi_info_mod, fuzzed_data.ConsumeBool() ? NULL : "invalid_filename"); /* Error */ + if(fuzzed_data.ConsumeBool()) + ndpi_load_categories_file(ndpi_info_mod, "categories.txt", &cat_userdata); + if(fuzzed_data.ConsumeBool()) + ndpi_load_categories_file(ndpi_info_mod, fuzzed_data.ConsumeBool() ? NULL : "invalid_filename", &cat_userdata); /* Error */ if(fuzzed_data.ConsumeBool()) ndpi_load_risk_domain_file(ndpi_info_mod, "risky_domains.txt"); if(fuzzed_data.ConsumeBool()) + ndpi_load_risk_domain_file(ndpi_info_mod, fuzzed_data.ConsumeBool() ? NULL : "invalid_filename"); /* Error */ + if(fuzzed_data.ConsumeBool()) ndpi_load_malicious_ja3_file(ndpi_info_mod, "ja3_fingerprints.csv"); if(fuzzed_data.ConsumeBool()) + ndpi_load_malicious_ja3_file(ndpi_info_mod, fuzzed_data.ConsumeBool() ? NULL : "invalid_filename"); /* Error */ + if(fuzzed_data.ConsumeBool()) ndpi_load_malicious_sha1_file(ndpi_info_mod, "sha1_fingerprints.csv"); - /* Note that this function is not used by ndpiReader */ if(fuzzed_data.ConsumeBool()) + ndpi_load_malicious_sha1_file(ndpi_info_mod, fuzzed_data.ConsumeBool() ? NULL : "invalid_filename"); /* Error */ + if(fuzzed_data.ConsumeBool()) + ndpi_load_domain_suffixes(ndpi_info_mod, (char *)"public_suffix_list.dat"); + if(fuzzed_data.ConsumeBool()) + ndpi_load_domain_suffixes(ndpi_info_mod, fuzzed_data.ConsumeBool() ? NULL : (char *)"invalid_filename"); /* Error */ + /* Note that this function is not used by ndpiReader */ + if(fuzzed_data.ConsumeBool()) { + ndpi_load_ipv4_ptree(ndpi_info_mod, "invalid_filename", NDPI_PROTOCOL_TLS); ndpi_load_ipv4_ptree(ndpi_info_mod, "ipv4_addresses.txt", NDPI_PROTOCOL_TLS); + } /* TODO: stub for geo stuff */ ndpi_load_geoip(ndpi_info_mod, NULL, NULL); @@ -92,11 +109,13 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { value = fuzzed_data.ConsumeIntegralInRange(0, 365 + 1); sprintf(cfg_value, "%d", value); ndpi_set_config(ndpi_info_mod, "tls", "certificate_expiration_threshold", cfg_value); + ndpi_get_config(ndpi_info_mod, "tls", "certificate_expiration_threshold", cfg_value, sizeof(cfg_value)); } if(fuzzed_data.ConsumeBool()) { value = fuzzed_data.ConsumeIntegralInRange(0, 1 + 1); sprintf(cfg_value, "%d", value); ndpi_set_config(ndpi_info_mod, "tls", "application_blocks_tracking", cfg_value); + ndpi_get_config(ndpi_info_mod, "tls", "application_blocks_tracking", cfg_value, sizeof(cfg_value)); } if(fuzzed_data.ConsumeBool()) { value = fuzzed_data.ConsumeIntegralInRange(0, 1 + 1); @@ -152,6 +171,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { value = fuzzed_data.ConsumeIntegralInRange(0, 1 + 1); sprintf(cfg_value, "%d", value); ndpi_set_config(ndpi_info_mod, "any", "log", cfg_value); + ndpi_get_config(ndpi_info_mod, "any", "log", cfg_value, sizeof(cfg_value)); } for(i = 0; i < NDPI_MAX_SUPPORTED_PROTOCOLS; i++) { if(fuzzed_data.ConsumeBool()) { @@ -160,12 +180,14 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { sprintf(cfg_proto, "%d", i); /* TODO: we should try to map integer into name */ ndpi_set_config(ndpi_info_mod, cfg_proto, "log", cfg_value); + ndpi_get_config(ndpi_info_mod, cfg_proto, "log", cfg_value, sizeof(cfg_value)); } } if(fuzzed_data.ConsumeBool()) { value = fuzzed_data.ConsumeIntegralInRange(0, 1 + 1); sprintf(cfg_value, "%d", value); ndpi_set_config(ndpi_info_mod, "any", "ip_list.load", cfg_value); + ndpi_get_config(ndpi_info_mod, "any", "ip_list.load", cfg_value, sizeof(cfg_value)); } for(i = 0; i < NDPI_MAX_SUPPORTED_PROTOCOLS; i++) { if(fuzzed_data.ConsumeBool()) { @@ -173,6 +195,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { sprintf(cfg_value, "%d", value); sprintf(cfg_proto, "%d", i); ndpi_set_config(ndpi_info_mod, cfg_proto, "ip_list.load", cfg_value); + ndpi_get_config(ndpi_info_mod, cfg_proto, "ip_list.load", cfg_value, sizeof(cfg_value)); } } if(fuzzed_data.ConsumeBool()) { @@ -231,6 +254,10 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { ndpi_set_config(ndpi_info_mod, NULL, "flow_risk.crawler_bot.list.load", cfg_value); } if(fuzzed_data.ConsumeBool()) { + ndpi_set_config(ndpi_info_mod, NULL, "filename.config", fuzzed_data.ConsumeBool() ? NULL : (char *)"config.txt"); + ndpi_get_config(ndpi_info_mod, NULL, "filename.config", cfg_value, sizeof(cfg_value)); + } + if(fuzzed_data.ConsumeBool()) { value = fuzzed_data.ConsumeIntegralInRange(0, 3 + 1); sprintf(cfg_value, "%d", value); ndpi_set_config(ndpi_info_mod, NULL, "log.level", cfg_value); @@ -323,9 +350,11 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { value = fuzzed_data.ConsumeIntegralInRange(0, 16777215 / 2); /* max / 2 instead of max + 1 to avoid oom on oss-fuzzer */ sprintf(cfg_param, "lru.%s.size", name); ndpi_set_config(ndpi_info_mod, NULL, cfg_param, cfg_value); + ndpi_get_config(ndpi_info_mod, NULL, cfg_param, cfg_value, sizeof(cfg_value)); value = fuzzed_data.ConsumeIntegralInRange(0, 16777215 + 1); sprintf(cfg_param, "lru.%s.ttl", name); ndpi_set_config(ndpi_info_mod, NULL, cfg_param, cfg_value); + ndpi_get_config(ndpi_info_mod, NULL, cfg_param, cfg_value, sizeof(cfg_value)); } } /* Invalid parameter */ @@ -333,13 +362,19 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { value = fuzzed_data.ConsumeIntegralInRange(0, 1 + 1); sprintf(cfg_value, "%d", value); ndpi_set_config(ndpi_info_mod, NULL, "foo", cfg_value); + ndpi_get_config(ndpi_info_mod, NULL, "foo", cfg_value, sizeof(cfg_value)); } /* Invalid value */ if(fuzzed_data.ConsumeBool()) { sprintf(cfg_value, "%s", "jjj"); ndpi_set_config(ndpi_info_mod, NULL, "lru.stun_zoom.ttl", cfg_value); + ndpi_get_config(ndpi_info_mod, NULL, "lru.stun_zoom.ttl", cfg_value, sizeof(cfg_value)); } + ndpi_add_host_risk_mask(ndpi_info_mod, + (char *)fuzzed_data.ConsumeBytesAsString(32).c_str(), + static_cast<ndpi_risk>(fuzzed_data.ConsumeIntegral<u_int64_t>())); + ndpi_finalize_initialization(ndpi_info_mod); /* Random protocol configuration */ @@ -355,8 +390,26 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { ndpi_is_subprotocol_informative(ndpi_info_mod, pid); ndpi_get_proto_breed(ndpi_info_mod, pid); + ndpi_port_range d_port[MAX_DEFAULT_PORTS] = {}; + ndpi_set_proto_defaults(ndpi_info_mod, 0, 0, NDPI_PROTOCOL_SAFE, pid, + protoname, NDPI_PROTOCOL_CATEGORY_UNSPECIFIED, + d_port, d_port); + ndpi_get_proto_by_name(ndpi_info_mod, NULL); /* Error */ ndpi_get_proto_by_name(ndpi_info_mod, "foo"); /* Invalid protocol */ + ndpi_get_proto_name(ndpi_info_mod, pid); + ndpi_get_protocol_id(ndpi_info_mod, protoname); + + struct in_addr pin; + struct in6_addr pin6; + pin.s_addr = fuzzed_data.ConsumeIntegral<u_int32_t>(); + ndpi_network_port_ptree_match(ndpi_info_mod, &pin, fuzzed_data.ConsumeIntegral<u_int16_t>()); + for(i = 0; i < 16; i++) + pin6.s6_addr[i] = fuzzed_data.ConsumeIntegral<u_int8_t>(); + ndpi_network_port_ptree6_match(ndpi_info_mod, &pin6, fuzzed_data.ConsumeIntegral<u_int16_t>()); + + ndpi_get_host_domain_suffix(ndpi_info_mod, fuzzed_data.ConsumeBool() ? NULL : "www.bbc.co.uk"); + ndpi_get_host_domain(ndpi_info_mod, fuzzed_data.ConsumeBool() ? NULL : "www.bbc.co.uk"); /* Custom category configuration */ cat = fuzzed_data.ConsumeIntegralInRange(static_cast<int>(NDPI_PROTOCOL_CATEGORY_CUSTOM_1), @@ -376,10 +429,10 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { ndpi_self_check_host_match(stdout); - ndpi_dump_protocols(ndpi_info_mod, stdout); - ndpi_generate_options(fuzzed_data.ConsumeIntegralInRange(0, 4), stdout); - ndpi_dump_risks_score(stdout); - ndpi_dump_config(ndpi_info_mod, stdout); + ndpi_dump_protocols(ndpi_info_mod, fuzzed_data.ConsumeBool() ? NULL : stdout); + ndpi_generate_options(fuzzed_data.ConsumeIntegralInRange(0, 4), fuzzed_data.ConsumeBool() ? NULL : stdout); + ndpi_dump_risks_score(fuzzed_data.ConsumeBool() ? NULL : stdout); + ndpi_dump_config(ndpi_info_mod, fuzzed_data.ConsumeBool() ? NULL : stdout); /* Basic code to try testing this "config" */ bool_value = fuzzed_data.ConsumeBool(); @@ -388,6 +441,12 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { memset(&flow, 0, sizeof(flow)); std::vector<uint8_t>pkt = fuzzed_data.ConsumeRemainingBytes<uint8_t>(); + const u_int8_t *l4_return; + u_int16_t l4_len_return; + u_int8_t l4_protocol_return; + ndpi_detection_get_l4(pkt.data(), pkt.size(), &l4_return, &l4_len_return, &l4_protocol_return, NDPI_DETECTION_ONLY_IPV6); + ndpi_detection_get_l4(pkt.data(), pkt.size(), &l4_return, &l4_len_return, &l4_protocol_return, NDPI_DETECTION_ONLY_IPV4); + ndpi_detection_process_packet(ndpi_info_mod, &flow, pkt.data(), pkt.size(), 0, &input_info); p = ndpi_detection_giveup(ndpi_info_mod, &flow, &protocol_was_guessed); @@ -406,7 +465,6 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { ndpi_get_http_method(ndpi_info_mod, bool_value ? &flow : NULL); ndpi_get_http_url(ndpi_info_mod, &flow); ndpi_get_http_content_type(ndpi_info_mod, &flow); - check_for_email_address(ndpi_info_mod, 0); ndpi_get_flow_name(bool_value ? &flow : NULL); /* ndpi_guess_undetected_protocol() is a "strange" function. Try fuzzing it, here */ if(!ndpi_is_protocol_detected(ndpi_info_mod, p)) { @@ -423,7 +481,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { flow.c_address.v4, flow.c_port, flow.s_address.v4, flow.s_port); } else { - ndpi_find_ipv6_category_userdata(ndpi_info_mod, (struct in6_addr *)flow.c_address.v6); + ndpi_find_ipv6_category_userdata(ndpi_info_mod, bool_value ? NULL : (struct in6_addr *)flow.c_address.v6); } /* Another "strange" function: fuzz it here, for lack of a better alternative */ ndpi_search_tcp_or_udp(ndpi_info_mod, &flow); diff --git a/fuzz/fuzz_ds_ahocorasick.cpp b/fuzz/fuzz_ds_ahocorasick.cpp index 3333cad3e..949cc4b6d 100644 --- a/fuzz/fuzz_ds_ahocorasick.cpp +++ b/fuzz/fuzz_ds_ahocorasick.cpp @@ -23,6 +23,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { u_int16_t protocol_id; ndpi_protocol_category_t category; ndpi_protocol_breed_t breed; + u_int32_t unused; /* TODO: real string instead of random bytes */ @@ -120,7 +121,9 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { ndpi_free(value_dup); - ndpi_match_string(a2, (char *)value.c_str()); + ndpi_match_string(a2, fuzzed_data.ConsumeBool() ? NULL : (char *)value.c_str()); + ndpi_match_string_value(a2, fuzzed_data.ConsumeBool() ? NULL : (char *)value.c_str(), + strlen(value.c_str()), &unused); ndpi_match_string_protocol_id(a2, (char *)value.c_str(), strlen(value.c_str()), &protocol_id, &category, &breed); } @@ -133,6 +136,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { ac_automata_search(a, &ac_input_text, &match); ndpi_match_string(a2, value_added); + ndpi_match_string_value(a2, value_added, strlen(value_added), &unused); ndpi_match_string_protocol_id(a2, value_added, strlen(value_added), &protocol_id, &category, &breed); diff --git a/fuzz/fuzz_ds_patricia.cpp b/fuzz/fuzz_ds_patricia.cpp index 58e098b45..1bd2e2d0d 100644 --- a/fuzz/fuzz_ds_patricia.cpp +++ b/fuzz/fuzz_ds_patricia.cpp @@ -20,10 +20,11 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { u_int16_t i, num_iteration, ip_len; ndpi_patricia_tree_t *p, *p_cloned; u_int16_t maxbits; - int is_ipv6, is_added = 0; + int is_added = 0; ndpi_prefix_t prefix, prefix_added; u_char *ip; ndpi_patricia_node_t *node; + int tree_type; /* 0: ipv4, 1: ipv6, 2: mac */ /* Just to have some data */ if (fuzzed_data.remaining_bytes() < 1024) @@ -32,11 +33,13 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { /* To allow memory allocation failures */ fuzz_set_alloc_callbacks_and_seed(size); - is_ipv6 = fuzzed_data.ConsumeBool(); - if (is_ipv6) + tree_type = fuzzed_data.ConsumeIntegralInRange(0, 2); + if (tree_type == 0) + maxbits = 32; + else if (tree_type == 1) maxbits = 128; else - maxbits = 32; + maxbits = 48; p = ndpi_patricia_new(maxbits); @@ -47,7 +50,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { /* "Random" add */ num_iteration = fuzzed_data.ConsumeIntegral<u_int8_t>(); for (i = 0; i < num_iteration; i++) { - if (!is_ipv6) { + if (tree_type == 0) { if(fuzzed_data.remaining_bytes() > 4) { std::vector<u_int8_t>data = fuzzed_data.ConsumeBytes<u_int8_t>(4); ip = data.data(); @@ -67,7 +70,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { assert(ndpi_patricia_get_node_u64(node) == 0); } } - } else { + } else if (tree_type == 1){ if(fuzzed_data.remaining_bytes() > 16) { std::vector<u_int8_t>data = fuzzed_data.ConsumeBytes<u_int8_t>(16); ip = data.data(); @@ -87,6 +90,26 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { assert(ndpi_patricia_get_node_u64(node) == 0); } } + } else { + if(fuzzed_data.remaining_bytes() > 6) { + std::vector<u_int8_t>data = fuzzed_data.ConsumeBytes<u_int8_t>(6); + ip = data.data(); + ip_len = fuzzed_data.ConsumeIntegralInRange(0, 49); /* 49 to force error */ + ndpi_fill_prefix_mac(&prefix, ip, ip_len, 48); + node = ndpi_patricia_lookup(p, &prefix); + /* Keep one random node really added */ + if (node && is_added == 0 && fuzzed_data.ConsumeBool()) { + is_added = 1; + prefix_added = prefix; + /* Some random operations on this node */ + ndpi_patricia_get_node_prefix(node); + ndpi_patricia_get_node_bits(node); + ndpi_patricia_set_node_data(node, NULL); + assert(ndpi_patricia_get_node_data(node) == NULL); + ndpi_patricia_set_node_u64(node, 0); + assert(ndpi_patricia_get_node_u64(node) == 0); + } + } } } @@ -96,7 +119,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { /* "Random" exact search. Remove if found */ num_iteration = fuzzed_data.ConsumeIntegral<u_int8_t>(); for (i = 0; i < num_iteration; i++) { - if (!is_ipv6) { + if (tree_type == 0) { if(fuzzed_data.remaining_bytes() > 4) { std::vector<u_int8_t>data = fuzzed_data.ConsumeBytes<u_int8_t>(4); ip = data.data(); @@ -106,7 +129,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { if (node) ndpi_patricia_remove(p, node); } - } else { + } else if (tree_type == 1) { if(fuzzed_data.remaining_bytes() > 16) { std::vector<u_int8_t>data = fuzzed_data.ConsumeBytes<u_int8_t>(16); ip = data.data(); @@ -116,7 +139,18 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { if (node) ndpi_patricia_remove(p, node); } + } else { + if(fuzzed_data.remaining_bytes() > 6) { + std::vector<u_int8_t>data = fuzzed_data.ConsumeBytes<u_int8_t>(6); + ip = data.data(); + ip_len = fuzzed_data.ConsumeIntegralInRange(0, 48); + ndpi_fill_prefix_mac(&prefix, ip, ip_len, 48); + node = ndpi_patricia_search_exact(p, &prefix); + if (node) + ndpi_patricia_remove(p, node); + } } + } /* Exact search of an added node */ if (is_added) @@ -125,7 +159,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { /* "Random" best search. Remove if found */ num_iteration = fuzzed_data.ConsumeIntegral<u_int8_t>(); for (i = 0; i < num_iteration; i++) { - if (!is_ipv6) { + if (tree_type == 0) { if(fuzzed_data.remaining_bytes() > 4) { std::vector<u_int8_t>data = fuzzed_data.ConsumeBytes<u_int8_t>(4); ip = data.data(); @@ -135,7 +169,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { if (node) ndpi_patricia_remove(p, node); } - } else { + } else if (tree_type == 1) { if(fuzzed_data.remaining_bytes() > 16) { std::vector<u_int8_t>data = fuzzed_data.ConsumeBytes<u_int8_t>(16); ip = data.data(); @@ -145,6 +179,16 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { if (node) ndpi_patricia_remove(p, node); } + } else { + if(fuzzed_data.remaining_bytes() > 6) { + std::vector<u_int8_t>data = fuzzed_data.ConsumeBytes<u_int8_t>(6); + ip = data.data(); + ip_len = fuzzed_data.ConsumeIntegralInRange(0, 48); + ndpi_fill_prefix_mac(&prefix, ip, ip_len, 48); + node = ndpi_patricia_search_best(p, &prefix); + if (node) + ndpi_patricia_remove(p, node); + } } } /* Best search of an added node */ diff --git a/fuzz/fuzz_filecfg_category.c b/fuzz/fuzz_filecfg_category.c new file mode 100644 index 000000000..757ada01f --- /dev/null +++ b/fuzz/fuzz_filecfg_category.c @@ -0,0 +1,27 @@ +#include "ndpi_api.h" +#include "ndpi_private.h" +#include "fuzz_common_code.h" + +int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { + struct ndpi_detection_module_struct *ndpi_struct; + FILE *fd; + NDPI_PROTOCOL_BITMASK all; + + /* To allow memory allocation failures */ + fuzz_set_alloc_callbacks_and_seed(size); + + ndpi_struct = ndpi_init_detection_module(); + NDPI_BITMASK_SET_ALL(all); + ndpi_set_protocol_detection_bitmask2(ndpi_struct, &all); + + ndpi_set_config(ndpi_struct, NULL, "log.level", "3"); + ndpi_set_config(ndpi_struct, "all", "log", "1"); + + fd = buffer_to_file(data, size); + load_category_file_fd(ndpi_struct, fd, NDPI_PROTOCOL_CATEGORY_VOIP /* random category */); + if(fd) + fclose(fd); + + ndpi_exit_detection_module(ndpi_struct); + return 0; +} diff --git a/fuzz/ipv4_addresses.txt b/fuzz/ipv4_addresses.txt index 209765e5a..76065bd2a 100644 --- a/fuzz/ipv4_addresses.txt +++ b/fuzz/ipv4_addresses.txt @@ -3,4 +3,5 @@ 192.168.5.5 192.168.5.6/32 192.168.4.0/24 +192.168.4.1 diff --git a/src/include/ndpi_api.h b/src/include/ndpi_api.h index 27386966e..d2d122cb0 100644 --- a/src/include/ndpi_api.h +++ b/src/include/ndpi_api.h @@ -388,23 +388,6 @@ extern "C" { struct ndpi_proto * ndpi_proto); /** - * API call that is called internally by ndpi_detection_process_packet or by apps - * that want to avoid calling ndpi_detection_process_packet as they have already - * parsed the packet and thus want to avoid this. - * - * - * @par ndpi_struct = the detection module - * @par flow = the flow given for the detection module - * @par ndpi_selection_bitmask = the protocol selected bitmask - * @return number of protocol dissector that have been tried (0 = no more dissectors) - * - */ - u_int32_t ndpi_check_flow_func(struct ndpi_detection_module_struct *ndpi_struct, - struct ndpi_flow_struct *flow, - NDPI_SELECTION_BITMASK_PROTOCOL_SIZE *ndpi_selection_packet); - - - /** * Query the pointer to the layer 4 packet * * @par l3 = pointer to the layer 3 data diff --git a/src/include/ndpi_private.h b/src/include/ndpi_private.h index 06e6eaed1..b7c93d60d 100644 --- a/src/include/ndpi_private.h +++ b/src/include/ndpi_private.h @@ -265,7 +265,6 @@ struct ndpi_detection_module_struct { u_int ndpi_num_supported_protocols; u_int ndpi_num_custom_protocols; - int ac_automa_finalized; /* HTTP/DNS/HTTPS/QUIC host matching */ ndpi_automa host_automa, /* Used for DNS/HTTPS */ risky_domain_automa, tls_cert_subject_automa, @@ -414,9 +413,6 @@ u_int8_t ips_match(u_int32_t src, u_int32_t dst, u_int8_t ends_with(struct ndpi_detection_module_struct *ndpi_struct, char *str, char *ends); -u_int16_t check_for_email_address(struct ndpi_detection_module_struct *ndpi_struct, - u_int16_t counter); - u_int ndpi_search_tcp_or_udp_raw(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow, u_int8_t protocol, @@ -434,7 +430,8 @@ int load_malicious_sha1_file_fd(struct ndpi_detection_module_struct *ndpi_str, F int load_malicious_ja3_file_fd(struct ndpi_detection_module_struct *ndpi_str, FILE *fd); int load_risk_domain_file_fd(struct ndpi_detection_module_struct *ndpi_str, FILE *fd); int load_config_file_fd(struct ndpi_detection_module_struct *ndpi_str, FILE *fd); - +int load_category_file_fd(struct ndpi_detection_module_struct *ndpi_str, + FILE *fd, ndpi_protocol_category_t category_id); /* TLS */ int processClientServerHello(struct ndpi_detection_module_struct *ndpi_struct, diff --git a/src/lib/ndpi_domains.c b/src/lib/ndpi_domains.c index aeb34b010..ff7fd52cb 100644 --- a/src/lib/ndpi_domains.c +++ b/src/lib/ndpi_domains.c @@ -82,6 +82,8 @@ int ndpi_load_domain_suffixes(struct ndpi_detection_module_struct *ndpi_str, const char* ndpi_get_host_domain_suffix(struct ndpi_detection_module_struct *ndpi_str, const char *hostname) { + if(!ndpi_str) + return NULL; if(ndpi_str->public_domain_suffixes == NULL) return(hostname); else { @@ -96,6 +98,8 @@ const char* ndpi_get_host_domain_suffix(struct ndpi_detection_module_struct *ndp const char* ndpi_get_host_domain(struct ndpi_detection_module_struct *ndpi_str, const char *hostname) { + if(!ndpi_str) + return NULL; if(ndpi_str->public_domain_suffixes == NULL) return(hostname); else { diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index e9044dfd2..5fe52dd04 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -307,18 +307,14 @@ u_int16_t ndpi_get_proto_by_name(struct ndpi_detection_module_struct *ndpi_str, /* ************************************************************************************* */ /* ************************************************************************************* */ -void ndpi_add_user_proto_id_mapping(struct ndpi_detection_module_struct *ndpi_str, - u_int16_t ndpi_proto_id, u_int16_t user_proto_id) { - if(ndpi_proto_id < NDPI_MAX_SUPPORTED_PROTOCOLS) - return; /* Nothing to map */ - -#ifdef NDPI_ENABLE_DEBUG_MESSAGES +static void ndpi_add_user_proto_id_mapping(struct ndpi_detection_module_struct *ndpi_str, + u_int16_t ndpi_proto_id, u_int16_t user_proto_id) { NDPI_LOG_DBG2(ndpi_str, "[DEBUG] *** %u (>= %u)-> %u\n", ndpi_proto_id, NDPI_MAX_SUPPORTED_PROTOCOLS, user_proto_id); -#endif - ndpi_str->ndpi_to_user_proto_id[ndpi_proto_id-NDPI_MAX_SUPPORTED_PROTOCOLS] = user_proto_id; + if(ndpi_proto_id >= NDPI_MAX_SUPPORTED_PROTOCOLS) + ndpi_str->ndpi_to_user_proto_id[ndpi_proto_id-NDPI_MAX_SUPPORTED_PROTOCOLS] = user_proto_id; } /* ************************************************************************************* */ @@ -327,11 +323,9 @@ void ndpi_add_user_proto_id_mapping(struct ndpi_detection_module_struct *ndpi_st u_int16_t ndpi_map_user_proto_id_to_ndpi_id(struct ndpi_detection_module_struct *ndpi_str, u_int16_t user_proto_id) { -#ifdef NDPI_ENABLE_DEBUG_MESSAGES #if 0 /* Too much verbose... */ NDPI_LOG_DBG2(ndpi_str, "[DEBUG] ***** %s(%u)\n", __FUNCTION__, user_proto_id); #endif -#endif if(!ndpi_str) return(0); @@ -359,11 +353,9 @@ u_int16_t ndpi_map_user_proto_id_to_ndpi_id(struct ndpi_detection_module_struct /* Map an internal nDPI protocol id to a custom user protocol */ u_int16_t ndpi_map_ndpi_id_to_user_proto_id(struct ndpi_detection_module_struct *ndpi_str, u_int16_t ndpi_proto_id) { -#ifdef NDPI_ENABLE_DEBUG_MESSAGES #if 0 /* Too much verbose... */ NDPI_LOG_DBG2(ndpi_str, "[DEBUG] ***** %s(%u)\n", __FUNCTION__, ndpi_proto_id); #endif -#endif if(!ndpi_str) return(0); @@ -561,6 +553,9 @@ void ndpi_set_proto_defaults(struct ndpi_detection_module_struct *ndpi_str, char *name; int j; + if(!ndpi_str || !protoName) + return; + if(!ndpi_is_valid_protoId(protoId)) { NDPI_LOG_ERR(ndpi_str, "[NDPI] %s/protoId=%d: INTERNAL ERROR\n", protoName, protoId); return; @@ -577,9 +572,6 @@ void ndpi_set_proto_defaults(struct ndpi_detection_module_struct *ndpi_str, return; } - if(ndpi_str->proto_defaults[protoId].protoName) - ndpi_free(ndpi_str->proto_defaults[protoId].protoName); - ndpi_str->proto_defaults[protoId].isClearTextProto = is_cleartext; /* is_appprotocol=1 means that this is only an application protocol layered @@ -2387,6 +2379,8 @@ int ndpi_fill_prefix_v6(ndpi_prefix_t *prefix, const struct in6_addr *addr, int /* ******************************************* */ int ndpi_fill_prefix_mac(ndpi_prefix_t *prefix, u_int8_t *mac, int bits, int maxbits) { + memset(prefix, 0, sizeof(ndpi_prefix_t)); + if(bits < 0 || bits > maxbits) return -1; @@ -2618,9 +2612,6 @@ static ndpi_patricia_node_t* add_to_ptree(ndpi_patricia_tree_t *tree, int family ndpi_prefix_t prefix; ndpi_patricia_node_t *node; - if(!tree) - return(NULL); - if(family == AF_INET) ndpi_fill_prefix_v4(&prefix, (struct in_addr *) addr, bits, tree->maxbits); else @@ -2758,9 +2749,6 @@ static int ndpi_add_host_ip_subprotocol(struct ndpi_detection_module_struct *ndp bool value_ready = false; struct addrinfo hints, *result, *rp; - if(!ndpi_str->protocols_ptree) - return(-1); - if(value[0] == '[') { is_ipv6 = 1; bits = 128; @@ -2815,7 +2803,7 @@ static int ndpi_add_host_ip_subprotocol(struct ndpi_detection_module_struct *ndp hints.ai_socktype = SOCK_STREAM; hints.ai_flags = AI_CANONNAME; - if(!is_ipv6) { + if(!is_ipv6 && ndpi_str->protocols_ptree) { /* Check if the IP address is symbolic or numeric */ unsigned int d[4]; char tail[16] = { '\0' }; @@ -2848,7 +2836,7 @@ static int ndpi_add_host_ip_subprotocol(struct ndpi_detection_module_struct *ndp } node = add_to_ptree(ndpi_str->protocols_ptree, AF_INET, &pin, bits); - } else { + } else if(is_ipv6 && ndpi_str->protocols_ptree6) { if(strchr(value, ':') == NULL) { /* This might be a symbolic IPv6 address */ @@ -2875,6 +2863,8 @@ static int ndpi_add_host_ip_subprotocol(struct ndpi_detection_module_struct *ndp } node = add_to_ptree(ndpi_str->protocols_ptree6, AF_INET6, &pin6, bits); + } else { + return(-1); } if(node != NULL) { @@ -2884,7 +2874,6 @@ static int ndpi_add_host_ip_subprotocol(struct ndpi_detection_module_struct *ndp for(i=0; i<UV16_MAX_USER_VALUES; i++) { if(node->value.u.uv16[i].user_value == 0) { node->value.u.uv16[i].user_value = protocol_id, node->value.u.uv16[i].additional_user_value = htons(port); - return(0); } } /* for */ @@ -2919,9 +2908,9 @@ void set_ndpi_flow_free(void (*__ndpi_flow_free)(void *ptr)) { _ndpi_flow_free = __ndpi_flow_free; } +#ifdef NDPI_ENABLE_DEBUG_MESSAGES void ndpi_debug_printf(unsigned int proto, struct ndpi_detection_module_struct *ndpi_str, ndpi_log_level_t log_level, const char *file_name, const char *func_name, unsigned int line_number, const char *format, ...) { -#ifdef NDPI_ENABLE_DEBUG_MESSAGES va_list args; #define MAX_STR_LEN 250 char str[MAX_STR_LEN]; @@ -2941,8 +2930,8 @@ void ndpi_debug_printf(unsigned int proto, struct ndpi_detection_module_struct * } #endif -#endif } +#endif /* ****************************************** */ @@ -3273,8 +3262,6 @@ static void ndpi_add_domain_risk_exceptions(struct ndpi_detection_module_struct u_int i; ndpi_risk mask = ((ndpi_risk)-1); - if(!ndpi_str) return; - for(i=0; risks_to_mask[i] != NDPI_NO_RISK; i++) mask &= ~(1ULL << risks_to_mask[i]); @@ -3611,8 +3598,6 @@ int ndpi_finalize_initialization(struct ndpi_detection_module_struct *ndpi_str) } } - if(ndpi_str->ac_automa_finalized) return -1; - ndpi_automa * const automa[] = { &ndpi_str->host_automa, &ndpi_str->tls_cert_subject_automa, &ndpi_str->host_risk_mask_automa, @@ -3625,8 +3610,6 @@ int ndpi_finalize_initialization(struct ndpi_detection_module_struct *ndpi_str) ac_automata_finalize((AC_AUTOMATA_t *) a->ac_automa); } - ndpi_str->ac_automa_finalized = 1; - if(ndpi_str->cfg.tls_app_blocks_tracking_enabled) { ndpi_str->num_tls_blocks_to_follow = NDPI_MAX_NUM_TLS_APPL_BLOCKS; ndpi_str->skip_tls_blocks_until_change_cipher = 1; @@ -4168,7 +4151,7 @@ static u_int16_t guess_protocol_id(struct ndpi_detection_module_struct *ndpi_str if(flow) { /* Run some basic consistency tests */ - if(packet->payload_packet_len < sizeof(struct ndpi_icmphdr)) + if(packet->payload_packet_len < sizeof(struct ndpi_icmp6hdr)) ndpi_set_risk(ndpi_str, flow, NDPI_MALFORMED_PACKET, NULL); else { u_int8_t icmp6_type = (u_int8_t)packet->payload[0]; @@ -4699,26 +4682,35 @@ int load_categories_file_fd(struct ndpi_detection_module_struct *ndpi_str, */ int ndpi_load_category_file(struct ndpi_detection_module_struct *ndpi_str, char *path, ndpi_protocol_category_t category_id) { - char buffer[256], *line; + int rc; FILE *fd; - u_int num_loaded = 0; - unsigned int failed_lines = 0; - unsigned int lines_read = 0; - if(!ndpi_str || !path || !ndpi_str->protocols_ptree) - return(0); - -#ifdef NDPI_ENABLE_DEBUG_MESSAGES - // printf("Loading %s [proto %d]\n", path, category_id); -#endif + if(!ndpi_str || !path) + return(-1); fd = fopen(path, "r"); - if(fd == NULL) { NDPI_LOG_ERR(ndpi_str, "Unable to open file %s [%s]\n", path, strerror(errno)); - return(0); + return -1; } + rc = load_category_file_fd(ndpi_str, fd, category_id); + + fclose(fd); + + return rc; +} + +int load_category_file_fd(struct ndpi_detection_module_struct *ndpi_str, + FILE *fd, ndpi_protocol_category_t category_id) { + char buffer[256], *line; + u_int num_loaded = 0; + unsigned int failed_lines = 0; + unsigned int lines_read = 0; + + if(!ndpi_str || !fd || !ndpi_str->protocols_ptree) + return(0); + while(1) { int len; @@ -4731,8 +4723,8 @@ int ndpi_load_category_file(struct ndpi_detection_module_struct *ndpi_str, len = strlen(line); if(len <= 1 || len == sizeof(buffer) - 1) { - NDPI_LOG_ERR(ndpi_str, "[NDPI] Failed to read file '%s' line #%u, line too short/long\n", - path, lines_read); + NDPI_LOG_ERR(ndpi_str, "[NDPI] Failed to read file line #%u, line too short/long\n", + lines_read); failed_lines++; continue; } else if (line[0] == '#') @@ -4752,8 +4744,8 @@ int ndpi_load_category_file(struct ndpi_detection_module_struct *ndpi_str, if (i != len - 2 && i != len - 1) { - NDPI_LOG_ERR(ndpi_str, "[NDPI] Failed to read file '%s' line #%u, invalid characters found\n", - path, lines_read); + NDPI_LOG_ERR(ndpi_str, "[NDPI] Failed to read file line #%u, invalid characters found\n", + lines_read); failed_lines++; continue; } @@ -4762,7 +4754,6 @@ int ndpi_load_category_file(struct ndpi_detection_module_struct *ndpi_str, num_loaded++; } - fclose(fd); if(failed_lines) return(-1 * failed_lines); return(num_loaded); @@ -4839,9 +4830,6 @@ static int ndpi_load_risky_domain(struct ndpi_detection_module_struct *ndpi_str, ac_automata_name(ndpi_str->risky_domain_automa.ac_automa, "risky", 0); } - if(!ndpi_str->risky_domain_automa.ac_automa) - return -1; - return ndpi_string_to_automa(ndpi_str, (AC_AUTOMATA_t *)ndpi_str->risky_domain_automa.ac_automa, domain_name, 1, 0, 0, 0, 1); /* domain, protocol, category, breed, level , at_end */ } @@ -6336,9 +6324,6 @@ static int ndpi_init_packet(struct ndpi_detection_module_struct *ndpi_str, u_int8_t l4protocol; u_int8_t l4_result; - if(!flow) - return(1); - /* need at least 20 bytes for ip header */ if(packetlen < 20) return 1; @@ -6577,11 +6562,8 @@ static int tcp_ack_padding(struct ndpi_packet_struct *packet) { return 0; } -void ndpi_connection_tracking(struct ndpi_detection_module_struct *ndpi_str, - struct ndpi_flow_struct *flow) { - if(!flow) { - return; - } else { +static void ndpi_connection_tracking(struct ndpi_detection_module_struct *ndpi_str, + struct ndpi_flow_struct *flow) { /* const for gcc code optimization and cleaner code */ struct ndpi_packet_struct *packet = &ndpi_str->packet; const struct ndpi_iphdr *iph = packet->iph; @@ -6816,7 +6798,6 @@ void ndpi_connection_tracking(struct ndpi_detection_module_struct *ndpi_str, ndpi_unset_risk(ndpi_str, flow, NDPI_UNIDIRECTIONAL_TRAFFIC); /* Clear bit */ } } - } } /* ************************************************ */ @@ -6969,12 +6950,10 @@ static u_int32_t check_ndpi_tcp_flow_func(struct ndpi_detection_module_struct *n /* ********************************************************************************* */ -u_int32_t ndpi_check_flow_func(struct ndpi_detection_module_struct *ndpi_str, - struct ndpi_flow_struct *flow, - NDPI_SELECTION_BITMASK_PROTOCOL_SIZE *ndpi_selection_packet) { - if(!flow) - return(0); - else if(ndpi_str->packet.tcp != NULL) +static u_int32_t ndpi_check_flow_func(struct ndpi_detection_module_struct *ndpi_str, + struct ndpi_flow_struct *flow, + NDPI_SELECTION_BITMASK_PROTOCOL_SIZE *ndpi_selection_packet) { + if(ndpi_str->packet.tcp != NULL) return(check_ndpi_tcp_flow_func(ndpi_str, flow, ndpi_selection_packet)); else if(ndpi_str->packet.udp != NULL) return(check_ndpi_udp_flow_func(ndpi_str, flow, ndpi_selection_packet)); @@ -8695,90 +8674,6 @@ void ndpi_parse_packet_line_info_any(struct ndpi_detection_module_struct *ndpi_s /* ********************************************************************************* */ -u_int16_t check_for_email_address(struct ndpi_detection_module_struct *ndpi_str, - u_int16_t counter) { - struct ndpi_packet_struct *packet; - - if(!ndpi_str) - return(0); - - packet = &ndpi_str->packet; - NDPI_LOG_DBG2(ndpi_str, "called ndpi_check_for_email_address\n"); - - if(packet->payload_packet_len > counter && ((packet->payload[counter] >= 'a' && packet->payload[counter] <= 'z') || - (packet->payload[counter] >= 'A' && packet->payload[counter] <= 'Z') || - (packet->payload[counter] >= '0' && packet->payload[counter] <= '9') || - packet->payload[counter] == '-' || packet->payload[counter] == '_')) { - NDPI_LOG_DBG2(ndpi_str, "first letter\n"); - counter++; - while(packet->payload_packet_len > counter && - ((packet->payload[counter] >= 'a' && packet->payload[counter] <= 'z') || - (packet->payload[counter] >= 'A' && packet->payload[counter] <= 'Z') || - (packet->payload[counter] >= '0' && packet->payload[counter] <= '9') || - packet->payload[counter] == '-' || packet->payload[counter] == '_' || - packet->payload[counter] == '.')) { - NDPI_LOG_DBG2(ndpi_str, "further letter\n"); - counter++; - if(packet->payload_packet_len > counter && packet->payload[counter] == '@') { - NDPI_LOG_DBG2(ndpi_str, "@\n"); - counter++; - while(packet->payload_packet_len > counter && - ((packet->payload[counter] >= 'a' && packet->payload[counter] <= 'z') || - (packet->payload[counter] >= 'A' && packet->payload[counter] <= 'Z') || - (packet->payload[counter] >= '0' && packet->payload[counter] <= '9') || - packet->payload[counter] == '-' || packet->payload[counter] == '_')) { - NDPI_LOG_DBG2(ndpi_str, "letter\n"); - counter++; - if(packet->payload_packet_len > counter && packet->payload[counter] == '.') { - NDPI_LOG_DBG2(ndpi_str, ".\n"); - counter++; - if(packet->payload_packet_len > counter + 1 && - ((packet->payload[counter] >= 'a' && packet->payload[counter] <= 'z') && - (packet->payload[counter + 1] >= 'a' && packet->payload[counter + 1] <= 'z'))) { - NDPI_LOG_DBG2(ndpi_str, "two letters\n"); - counter += 2; - if(packet->payload_packet_len > counter && - (packet->payload[counter] == ' ' || packet->payload[counter] == ';')) { - NDPI_LOG_DBG2(ndpi_str, "whitespace1\n"); - return(counter); - } else if(packet->payload_packet_len > counter && packet->payload[counter] >= 'a' && - packet->payload[counter] <= 'z') { - NDPI_LOG_DBG2(ndpi_str, "one letter\n"); - counter++; - if(packet->payload_packet_len > counter && - (packet->payload[counter] == ' ' || packet->payload[counter] == ';')) { - NDPI_LOG_DBG2(ndpi_str, "whitespace2\n"); - return(counter); - } else if(packet->payload_packet_len > counter && packet->payload[counter] >= 'a' && - packet->payload[counter] <= 'z') { - counter++; - if(packet->payload_packet_len > counter && - (packet->payload[counter] == ' ' || packet->payload[counter] == ';')) { - NDPI_LOG_DBG2(ndpi_str, "whitespace3\n"); - return(counter); - } else { - return(0); - } - } else { - return(0); - } - } else { - return(0); - } - } else { - return(0); - } - } - } - return(0); - } - } - } - return(0); -} - -/* ********************************************************************************* */ - u_int8_t ndpi_detection_get_l4(const u_int8_t *l3, u_int16_t l3_len, const u_int8_t **l4_return, u_int16_t *l4_len_return, u_int8_t *l4_protocol_return, u_int32_t flags) { return(ndpi_detection_get_l4_internal(NULL, l3, l3_len, l4_return, l4_len_return, l4_protocol_return, flags)); @@ -8854,9 +8749,6 @@ void ndpi_get_flow_ndpi_proto(struct ndpi_detection_module_struct *ndpi_str, str static void ndpi_int_change_flow_protocol(struct ndpi_detection_module_struct *ndpi_str, struct ndpi_flow_struct *flow, u_int16_t upper_detected_protocol, u_int16_t lower_detected_protocol, ndpi_confidence_t confidence) { - if(!flow) - return; - flow->detected_protocol_stack[0] = upper_detected_protocol, flow->detected_protocol_stack[1] = lower_detected_protocol; flow->confidence = confidence; @@ -8890,21 +8782,6 @@ void change_category(struct ndpi_detection_module_struct *ndpi_str, struct ndpi_ /* ********************************************************************************* */ -void NDPI_PROTOCOL_IP_clear(ndpi_ip_addr_t *ip) { - memset(ip, 0, sizeof(ndpi_ip_addr_t)); -} - -/* ********************************************************************************* */ - -#ifdef CODE_UNUSED -/* NTOP */ -int NDPI_PROTOCOL_IP_is_set(const ndpi_ip_addr_t *ip) { - return(memcmp(ip, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", sizeof(ndpi_ip_addr_t)) != 0); -} -#endif - -/* ********************************************************************************* */ - u_int8_t ndpi_is_ipv6(const ndpi_ip_addr_t *ip) { return(ip->ipv6.u6_addr.u6_addr32[1] != 0 || ip->ipv6.u6_addr.u6_addr32[2] != 0 || ip->ipv6.u6_addr.u6_addr32[3] != 0); @@ -9331,7 +9208,7 @@ char *ndpi_get_proto_breed_name(struct ndpi_detection_module_struct *ndpi_str, int ndpi_get_protocol_id(struct ndpi_detection_module_struct *ndpi_str, char *proto) { int i; - if(!ndpi_str) return(-1); + if(!ndpi_str || !proto) return(-1); for(i = 0; i < (int) ndpi_str->ndpi_num_supported_protocols; i++) if(ndpi_str->proto_defaults[i].protoName && @@ -9438,6 +9315,9 @@ void ndpi_generate_options(u_int opt, FILE *options_out) { void ndpi_dump_risks_score(FILE *risk_out) { u_int i; + if(!risk_out) + return; + fprintf(risk_out, "%3s %-48s %-8s %s %-8s %-8s\n", "Id", "Risk", "Severity", "Score", "CliScore", "SrvScore"); @@ -9566,8 +9446,6 @@ static u_int16_t ndpi_automa_match_string_subprotocol(struct ndpi_detection_modu ndpi_protocol_match_result *ret_match) { int matching_protocol_id; - if(!ndpi_str) return(NDPI_PROTOCOL_UNKNOWN); - matching_protocol_id = ndpi_match_string_subprotocol(ndpi_str, string_to_match, string_to_match_len, ret_match); @@ -10979,7 +10857,7 @@ char *ndpi_dump_config(struct ndpi_detection_module_struct *ndpi_str, /* TODO */ case CFG_PARAM_PROTOCOL_ENABLE_DISABLE: fprintf(fd, " *) %s %s: %s [all %s]", - c->proto ? c->proto : "NULL", + c->proto, c->param, /* TODO */ _get_param_protocol_enable_disable((void *)((char *)&ndpi_str->cfg + c->offset), "any", buf, sizeof(buf)), c->default_value); diff --git a/tests/cfgs/default/pcap/custom_rules_ipv6.pcapng b/tests/cfgs/default/pcap/custom_rules_ipv6.pcapng Binary files differindex 8283b1f47..c5106a90c 100644 --- a/tests/cfgs/default/pcap/custom_rules_ipv6.pcapng +++ b/tests/cfgs/default/pcap/custom_rules_ipv6.pcapng diff --git a/tests/cfgs/default/result/custom_rules_ipv6.pcapng.out b/tests/cfgs/default/result/custom_rules_ipv6.pcapng.out index ae3b3ec29..81664f172 100644 --- a/tests/cfgs/default/result/custom_rules_ipv6.pcapng.out +++ b/tests/cfgs/default/result/custom_rules_ipv6.pcapng.out @@ -1,14 +1,15 @@ -DPI Packets (UDP): 5 (1.00 pkts/flow) -Confidence Match by custom rule: 5 (flows) -Num dissector calls: 0 (0.00 diss/flow) +DPI Packets (UDP): 7 (1.00 pkts/flow) +Confidence Unknown : 1 (flows) +Confidence Match by custom rule: 6 (flows) +Num dissector calls: 127 (18.14 diss/flow) LRU cache ookla: 0/0/0 (insert/search/found) -LRU cache bittorrent: 0/0/0 (insert/search/found) +LRU cache bittorrent: 0/3/0 (insert/search/found) LRU cache zoom: 0/0/0 (insert/search/found) LRU cache stun: 0/0/0 (insert/search/found) LRU cache tls_cert: 0/0/0 (insert/search/found) -LRU cache mining: 0/0/0 (insert/search/found) +LRU cache mining: 0/1/0 (insert/search/found) LRU cache msteams: 0/0/0 (insert/search/found) -LRU cache stun_zoom: 0/0/0 (insert/search/found) +LRU cache stun_zoom: 0/1/0 (insert/search/found) Automa host: 0/0 (search/found) Automa domain: 0/0 (search/found) Automa tls cert: 0/0 (search/found) @@ -17,20 +18,28 @@ Automa common alpns: 0/0 (search/found) Patricia risk mask: 0/0 (search/found) Patricia risk mask IPv6: 0/0 (search/found) Patricia risk: 0/0 (search/found) -Patricia risk IPv6: 0/0 (search/found) +Patricia risk IPv6: 1/0 (search/found) Patricia protocols: 0/0 (search/found) -Patricia protocols IPv6: 9/5 (search/found) +Patricia protocols IPv6: 13/6 (search/found) +Unknown 1 318 1 CustomProtocolD 2 600 1 CustomProtocolE 1 1287 1 CustomProtocolF 1 1287 1 CustomProtocolG 1 318 1 CustomProtocolH 1 318 1 +CustomProtocolI 1 318 1 -Acceptable 6 3810 5 +Acceptable 7 4128 6 +Unrated 1 318 1 1 UDP [247f:855b:5e16:3caf:3f2c:4134:9592:661b]:100 -> [21bc:b273:7f68:88d7:77a8:585:3990:927b]:1991 [proto: 2048/CustomProtocolE][IP: 2048/CustomProtocolE][ClearText][Confidence: Match by custom rule][DPI packets: 1][1 pkts/1287 bytes -> 0 pkts/0 bytes][Goodput ratio: 95/0][< 1 sec][Risk: ** Unidirectional Traffic **][Risk Score: 10][Risk Info: No client to server traffic][Plen Bins: 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,100,0,0,0,0,0,0,0,0,0] 2 UDP [247f:855b:5e16:3caf:3f2c:4134:9592:661b]:36098 -> [21bc:b273:7f68:88d7:77a8:585:3990:927b]:50621 [proto: 2049/CustomProtocolF][IP: 2049/CustomProtocolF][ClearText][Confidence: Match by custom rule][DPI packets: 1][1 pkts/1287 bytes -> 0 pkts/0 bytes][Goodput ratio: 95/0][< 1 sec][Risk: ** Unidirectional Traffic **][Risk Score: 10][Risk Info: No server to client traffic][Plen Bins: 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,100,0,0,0,0,0,0,0,0,0] 3 UDP [3ffe:507::1:200:86ff:fe05:80da]:21554 <-> [3ffe:501:4819::42]:5333 [proto: 1024/CustomProtocolD][IP: 1024/CustomProtocolD][ClearText][Confidence: Match by custom rule][DPI packets: 1][1 pkts/90 bytes <-> 1 pkts/510 bytes][Goodput ratio: 31/88][0.07 sec][PLAIN TEXT (itojun)][Plen Bins: 50,0,0,0,0,0,0,0,0,0,0,0,0,0,50,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] 4 UDP [fe80::76ac:b9ff:fe6c:c124]:12717 -> [ff02::1]:64315 [proto: 2050/CustomProtocolG][IP: 2050/CustomProtocolG][ClearText][Confidence: Match by custom rule][DPI packets: 1][1 pkts/318 bytes -> 0 pkts/0 bytes][Goodput ratio: 80/0][< 1 sec][PLAIN TEXT (BZ.qca956)][Plen Bins: 0,0,0,0,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] 5 UDP [fe80::76ac:b9ff:fe6c:c124]:12718 -> [ff02::1]:26993 [proto: 65535/CustomProtocolH][IP: 65535/CustomProtocolH][ClearText][Confidence: Match by custom rule][DPI packets: 1][1 pkts/318 bytes -> 0 pkts/0 bytes][Goodput ratio: 80/0][< 1 sec][PLAIN TEXT (BZ.qca956)][Plen Bins: 0,0,0,0,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] + 6 UDP [fe80::76ac:b9ff:fe6c:c124]:12719 -> [ff02::1]:26993 [proto: 65534/CustomProtocolI][IP: 65534/CustomProtocolI][ClearText][Confidence: Match by custom rule][DPI packets: 1][1 pkts/318 bytes -> 0 pkts/0 bytes][Goodput ratio: 80/0][< 1 sec][PLAIN TEXT (BZ.qca956)][Plen Bins: 0,0,0,0,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] + + +Undetected flows: + 1 UDP [fe80::76ac:b9ff:fedd:a1e2]:12719 -> [ff02::1]:26993 [proto: 0/Unknown][IP: 0/Unknown][ClearText][Confidence: Unknown][DPI packets: 1][1 pkts/318 bytes -> 0 pkts/0 bytes][Goodput ratio: 80/0][< 1 sec][PLAIN TEXT (BZ.qca956)][Plen Bins: 0,0,0,0,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] diff --git a/tests/ossfuzz.sh b/tests/ossfuzz.sh index d41454b2d..37e933c0f 100644 --- a/tests/ossfuzz.sh +++ b/tests/ossfuzz.sh @@ -60,6 +60,7 @@ cp example/risky_domains.txt $OUT/ cp example/ja3_fingerprints.csv $OUT/ cp example/sha1_fingerprints.csv $OUT/ cp example/config.txt $OUT/ +cp lists/public_suffix_list.dat $OUT/ cp fuzz/ipv4_addresses.txt $OUT/ cp fuzz/bd_param.txt $OUT/ cp fuzz/splt_param.txt $OUT/ |