]>
git.ipfire.org Git - thirdparty/suricata.git/log
Victor Julien [Fri, 5 Jun 2015 10:30:05 +0000 (12:30 +0200)]
stream: update StreamMsg to don't have fixed size
StreamMsg would have a fixed size buffer. This patch replaces the buffer
by a dynamically allocated buffer.
Preparation of allowing bigger and customizable buffer sizes.
Victor Julien [Fri, 5 Jun 2015 07:54:44 +0000 (09:54 +0200)]
stream: remove STREAMTCP_STREAM_FLAG_CLOSE_INITIATED logic
Giuseppe Longo [Mon, 8 Jun 2015 12:06:24 +0000 (14:06 +0200)]
http: rework UT
This reworks UT based on
commit
320355570863dfa6376c9d2af875495ccc8a199f
Victor Julien [Wed, 3 Jun 2015 16:16:33 +0000 (18:16 +0200)]
http: memcap HTTP server inspect body code
Victor Julien [Wed, 3 Jun 2015 16:15:55 +0000 (18:15 +0200)]
smtp file_data: fix wrong free
Victor Julien [Wed, 3 Jun 2015 10:11:22 +0000 (12:11 +0200)]
flow timeout: prevent dead locks
The flow timeout mechanism called both from the flow manager at run time
and at shutdown creates pseudo packets. For this it has it's own packet
pool, which can be depleted if the timeout logic is faster than the packet
processing threads. In this case the flow timeout would enter a wait loop.
The problem however, is that this wait loop would happen while keeping a
flow locked. This could lead to a race condition when the packet thread(s)
are waiting for the lock that the flow manager has.
This patch introduces a new packet pool call 'PacketPoolWaitForN', meant
to make sure that the thread's packet pool has at least N available
packets. The flow timeout paths use this to make sure enough packets are
available *before* grabbing the flow lock. If there aren't enough packets
available yet, the wait happens before the lock as well.
This still means the wait can happen while the flow hash row is locked, so
we do make sure some more packets are available when entering that. But
perhaps in the future we need a more precise logic there as well.
Victor Julien [Sun, 31 May 2015 08:53:42 +0000 (10:53 +0200)]
http: improve inline body tracking
Rewrite the sliding window handling for IPS mode for the server body.
The buffer used will have the following properties:
left edge: inspected data - window_size
right edge: the most recent data
Due to handling of compressed bodies, the data can be much bigger than
the configured window size.
Victor Julien [Tue, 2 Jun 2015 11:31:47 +0000 (13:31 +0200)]
http: body pruning update
Take inspect limits into account. Consider per direction inspect settings.
Giuseppe Longo [Mon, 11 May 2015 17:48:32 +0000 (19:48 +0200)]
hsbd: inspect buffer depending on the engine mode
Currently, data is buffered up to response-body-minimal size
and response-body-inspect-window before being inspected.
With this, in IPS mode, inspect data as it comes in up.
The sliding window concept is used here,
some data chunks are copied into the window (buffer)
then it's inspected.
Giuseppe Longo [Thu, 28 May 2015 11:42:28 +0000 (13:42 +0200)]
app-layer-htp: add http_body_inline setting
Victor Julien [Thu, 28 May 2015 18:44:36 +0000 (20:44 +0200)]
ips: move counters in common struct and funcs
Victor Julien [Wed, 27 May 2015 15:53:23 +0000 (17:53 +0200)]
nfq: add ips stats
Victor Julien [Wed, 27 May 2015 15:17:50 +0000 (17:17 +0200)]
decode: create util function for basic counter updates
Jason Ish [Wed, 10 Jun 2015 22:09:58 +0000 (16:09 -0600)]
json-stats: log deltas
If "deltas" is yes, log delta values as the name of the value
suffixed with _delta.
Victor Julien [Wed, 17 Jun 2015 12:36:54 +0000 (14:36 +0200)]
detect-state: remove/hide BUG_ON statements
Victor Julien [Wed, 17 Jun 2015 10:34:58 +0000 (12:34 +0200)]
file extract: add app_proto to logging
Victor Julien [Mon, 15 Jun 2015 09:44:24 +0000 (11:44 +0200)]
alproto: improve AppProtoToString
Make AppProtoToString compilation fail on missing 'case's.
Eric Leblond [Tue, 9 Jun 2015 13:50:31 +0000 (15:50 +0200)]
app-layer: add modbus to AppProtoToString
It was missing causing protocol identified as modbus not to be
displayed in netflow events.
Victor Julien [Wed, 10 Jun 2015 13:22:12 +0000 (15:22 +0200)]
suppress: add track by_either mode
So far suppress rules would apply to src or dst addresses of a packet.
This meant that if a ip would need to suppressed both as src and as dst,
2 suppress rules would be needed.
This patch introduces track by_either, which means that the ip(s) in the
suppress rule are tested against both the packets source and dest ip's.
If either of them is on the suppress list, the alert is suppressed.
Victor Julien [Wed, 10 Jun 2015 12:20:21 +0000 (14:20 +0200)]
suppress: support ip-lists
Ticket: 1137
Support supplying a list of IP's to the suppress keyword. Variables from
the address-groups and negation is supported. The same logic (and code) is
used that is also used in parting the IP portions of regular detection
rules.
Jason Ish [Thu, 11 Jun 2015 22:45:34 +0000 (16:45 -0600)]
hostbits: ignore leading and trailing white space
Ignore leading and trailing space around the name and
direction tokens.
Jason Ish [Wed, 10 Jun 2015 21:15:19 +0000 (15:15 -0600)]
json-stats: reorg threads and totals
Totals are now placed at the top level instead of under a "Total"
object.
Threads are placed under a "threads" object.
Jason Ish [Wed, 10 Jun 2015 20:39:38 +0000 (14:39 -0600)]
json-stats: log uptime in seconds, instead of a string
Jason Ish [Tue, 9 Jun 2015 20:26:57 +0000 (14:26 -0600)]
flowbits: strip leading and trailing spaces in name
Redmine bug 1481. Strip leading and trailing white space. Factor
out parsing from setup while in here.
Zachary Rasmor [Wed, 3 Jun 2015 15:59:06 +0000 (11:59 -0400)]
Add Feature #1454. Generic eve-log prefix support.
Victor Julien [Sat, 30 May 2015 09:48:34 +0000 (11:48 +0200)]
decode: optimize DecodeThreadVars layout
Put common counters on the first cache line. Please the flow output
pointer last as it's use depends on the flow logging being enabled
and even then it's only called very rarely.
Victor Julien [Sat, 30 May 2015 09:31:30 +0000 (11:31 +0200)]
decode: add erspan counter
Victor Julien [Wed, 20 May 2015 21:01:22 +0000 (23:01 +0200)]
decode: add ERSPANv1 decoder
Only allow v1 to be parsed as thats what is tested.
Take vlan_id from the ERSPAN layer.
Victor Julien [Wed, 20 May 2015 19:42:19 +0000 (21:42 +0200)]
decode: clean up tunnel decode logic
Don't use mix of existing and custom types to indicate the next
layer.
Victor Julien [Tue, 9 Jun 2015 09:50:04 +0000 (11:50 +0200)]
detect: various header cleanups
Victor Julien [Tue, 9 Jun 2015 09:43:26 +0000 (11:43 +0200)]
detect: remove struct/union tricks from Signature
Victor Julien [Tue, 9 Jun 2015 08:43:06 +0000 (10:43 +0200)]
detect: remove unused match_flags from inspect engines
Victor Julien [Mon, 1 Jun 2015 09:00:36 +0000 (11:00 +0200)]
http: improve body pruning
Take inspect window into account.
Victor Julien [Sun, 31 May 2015 08:52:05 +0000 (10:52 +0200)]
http: fix body tracking
In HTTP body tracking for response bodies, pruning body chunks was broken
as the body parsing code wouldn't update HtpBody::body_parsed.
Victor Julien [Fri, 29 May 2015 10:15:18 +0000 (12:15 +0200)]
http-client-body: create unittest util func
Eric Leblond [Wed, 27 May 2015 20:05:19 +0000 (22:05 +0200)]
logging: fix modules ordering during logging
With the previous code the order of the logging modules in the
YAML were determining which module was run first. This was not
wished and a consequences was that the EVE fileinfo module was
not correctly displaying the key 'stored' because it was
depending on a flag set alter by the filestore module.
This patch adds a priority file to the TmModule structure. The
higher the priority is set, the sooner the module is run in the
logging process. The RunModeOutput structure has also been
updated to contain the name of the original TmModule. Thus allowing
to define a priority for a RunModeOutput.
Currently only the filestore has a priority set. The rest of them is
set to the default value of zero.
Eric Leblond [Thu, 28 May 2015 05:02:12 +0000 (07:02 +0200)]
output-lua: sync variable name with yaml
'script-dir' was used in the code but we had 'scripts-dir' in the
configuration file. This patch fixes it to 'scripts-dir'.
Jason Ish [Wed, 20 May 2015 21:14:59 +0000 (15:14 -0600)]
--set - handle spaces on either side of '='
Discard spaces when provided as part of --set around the '='. For
example, "val=key", "val = key", "val= key" and "val =key" are
all equivalent now.
Jason Ish [Wed, 20 May 2015 20:19:20 +0000 (14:19 -0600)]
conf - function declaration style
Use consistent style - function return type and declaration on
same line.
DIALLO David [Wed, 27 May 2015 15:00:35 +0000 (17:00 +0200)]
modbus: fix heap-buffer-overflow in Modbus parser
Modbus parser does not check length to extract/read data (read or write address,
quantity of data, etc.) that should be present.
In case of malformated data (invalid length in header), Modbus parser reads data
over the input data length.
Add check before extracting/reading data from input buffer to avoid head buffer
overflow.
Victor Julien [Wed, 27 May 2015 12:29:54 +0000 (14:29 +0200)]
counters: use ptr to name instead of copy
All counters have hardcoded names, so copies are not needed.
Victor Julien [Wed, 27 May 2015 12:11:57 +0000 (14:11 +0200)]
counters: don't run if no counters have been registered
Victor Julien [Wed, 27 May 2015 09:33:41 +0000 (11:33 +0200)]
counters: work around unix-socket init issues
Victor Julien [Wed, 27 May 2015 09:23:19 +0000 (11:23 +0200)]
counters: make threads cleanup all memory
Victor Julien [Wed, 27 May 2015 07:28:24 +0000 (09:28 +0200)]
counters: clean up global context
Victor Julien [Tue, 26 May 2015 17:44:01 +0000 (19:44 +0200)]
counters: turn flow.memuse into a global counter
Victor Julien [Tue, 26 May 2015 17:36:59 +0000 (19:36 +0200)]
counters: make DNS counters globals
Victor Julien [Tue, 26 May 2015 17:16:23 +0000 (19:16 +0200)]
counters: make tcp.memuse a global counter
Victor Julien [Thu, 8 Jan 2015 00:44:18 +0000 (01:44 +0100)]
http: make http.memuse a global counter
http.memcap as well.
Victor Julien [Tue, 26 May 2015 14:45:07 +0000 (16:45 +0200)]
counters: remove references to 'perf' counters
Victor Julien [Tue, 26 May 2015 14:33:51 +0000 (16:33 +0200)]
counters: remove last and now unused tm_name reference
Victor Julien [Tue, 26 May 2015 14:29:35 +0000 (16:29 +0200)]
counters: remove old unix socket json logic
Victor Julien [Tue, 26 May 2015 14:28:01 +0000 (16:28 +0200)]
counters: minor internal API cleanups
Victor Julien [Tue, 26 May 2015 14:24:39 +0000 (16:24 +0200)]
counters: rename unparsable SCPCAElem to StatsLocalCounter
Victor Julien [Tue, 26 May 2015 14:15:03 +0000 (16:15 +0200)]
counters: minor header cleanup
Victor Julien [Tue, 26 May 2015 14:10:17 +0000 (16:10 +0200)]
counters: remaining s/SCPerf/Stats/g
Victor Julien [Tue, 26 May 2015 14:04:30 +0000 (16:04 +0200)]
counters: s/SCPerfPrivateContext/StatsPrivateThreadContext/g
Victor Julien [Tue, 26 May 2015 14:01:09 +0000 (16:01 +0200)]
counters: s/SCPerfPublicContext/StatsPublicThreadContext/g
Victor Julien [Tue, 26 May 2015 13:41:35 +0000 (15:41 +0200)]
counters: various renames and cleanups
Victor Julien [Tue, 26 May 2015 13:08:35 +0000 (15:08 +0200)]
counters: s/SCPerfCounterSetUI64/StatsSetUI64/g
Victor Julien [Tue, 26 May 2015 12:53:24 +0000 (14:53 +0200)]
counters: s/SCPerfCounterIncr/StatsIncr/g
Victor Julien [Tue, 26 May 2015 12:45:43 +0000 (14:45 +0200)]
counters: s/SCPerfCounterAddUI64/StatsAddUI64/g
Victor Julien [Tue, 26 May 2015 12:38:02 +0000 (14:38 +0200)]
counters: clean up defines
Victor Julien [Tue, 26 May 2015 12:33:21 +0000 (14:33 +0200)]
counters: rename register API calls
Also remove 'type' parameter which was always the same.
Victor Julien [Tue, 26 May 2015 11:51:38 +0000 (13:51 +0200)]
log-stats: make global/threads logging configurable
Victor Julien [Tue, 26 May 2015 10:00:36 +0000 (12:00 +0200)]
stats: support per thread stats in json output
Default is only to output totals. Optionally per thread can be added.
Both can be enabled together.
Victor Julien [Tue, 4 Nov 2014 09:07:25 +0000 (10:07 +0100)]
stats json: replace strndup
strndup is a banned function.
Victor Julien [Tue, 4 Nov 2014 08:50:29 +0000 (09:50 +0100)]
stats-json: fixes and improvements
Use proper LogFileCtx and MemBuffer handling so we can have multiple
loggers active at the same time.
Change 'date' field to timestamp, and use ISO notation to make it
the same as the other JSON outputs.
Tom DeCanio [Tue, 4 Nov 2014 01:16:46 +0000 (17:16 -0800)]
eve-log: stats logging code cleanup.
Tom DeCanio [Tue, 4 Nov 2014 01:01:59 +0000 (17:01 -0800)]
eve-log: add JSON stats logging
Support for counters in stats.log in eve output JSON stream.
Victor Julien [Mon, 25 May 2015 18:53:17 +0000 (20:53 +0200)]
counters: pass per thread stats to output api
As well as the global (merged) stats.
Victor Julien [Mon, 25 May 2015 11:46:19 +0000 (13:46 +0200)]
counters: rename widely used pctmi var to sts (stats thread store)
Victor Julien [Mon, 25 May 2015 09:42:41 +0000 (11:42 +0200)]
counters: call global counters funcs
Victor Julien [Mon, 25 May 2015 09:40:42 +0000 (11:40 +0200)]
counters: split API init
Split into early ctx initialization and post-config setup.
Victor Julien [Sun, 24 May 2015 18:18:02 +0000 (20:18 +0200)]
counters: start using Stats prefix
Victor Julien [Sun, 24 May 2015 16:38:39 +0000 (18:38 +0200)]
counters: simplify and speedup counters sync
Victor Julien [Sun, 24 May 2015 16:32:58 +0000 (18:32 +0200)]
counters: remove threadvars arg from SCPerfAddToClubbedTMTable
Victor Julien [Sun, 24 May 2015 15:58:13 +0000 (17:58 +0200)]
counters: remove thread module name from counters API
Victor Julien [Wed, 7 Jan 2015 22:00:52 +0000 (23:00 +0100)]
stream: make tcp.reassembly_memuse counter global
Fixes bugs #632 and #1178
Victor Julien [Sun, 24 May 2015 15:23:48 +0000 (17:23 +0200)]
counters: global counters registration
Victor Julien [Wed, 7 Jan 2015 18:57:18 +0000 (19:57 +0100)]
Fix harmless typo in IPOnlyCIDRItemNew's SCReturnPtr use
Victor Julien [Sun, 24 May 2015 12:04:45 +0000 (14:04 +0200)]
counters: remove unused description
Victor Julien [Sun, 24 May 2015 07:04:04 +0000 (09:04 +0200)]
counters: merge counters from threads for output
Merge counters so the table contains combined values from counters
from each thread.
Use global counter id's, track them in a hash.
Rename SCPCAElem members
Fix and improve average counters
Victor Julien [Sat, 23 May 2015 12:16:21 +0000 (14:16 +0200)]
counters: remove unused public API calls and make them private
Victor Julien [Sat, 23 May 2015 11:41:49 +0000 (13:41 +0200)]
counters: make SCPerfSetupPrivate a function
Victor Julien [Sat, 23 May 2015 11:27:41 +0000 (13:27 +0200)]
counters: minor cleanups
Victor Julien [Sat, 23 May 2015 11:24:08 +0000 (13:24 +0200)]
counters: introduce SCPerfSetupPrivate for thread setup
Victor Julien [Sat, 23 May 2015 10:56:16 +0000 (12:56 +0200)]
counters: make threadvars::perf_private_ctx static
Update SCPerfGetAllCountersArray and add a UT workaround.
Victor Julien [Sat, 23 May 2015 10:28:54 +0000 (12:28 +0200)]
counters: SCPerfGetLocalCounterValue cleanup
Return u64, update arguments.
Victor Julien [Sat, 23 May 2015 10:15:10 +0000 (12:15 +0200)]
counters: remove references to SCPerfCounterAddDouble
They were all in comments anyway.
Victor Julien [Fri, 22 May 2015 22:44:45 +0000 (00:44 +0200)]
counters: make increment call take threadvars
This hides the implementation from the caller.
Victor Julien [Fri, 22 May 2015 18:56:09 +0000 (20:56 +0200)]
counters: threadvars s/sc_perf_pca/perf_private_ctx/g
Victor Julien [Fri, 22 May 2015 17:59:35 +0000 (19:59 +0200)]
counters: rename threadvars public counters
Victor Julien [Fri, 22 May 2015 15:04:17 +0000 (17:04 +0200)]
counters: s/SCPerfContext/SCPerfPublicContext/g
Victor Julien [Fri, 22 May 2015 14:59:07 +0000 (16:59 +0200)]
counters: s/SCPerfCounterArray/SCPerfPrivateContext/g
Goal is to make it's purpose clear.
Victor Julien [Fri, 22 May 2015 12:16:10 +0000 (14:16 +0200)]
counters: minor cleanups
Eric Leblond [Wed, 20 May 2015 19:45:25 +0000 (21:45 +0200)]
suri-graphite: add ouput to file option
The --ooutput option allows to write the stats to a file given as
argument the format used is JSON for easy parsing.
Eric Leblond [Sun, 17 May 2015 17:02:37 +0000 (19:02 +0200)]
suri-graphite: add daemonization capability
You can now use -d or --daemon to daemonize the process.
Eric Leblond [Sun, 17 May 2015 16:57:48 +0000 (18:57 +0200)]
suri-graphite: fix port option
If port is specified on command line we need to convert it as an
integer before using it as argument to connect.
Victor Julien [Fri, 22 May 2015 12:23:18 +0000 (14:23 +0200)]
logfile: rename ALERT_ types to LOGFILE_TYPE_