* Kerberos: clamp the reply prefix copy to the buffer size (GHSA-3pvq-vj37-hfqg)
The reply-buffering branch of krb_process_packet() allocated
ndpi_min(kerberos_len, KRB_MAX_BUF_LEN)+4 bytes for pktbuf but then copied
payload_len+4 bytes into it. When 12000 < payload_len < kerberos_len <
1048576 the copy exceeds the clamped buffer, overflowing the heap with
attacker-controlled data (reachable via a Kerberos-classified TCP flow and a
crafted >12KB single-segment reply). pktbuf_currlen is u_int16_t, so the
unclamped payload_len+4 was also truncated on store.
Clamp both the copy length and pktbuf_currlen to pktbuf_maxlen, keeping only
the prefix the buffer can hold -- which is sufficient for the incremental
KRB_PARSE_PREFIX parsing performed just above. Verified under AddressSanitizer:
the PoC that previously overflowed now runs clean, and normal Kerberos traffic
still classifies.
* Kerberos: add a test for the reply prefix overflow (GHSA-3pvq-vj37-hfqg)
A TGS-REP whose padata keeps the client name out of a single 15000-byte
segment: the reply is buffered in a 12004-byte buffer. Without the fix,
AddressSanitizer reports a heap-buffer-overflow (WRITE of size 15004) in
krb_process_packet().
* Update WebattackRCE.pcap.out to the new "Known Proto on Non Std
Port" risk description
* Windows: add missing MAX_NUM_TLS_MONITORED_BLOCKS define
* Mingw: avoid %zu in printf formats; with GCC 13 and mingw-w64 13
headers (Ubuntu 26.04) it is rejected by -Wformat
* Python: switch from 3.9 (not available on Ubuntu 26.04) to 3.14
and explicitly install setuptools
Text bodies starting with a UTF-8 BOM (EF BB BF) were flagged as
NDPI_HTTP_SUSPICIOUS_CONTENT, since the check accepts only ASCII bytes.
Skip the UTF-8 BOM and check the text after it.
UTF-16 text can't be validated with an ASCII check: if the body starts
with a UTF-16 (LE/BE) BOM, consider it as acceptable.
With "Transfer-Encoding: chunked", the body starts with the chunk-size
line, so the human-readable content check was inspecting "<hex>\r\n"
instead of the actual payload. This reported wrong bytes in the risk
info (e.g. "610D0A1F"), missed non-printable data when the chunk size
had 2+ digits, and flagged valid gzip-compressed chunked bodies.
For chunked responses, skip the chunk-size line (and any extension)
before running the check.
* Move PROFINET/IO detection into the DCERPC dissector: match the
PROFINET/IO interface UUIDs (Device, Controller, Supervisor,
ParameterServer) and the full object UUID prefix, and recognize the
Endpoint Mapper lookups for PROFINET/IO interfaces. Remove the
standalone PROFINET/IO dissector,
* After a generic EPM classification, look for PROFINET/IO calls in the
next packets of the flow
* Add UDP 34964 as PROFINET/IO default port and don't trigger the
`NDPI_KNOWN_PROTOCOL_ON_NON_STANDARD_PORT` flow risk for PROFINET/IO:
responses and following calls use dynamic ports
* Fix the byte order check of the connectionless DCERPC fragment length
The "weak" detection path (>= 4 packets, >= 2 elements, no LEN fields
required) didn't check that the whole payload had been parsed: the
dissector stops after PROTOBUF_MAX_ELEMENTS elements and returns a
non-zero offset anyway.
Require the parsed bytes to cover the entire payload on that path.
Add the trace to false_positives.pcapng.