From c3ba65311e2cf4aba8b51cdb6800a5654ef1d060 Mon Sep 17 00:00:00 2001 From: Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> Date: Fri, 12 Jul 2024 14:22:25 +0200 Subject: fuzzing: improve coverage (#2495) Fix detection of WebDAV and Gnutella (over HTTP) Fix detection of z3950 Add two fuzzers to test `ndpi_memmem()` and `ndpi_strnstr()` Remove some dead code: * RTP: the same exact check is performed at the very beginning of the function * MQTT: use a better helper to exclude the protocol * Colletd: `ndpi_hostname_sni_set()` never fails Update pl7m code (fix a Use-of-uninitialized-value error) --- src/lib/protocols/http.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/lib/protocols/http.c') diff --git a/src/lib/protocols/http.c b/src/lib/protocols/http.c index bfb47f514..c57ed8441 100644 --- a/src/lib/protocols/http.c +++ b/src/lib/protocols/http.c @@ -1086,12 +1086,18 @@ static struct l_string { STATIC_STRING_L("DELETE "), STATIC_STRING_L("CONNECT "), STATIC_STRING_L("PROPFIND "), + STATIC_STRING_L("PROPPATCH "), + STATIC_STRING_L("MKCOL "), + STATIC_STRING_L("MOVE "), + STATIC_STRING_L("COPY "), + STATIC_STRING_L("LOCK "), + STATIC_STRING_L("UNLOCK "), STATIC_STRING_L("REPORT "), STATIC_STRING_L("RPC_CONNECT "), STATIC_STRING_L("RPC_IN_DATA "), STATIC_STRING_L("RPC_OUT_DATA ") }; -static const char *http_fs = "CDGHOPR"; +static const char *http_fs = "CDGHLMOPRU"; static u_int16_t http_request_url_offset(struct ndpi_detection_module_struct *ndpi_struct) { -- cgit v1.2.3