diff --git a/CHANGES b/CHANGES index 59ca1abded..20485f0114 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,31 @@ + +4.2.0-dev.94 | 2021-08-31 15:58:00 +0200 + + * GH-1709: Fix signed integer overflow in PIA on big sequence number + holes. (Johanna Amann, Corelight) + +4.2.0-dev.92 | 2021-08-31 15:55:29 +0200 + + * Allow `-B` flag in non-debug builds, but ignore it (unless it's + `help`). (Benjamin Bannier, Corelight) + +4.2.0-dev.89 | 2021-08-26 14:35:28 -0700 + + * CI support refresh. (Christian Kreibich, Corelight) + - Add Debian 11 (Bullseye) + - Drop Ubuntu 16.04 + + * Remove unneccessary >= 0 check in a UTF32 comparison Resolves + Coverity CID 1461523. (Christian Kreibich, Corelight) + + * Trivial signedness warning fix. (Christian Kreibich, Corelight) + + * Fix addr/string type confusion in Broker::peers(). (Christian + Kreibich, Corelight) + + * Simplify the supervisor's listen() on default address/port. + (Christian Kreibich, Corelight) + 4.2.0-dev.78 | 2021-08-19 09:39:23 -0700 * Return fully-escaped string if utf8 conversion fails (Tim Wojtulewicz, Corelight) diff --git a/VERSION b/VERSION index e520c2589d..411ade6790 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.2.0-dev.78 +4.2.0-dev.94 diff --git a/src/Options.cc b/src/Options.cc index d28c67b06e..347df2cef6 100644 --- a/src/Options.cc +++ b/src/Options.cc @@ -12,6 +12,8 @@ #endif #include +#include +#include #include #include "zeek/bsd-getopt-long.h" @@ -328,10 +330,7 @@ Options parse_cmdline(int argc, char** argv) {"watchdog", no_argument, nullptr, 'W'}, {"print-id", required_argument, nullptr, 'I'}, {"status-file", required_argument, nullptr, 'U'}, - -#ifdef DEBUG {"debug", required_argument, nullptr, 'B'}, -#endif #ifdef USE_PERFTOOLS_DEBUG {"mem-leaks", no_argument, nullptr, 'm'}, @@ -437,11 +436,17 @@ Options parse_cmdline(int argc, char** argv) rval.pcap_output_file = optarg; break; -#ifdef DEBUG case 'B': +#ifdef DEBUG rval.debug_log_streams = optarg; - break; +#else + if ( util::streq(optarg, "help") ) + { + fprintf(stderr,"debug streams unavailable\n"); + exit(1); + } #endif + break; case 'C': rval.ignore_checksums = true; diff --git a/src/analyzer/protocol/pia/PIA.cc b/src/analyzer/protocol/pia/PIA.cc index c5343902f0..8cd4df6a1d 100644 --- a/src/analyzer/protocol/pia/PIA.cc +++ b/src/analyzer/protocol/pia/PIA.cc @@ -64,7 +64,8 @@ void PIA::AddToBuffer(Buffer* buffer, uint64_t seq, int len, const u_char* data, else buffer->head = buffer->tail = b; - buffer->size += len; + if ( data ) + buffer->size += len; } void PIA::AddToBuffer(Buffer* buffer, int len, const u_char* data, bool is_orig,