aboutsummaryrefslogtreecommitdiff
path: root/fuzz
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2024-04-08 10:24:51 +0200
committerGitHub <noreply@github.com>2024-04-08 10:24:51 +0200
commit1b3ef7d7b2dde9d58cb217d3d7fb6b14d6281153 (patch)
tree868ce2beb4ba9dbfbe40dd05c9a1b200e367439c /fuzz
parentf5905a62c7fc1922d0b49e9399d56e8cfee69516 (diff)
STUN: improve extraction of Mapped-Address metadata (#2370)
Enable parsing of Mapped-Address attribute for all STUN flows: that means that STUN classification might require more packets. Add a configuration knob to enable/disable this feature. Note that we can have (any) STUN metadata also for flows *not* classified as STUN (because of DTLS). Add support for ipv6. Restore the correct extra dissection logic for Telegram flows.
Diffstat (limited to 'fuzz')
-rw-r--r--fuzz/fuzz_config.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/fuzz/fuzz_config.cpp b/fuzz/fuzz_config.cpp
index 2453b469e..3654e583e 100644
--- a/fuzz/fuzz_config.cpp
+++ b/fuzz/fuzz_config.cpp
@@ -181,6 +181,11 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
if(fuzzed_data.ConsumeBool()) {
value = fuzzed_data.ConsumeIntegralInRange(0, 1 + 1);
sprintf(cfg_value, "%d", value);
+ ndpi_set_config(ndpi_info_mod, "stun", "metadata.attribute.mapped_address", cfg_value);
+ }
+ if(fuzzed_data.ConsumeBool()) {
+ value = fuzzed_data.ConsumeIntegralInRange(0, 1 + 1);
+ sprintf(cfg_value, "%d", value);
ndpi_set_config(ndpi_info_mod, "dns", "subclassification", cfg_value);
}
if(fuzzed_data.ConsumeBool()) {