project (snort CXX C)
set (VERSION_MAJOR 3)
-set (VERSION_MINOR 0)
-set (VERSION_PATCH 3)
-set (VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
+set (VERSION_MINOR 1)
+set (VERSION_PATCH 0)
+set (VERSION_SUBLEVEL 0)
+set (VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${VERSION_SUBLEVEL}")
+
+if (DEFINED VERSION_BUILD)
+ set (BUILD "${VERSION_BUILD}")
+endif ()
set (CMAKE_CXX_STANDARD 14)
set (CMAKE_CXX_STANDARD_REQUIRED ON)
string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_UPPER)
message("
--------------------------------------------------------
-${CMAKE_PROJECT_NAME} version ${VERSION}
-
+-------------------------------------------------------")
+if (DEFINED BUILD)
+ message("${CMAKE_PROJECT_NAME} version ${VERSION} build ${BUILD}")
+else()
+ message("${CMAKE_PROJECT_NAME} version ${VERSION}")
+endif()
+message("
Install options:
prefix: ${CMAKE_INSTALL_PREFIX}
includes: ${CMAKE_INSTALL_FULL_INCLUDEDIR}/${INSTALL_SUFFIX}
+2021/01/13 - 3.1.0.0
+
+-- appid: Store stats in map
+-- appid: Tear down third-party when appid gets disabled
+-- build: Add support for version sublevel and build via CMake
+-- dce_rpc: Handle Flow from File inspection
+-- host_cache: Add command to output host_cache usage, pegs, and memcap
+-- http2_inspect: Add total_bytes peg to track HTTP/2 data bytes inspected
+-- http_inspect: Abort on HTTP/2 connection preface
+-- http_inspect: Add total_bytes peg to track HTTP data bytes inspected
+-- http_inspect: Alert on truncated chunked and content-length message bodies
+-- http_inspect: Support stretch for Http2
+-- log: Reuse TextLog buffer for a large data
+ Thanks to Chris White for reporting the issue.
+-- packet_io: IDS mode should not give blacklist verdict for Intrusion event
+-- rna: Fix version, vendor and user string comparison at maximum length
+-- rna: Perform appropriate filter check based on the event type
+-- rna: Revert rna performance optimizations
+-- rpc_decode: Implement adjust_to_fit for RPC splitter
+-- stream_tcp: Delete redundant calls to check if the tcp packet contains a data payload
+-- stream_tcp: Fix issues causing overrun of the pdu reassembly buffer, make splitters
+ authoritative of size of the reassembled pdu
+-- stream_tcp: On midstream pickup, when first packet is a data segment, set flag on talker tracker
+ to reinit seglist base seg on first received data packet
+-- stream_tcp: Remove obsolete flush_data_ready() function
+
2020/12/20 - 3.0.3 build 6
-- active: Fix falling back on using raw IP for active responses when no device is specified
/* Version number of package */
#define VERSION "@VERSION@"
+/* Build number for this build */
+#cmakedefine BUILD "@BUILD@"
+
/* see configure.ac for the purpose of API_OPTIONS */
/* there is no cmake magic yet to configure this */
/* but luckily it is not yet needed */
--with-uuid-libraries=DIR
libuuid library directory
-Some influential environment variables:
- SIGNAL_SNORT_RELOAD=<value>
- set the SIGNAL_SNORT_RELOAD value
- SIGNAL_SNORT_DUMP_STATS<value>
- set the SIGNAL_SNORT_DUMP_STATS value
- SIGNAL_SNORT_ROTATE_STATS<value>
- set the SIGNAL_SNORT_ROTATE_STATS value
- SIGNAL_SNORT_READ_ATTR_TBL<value>
- set the SIGNAL_SNORT_READ_ATTR_TBL value
+Some influential variable definitions:
+ SIGNAL_SNORT_RELOAD=<int>
+ override the signal used to reload configuration (default: SIGHUP)
+ SIGNAL_SNORT_DUMP_STATS=<int>
+ override the signal used to dump run-time statistics (default: SIGUSR1)
+ SIGNAL_SNORT_ROTATE_STATS=<int>
+ override the signal used to force rotation of stats files (default: SIGUSR2)
+ SIGNAL_SNORT_READ_ATTR_TBL=<int>
+ override the signal used to reload the host attributes table (default: SIGURG)
+ SNORT_BUILD_NUMBER=<int>
+ define a build number for this build of Snort
"
sourcedir="$( cd "$( dirname "$0" )" && pwd )"
SIGNAL_SNORT_READ_ATTR_TBL=*)
append_cache_entry SIGNAL_SNORT_READ_ATTR_TBL STRING $optarg
;;
+ SNORT_BUILD_NUMBER=*)
+ append_cache_entry VERSION_BUILD STRING $optarg
+ ;;
*)
echo "Invalid option '$1'. Try $0 --help to see available options."
exit 1
The Snort Team
Revision History
-Revision 3.0.3 (Build 6) 2020-12-20 13:38:32 EST TST
+Revision 3.1.0.0 2021-01-13 13:25:56 EST TST
---------------------------------------------------------------------
from host
* host_cache.delete_client(host_ip, id, service, version): delete
client from host
+ * host_cache.get_stats(): get current host cache usage and pegs
Peg counts:
dynamic table (max)
* http2_inspect.max_concurrent_files: maximum concurrent file
transfers per HTTP/2 connection (max)
+ * http2_inspect.total_bytes: total HTTP/2 data bytes inspected
+ (sum)
5.24. http_inspect
message completed
* 119:259 (http_inspect) malformed HTTP Content-Disposition
filename parameter
+ * 119:260 (http_inspect) HTTP Content-Length message body was
+ truncated
+ * 119:261 (http_inspect) HTTP chunked message body was truncated
Peg counts:
pipelined requests (sum)
* http_inspect.pipelined_requests: total requests placed in a
pipeline (sum)
+ * http_inspect.total_bytes: total HTTP data bytes inspected (sum)
5.25. imap
sessions (max)
* http2_inspect.max_table_entries: maximum entries in an HTTP/2
dynamic table (max)
+ * http2_inspect.total_bytes: total HTTP/2 data bytes inspected
+ (sum)
* http_inspect.chunked: chunked message bodies (sum)
* http_inspect.concurrent_sessions: total concurrent http sessions
(now)
HTTP responses (sum)
* http_inspect.ssl_srch_abandoned_early: total SSL search abandoned
too soon (sum)
+ * http_inspect.total_bytes: total HTTP data bytes inspected (sum)
* http_inspect.trace_requests: TRACE requests inspected (sum)
* http_inspect.uri_coding: URIs with character coding problems
(sum)
message completed
* 119:259 (http_inspect) malformed HTTP Content-Disposition
filename parameter
+ * 119:260 (http_inspect) HTTP Content-Length message body was
+ truncated
+ * 119:261 (http_inspect) HTTP chunked message body was truncated
* 121:1 (http2_inspect) invalid flag set on HTTP/2 frame
* 121:2 (http2_inspect) HPACK integer value has leading zeros
* 121:3 (http2_inspect) HTTP/2 stream initiated with invalid stream
from host
* host_cache.delete_client(host_ip, id, service, version): delete
client from host
+ * host_cache.get_stats(): get current host cache usage and pegs
* packet_capture.enable(filter): dump raw packets
* packet_capture.disable(): stop packet dump
* packet_tracer.enable(proto, src_ip, src_port, dst_ip, dst_port):
The Snort Team
Revision History
-Revision 3.0.3 (Build 6) 2020-12-20 13:38:24 EST TST
+Revision 3.1.0.0 2021-01-13 13:25:45 EST TST
---------------------------------------------------------------------
The Snort Team
Revision History
-Revision 3.0.3 (Build 6) 2020-12-20 13:38:24 EST TST
+Revision 3.1.0.0 2021-01-13 13:25:45 EST TST
---------------------------------------------------------------------
#include "log/messages.h"
#include "main.h"
-#include "main/build.h"
#include "main/oops_handler.h"
#include "main/snort_config.h"
+#include "utils/cpp_macros.h"
#include "utils/stats.h"
#include "utils/util.h"
}
SigSafePrinter ssp(STDERR_FILENO);
ssp.printf("\nSnort (PID %u) caught fatal signal: %s\n", getpid(), sigstr);
+#ifdef BUILD
ssp.printf("Version: " VERSION " Build " BUILD "\n\n");
+#else
+ ssp.printf("Version: " VERSION "\n\n");
+#endif
#ifdef HAVE_LIBUNWIND
// Try to pretty-print a stack trace using libunwind to traverse the stack.
analyzer.cc
analyzer.h
analyzer_command.cc
- build.h
help.cc
help.h
modules.cc
SNORT_MAJOR_VERSION = SNORT_MAJOR_VERSION,
SNORT_MINOR_VERSION = SNORT_MINOR_VERSION,
SNORT_PATCH_VERSION = SNORT_PATCH_VERSION,
+ SNORT_SUBLEVEL_VERSION = SNORT_SUBLEVEL_VERSION,
tweaks = tweaks,
}
+++ /dev/null
-#ifndef BUILD_H
-#define BUILD_H
-
-#include "utils/cpp_macros.h"
-
-//-----------------------------------------------//
-// ____ _ //
-// / ___| _ __ ___ _ __| |_ _ _ //
-// \___ \| '_ \ / _ \| '__| __|| |_ _| |_ //
-// ___) | | | | (_) | | | ||_ _|_ _| //
-// |____/|_| |_|\___/|_| \__||_| |_| //
-// //
-//-----------------------------------------------//
-
-#define BUILD_NUMBER 6
-
-#ifndef EXTRABUILD
-#define BUILD STRINGIFY_MX(BUILD_NUMBER)
-#else
-#define BUILD STRINGIFY_MX(PPCAT_MX(BUILD_NUMBER, EXTRABUILD))
-#endif
-
-#endif
-
#include "parser/parser.h"
#include "utils/stats.h"
-#include "build.h"
#include "lua_bootstrap.h"
#include "lua_finalize.h"
"SNORT_MAJOR_VERSION",
"SNORT_MINOR_VERSION",
"SNORT_PATCH_VERSION",
+ "SNORT_SUBLEVEL_VERSION",
nullptr
};
{
assert(versions[0]);
+#ifdef BUILD
lua_pushstring(L, VERSION "-" BUILD);
+#else
+ lua_pushstring(L, VERSION);
+#endif
lua_setglobal(L, versions[0]);
std::istringstream vs(VERSION);
#include "control_mgmt.h"
#endif
-#include "build.h"
#include "snort_config.h"
#include "thread_config.h"
SnortConfig::set_conf(snort_cmd_line_conf);
LogMessage("--------------------------------------------------\n");
+#ifdef BUILD
LogMessage("%s Snort++ %s-%s\n", get_prompt(), VERSION, BUILD);
+#else
+ LogMessage("%s Snort++ %s\n", get_prompt(), VERSION);
+#endif
LogMessage("--------------------------------------------------\n");
#ifdef PIGLET
return n;
}
-bool TcpReassembler::flush_data_ready(TcpReassemblerState& trs)
-{
- // needed by stream_reassemble:action disable; can fire on rebuilt
- // packets, yanking the splitter out from under us :(
- if ( !trs.tracker->is_reassembly_enabled() )
- return false;
-
- if ( (trs.tracker->get_flush_policy() == STREAM_FLPOLICY_ON_DATA) || trs.tracker->is_splitter_paf() )
- return ( is_segment_pending_flush(trs) );
-
- return ( get_pending_segment_count(trs, 2) > 1 ); // FIXIT-L return false?
-}
-
bool TcpReassembler::next_no_gap(const TcpSegmentNode& tsn)
{
return tsn.next and (tsn.next->i_seq == tsn.i_seq + tsn.i_len);
virtual void insert_segment_in_empty_seglist(TcpReassemblerState&, TcpSegmentDescriptor&);
virtual void insert_segment_in_seglist(TcpReassemblerState&, TcpSegmentDescriptor&);
virtual uint32_t get_pending_segment_count(TcpReassemblerState&, unsigned max);
- bool flush_data_ready(TcpReassemblerState&);
int trim_delete_reassembly_segment(TcpReassemblerState&, TcpSegmentNode*, uint32_t flush_seq);
void queue_reassembly_segment(TcpReassemblerState&, TcpSegmentNode* prev, TcpSegmentNode*);
void init_overlap_editor(TcpReassemblerState&, TcpSegmentDescriptor&);
#include <random>
#include "log/messages.h"
-#include "main/build.h"
#include "main/snort_config.h"
#include "packet_io/sfdaq.h"
#include "protocols/packet.h" // For NUM_IP_PROTOS
* Store interesting data in memory that would not otherwise be visible
* in a CORE(5) file
***************************************************************************/
-#define SNORT_VERSION_STRING ("### Snort Version " VERSION " Build " BUILD "\n")
+#ifdef BUILD
+ #define SNORT_VERSION_STRING ("### Snort Version " VERSION " Build " BUILD "\n")
+#else
+ #define SNORT_VERSION_STRING ("### Snort Version " VERSION "\n")
+#endif
#define SNORT_VERSION_STRLEN sizeof(SNORT_VERSION_STRING)
char __snort_version_string[SNORT_VERSION_STRLEN];
LogMessage("\n");
LogMessage(" ,,_ -*> Snort++ <*-\n");
+#ifdef BUILD
LogMessage(" o\" )~ Version %s (Build %s)\n", VERSION, BUILD);
+#else
+ LogMessage(" o\" )~ Version %s\n", VERSION);
+#endif
LogMessage(" '''' By Martin Roesch & The Snort Team\n");
LogMessage(" http://snort.org/contact#team\n");
LogMessage(" Copyright (C) 2014-2020 Cisco and/or its affiliates."