]> git.ipfire.org Git - thirdparty/suricata.git/log
thirdparty/suricata.git
4 years agogithub-ci: fix building against request libhtp/sv PR 5347/head 5349/head
Jason Ish [Tue, 1 Sep 2020 16:55:57 +0000 (10:55 -0600)] 
github-ci: fix building against request libhtp/sv PR

The variable name was wrong, causing the libhtp-pr and sv-pr
parameters in the commit message to not be applied.

4 years agoflow: suppress noisy messages 5346/head
Victor Julien [Mon, 31 Aug 2020 13:00:28 +0000 (15:00 +0200)] 
flow: suppress noisy messages

4 years agodns: simply skips zero-sized dns requests/responses
Philippe Antoine [Wed, 26 Aug 2020 08:52:54 +0000 (10:52 +0200)] 
dns: simply skips zero-sized dns requests/responses

4 years agodcerpc: validate signature with dcerpc keywords
Philippe Antoine [Thu, 27 Aug 2020 15:32:41 +0000 (17:32 +0200)] 
dcerpc: validate signature with dcerpc keywords

so that they do not use another protocol's keywords

4 years agohttp: handles gaps
Philippe Antoine [Tue, 19 May 2020 11:57:45 +0000 (13:57 +0200)] 
http: handles gaps

ie data=NULL and len>0 from libhtp callbacks

4 years agoflowbits: convert flowbits dumping to json builder
Victor Julien [Fri, 28 Aug 2020 15:26:47 +0000 (17:26 +0200)] 
flowbits: convert flowbits dumping to json builder

4 years agodetect/analyzer: convert to jsonbuilder
Victor Julien [Tue, 28 Jul 2020 21:26:01 +0000 (23:26 +0200)] 
detect/analyzer: convert to jsonbuilder

4 years agoci: Run formatting check on pull request
Roland Fischer [Wed, 15 Jul 2020 03:43:58 +0000 (23:43 -0400)] 
ci: Run formatting check on pull request

4 years agoutil: Add clang-format helper script
Roland Fischer [Fri, 3 Jul 2020 04:22:35 +0000 (00:22 -0400)] 
util: Add clang-format helper script

4 years agodoc: Add dev code-style
Roland Fischer [Fri, 3 Jul 2020 04:22:03 +0000 (00:22 -0400)] 
doc: Add dev code-style

4 years agocommon: Add clang-format file
Roland Fischer [Tue, 7 Jul 2020 21:54:36 +0000 (17:54 -0400)] 
common: Add clang-format file

clang-format allows to auto-format C code. The settings here are set
up to follow the code style, see
https://redmine.openinfosecfoundation.org/projects/suricata/wiki/Coding_Style.

4 years agothreshold: fix potential memory leak 5325/head
Victor Julien [Tue, 25 Aug 2020 14:06:34 +0000 (16:06 +0200)] 
threshold: fix potential memory leak

4 years agoreject: minor code cleanup
Victor Julien [Tue, 25 Aug 2020 13:58:52 +0000 (15:58 +0200)] 
reject: minor code cleanup

Use enum for direction to assist compiler.

4 years agostream: fix GAP size
Victor Julien [Tue, 25 Aug 2020 12:08:37 +0000 (14:08 +0200)] 
stream: fix GAP size

Fix GAPs sizes sometimes exceeding the ACK'd data size.

4 years agostream: fix deinit after incomplete init
Victor Julien [Tue, 25 Aug 2020 10:36:08 +0000 (12:36 +0200)] 
stream: fix deinit after incomplete init

4 years agooutput/flow: fix deinit after incomplete init
Victor Julien [Tue, 25 Aug 2020 10:35:51 +0000 (12:35 +0200)] 
output/flow: fix deinit after incomplete init

4 years agonfq: suppress debug message using info level
Victor Julien [Tue, 25 Aug 2020 09:47:38 +0000 (11:47 +0200)] 
nfq: suppress debug message using info level

4 years agoplugins: suppress coverity toctou warning
Victor Julien [Tue, 25 Aug 2020 09:46:47 +0000 (11:46 +0200)] 
plugins: suppress coverity toctou warning

4 years agoflow: work around harmless coverity warnings
Victor Julien [Tue, 25 Aug 2020 09:44:13 +0000 (11:44 +0200)] 
flow: work around harmless coverity warnings

4 years agoflow: fix spare sync incomplete counter
Victor Julien [Tue, 25 Aug 2020 09:40:50 +0000 (11:40 +0200)] 
flow: fix spare sync incomplete counter

4 years agoreject: work around coverity warning
Victor Julien [Tue, 25 Aug 2020 09:39:00 +0000 (11:39 +0200)] 
reject: work around coverity warning

4 years agoplugin: fix typo in long_opts struct 5321/head
Vadym Malakhatko [Mon, 17 Aug 2020 12:29:52 +0000 (15:29 +0300)] 
plugin: fix typo in long_opts struct

4 years agomqtt: fixed wrong slice access
Ilya Bakhtin [Tue, 18 Aug 2020 17:26:36 +0000 (19:26 +0200)] 
mqtt: fixed wrong slice access

Slice access esults in rust panic when mqtt ping is processed

4 years agonapatech: Style -- remove extra space
Jeff Lucovsky [Thu, 20 Aug 2020 15:29:10 +0000 (11:29 -0400)] 
napatech: Style -- remove extra space

4 years agonapatech: Use proper parser for type
Jeff Lucovsky [Thu, 20 Aug 2020 15:28:28 +0000 (11:28 -0400)] 
napatech: Use proper parser for type

This commit uses the proper parser call for the value being parsed.

4 years agonapatech: Improve configuration range handling
Jeff Lucovsky [Thu, 20 Aug 2020 15:27:47 +0000 (11:27 -0400)] 
napatech: Improve configuration range handling

This commit corrects issues parsing ranges from the Napatech section of
the configuration file.

4 years agonapatech: Fix compiler issues w/out bypass
Jeff Lucovsky [Thu, 20 Aug 2020 15:26:33 +0000 (11:26 -0400)] 
napatech: Fix compiler issues w/out bypass

This commit fixes compiler errors when Napatech bypass is not configured

4 years agothreshold: Change rule parsing to use pcre_copy_substring
Carl Smith [Sun, 16 Aug 2020 20:41:35 +0000 (08:41 +1200)] 
threshold: Change rule parsing to use pcre_copy_substring

Fixes memory leak when parsing threshold rules.
All parsed strings are less than 16 characters except
for the IP address which could be up to 48 characters.
Remove redefinition of MAX_SUBSTRINGS

4 years agoconfigure: fix detection of netfilter_queue with older headers
Jason Ish [Fri, 7 Aug 2020 14:57:04 +0000 (08:57 -0600)] 
configure: fix detection of netfilter_queue with older headers

Define _GNU_SOURCE and include sys/types.h so older
netfilter_queue headers can be detected properly, as they are
using u_int_xx style integers.

4 years agodoc/userguide: fix outdated xdp info
Odin Jenseg [Wed, 5 Aug 2020 12:09:08 +0000 (14:09 +0200)] 
doc/userguide: fix outdated xdp info

4 years agoplugins: track all loaded plugins in a list 5317/head
Jason Ish [Tue, 11 Aug 2020 16:26:43 +0000 (10:26 -0600)] 
plugins: track all loaded plugins in a list

Track the pointer returned from dlopen in a list to prevent a
resource leak by the pointer going out of scope.

Found by Coverity, CID 1465661.

Redmine issue:
https://redmine.openinfosecfoundation.org/issues/3864

4 years agoplugins: use closedir to close open directory (not free)
Jason Ish [Tue, 11 Aug 2020 15:31:09 +0000 (09:31 -0600)] 
plugins: use closedir to close open directory (not free)

Found by Coverity, CID 1465665: ALLOC_FREE_MISMATCH.

Redmine issue:
https://redmine.openinfosecfoundation.org/issues/3864

4 years agooutput-json: fix Coverity USE_AFTER_FREE
Jason Ish [Tue, 11 Aug 2020 15:30:01 +0000 (09:30 -0600)] 
output-json: fix Coverity USE_AFTER_FREE

Return error if plugin open fails. Fixes Coverity CID 1465664
USE_AFTER_FREE error.

Redmine issue:
https://redmine.openinfosecfoundation.org/issues/3864

4 years agoautomake: add acsite.m4 to EXTRA_DIST 5286/head
Jason Ish [Mon, 10 Aug 2020 17:20:52 +0000 (11:20 -0600)] 
automake: add acsite.m4 to EXTRA_DIST

This file is required to successfully re-run autoreconf, which
many packaging tools will do even on a prepared distribution
archive.

4 years agogithub-ci: add autoreconf to centos-7 build
Jason Ish [Mon, 10 Aug 2020 17:15:45 +0000 (11:15 -0600)] 
github-ci: add autoreconf to centos-7 build

The prepared distribution packages are failing autoreconf
due to a missing acsite.m4. Add autoreconf to the centos-7
build which uses the prepared package to test for this
issue.

4 years agofuzz/pcap: add missing flow queue 5285/head 5311/head
Victor Julien [Fri, 7 Aug 2020 14:50:56 +0000 (16:50 +0200)] 
fuzz/pcap: add missing flow queue

4 years agofuzz/pcap: enable http2
Victor Julien [Fri, 7 Aug 2020 14:43:24 +0000 (16:43 +0200)] 
fuzz/pcap: enable http2

4 years agoversion: continue 6 development
Victor Julien [Fri, 7 Aug 2020 14:42:22 +0000 (16:42 +0200)] 
version: continue 6 development

4 years agoversion: update to 6.0.0-beta1 suricata-6.0.0-beta1
Victor Julien [Fri, 7 Aug 2020 08:17:12 +0000 (10:17 +0200)] 
version: update to 6.0.0-beta1

4 years agochangelog: update for 6.0.0-beta1
Victor Julien [Fri, 7 Aug 2020 08:15:56 +0000 (10:15 +0200)] 
changelog: update for 6.0.0-beta1

4 years agoplugins: remove unused func, suppressing compile warning 5284/head
Victor Julien [Thu, 6 Aug 2020 21:06:31 +0000 (23:06 +0200)] 
plugins: remove unused func, suppressing compile warning

4 years agoplugins: add missing guards 5283/head
Victor Julien [Thu, 6 Aug 2020 19:04:03 +0000 (21:04 +0200)] 
plugins: add missing guards

4 years agodetect/http2: fix header inspection
Victor Julien [Thu, 6 Aug 2020 18:49:56 +0000 (20:49 +0200)] 
detect/http2: fix header inspection

Header inspection was overwriting data that was still being
referenced by the detect engine, leading to ASAN issues.

4 years agooutput/ssh: Use correct file context 5282/head
Jeff Lucovsky [Thu, 6 Aug 2020 14:28:55 +0000 (10:28 -0400)] 
output/ssh: Use correct file context

This commit corrects an issue with the SSH output module that resulted
in a SEGV when SSH output is logged.

4 years agoplugins: support for capture plugins
Jason Ish [Sat, 4 Jul 2020 06:33:08 +0000 (00:33 -0600)] 
plugins: support for capture plugins

Allow a plugin to register itself as a capture source. This isn't that
much different than how current sources register, it just happens
a little later on during startup.

One "slot" is reserved for capture plugins, but multiple plugins
implementing a capture can be loaded.  The --capture-plugin command
line option must be used to tell Suricata which plugin
to use.

This is still very much a work in progress, but can load
PF_RING as a capture plugin.

4 years agoplugins: initial support for a filetype plugin
Jason Ish [Fri, 3 Jul 2020 22:33:12 +0000 (16:33 -0600)] 
plugins: initial support for a filetype plugin

A filetype plugin is a plugin that implements an eve filetype. Most
of the current filetypes could likely be implemented as such a plugin.
Such a plugin must implement Open, Close and Write, where Write
is provided the formatted JSON to be logged.

This commit also includes the plumbing for plugin loading. Example
plugin to come.

Plugins are loaded by the "plugin" section in the configuration
file:

  plugins:
    - /path/to/directory/plugins
    - /path/to/plugin_file.so

This can also be done on the command line with:

  --set plugins.0=/path/plugin_file.so

4 years agoutil-error: define generic plugin error code
Jason Ish [Fri, 3 Jul 2020 22:25:55 +0000 (16:25 -0600)] 
util-error: define generic plugin error code

4 years agoconfigure: check for plugin support
Jason Ish [Thu, 23 Apr 2020 22:48:23 +0000 (16:48 -0600)] 
configure: check for plugin support

Currently plugin support requires the dlfcn.h header
file and compiler support for -rdynamic.

4 years agoplugins: config.h: move into src and rename to autoconf.h
Jason Ish [Thu, 23 Apr 2020 22:46:05 +0000 (16:46 -0600)] 
plugins: config.h: move into src and rename to autoconf.h

While fixing files that include config.h, just remove the
include if possible.

4 years agohttp2: log as http to abstract http and http2 a little
Jason Ish [Mon, 3 Aug 2020 22:21:52 +0000 (16:21 -0600)] 
http2: log as http to abstract http and http2 a little

This commit logs http2 as an http event. The idea is to somewhat
normalize http/http2 so common info can be version agnostic.

This puts the http2 specific fields in an "http2" object inside
the "http" object.

HTTP2 headers/values that are in common with HTTP1 are logged
under the "http" object to be compatible with HTTP1 logging.

4 years agohttp2: log headers in the same format as http (1)
Jason Ish [Mon, 3 Aug 2020 20:41:39 +0000 (14:41 -0600)] 
http2: log headers in the same format as http (1)

Log the headers in request_headers, and response_headers like
http1 to remain compatible.

4 years agosuricata.yaml: mark http2 as experimental
Jason Ish [Mon, 3 Aug 2020 15:24:36 +0000 (09:24 -0600)] 
suricata.yaml: mark http2 as experimental

Make it clear that HTTP2 is experimental and disabled by default.

4 years agohttp2: initial support
Philippe Antoine [Mon, 13 Jul 2020 15:07:20 +0000 (17:07 +0200)] 
http2: initial support

4 years agohttp2: adds documentation
Philippe Antoine [Mon, 13 Jul 2020 15:45:00 +0000 (17:45 +0200)] 
http2: adds documentation

4 years agodetect: generic structures for mpm with lists
Philippe Antoine [Sat, 16 May 2020 12:00:06 +0000 (14:00 +0200)] 
detect: generic structures for mpm with lists

4 years agoflow/spare: implement pool shrinking 5281/head
Victor Julien [Thu, 6 Aug 2020 12:38:36 +0000 (14:38 +0200)] 
flow/spare: implement pool shrinking

Remove at most one block per run, so it shrinks slowly.

4 years agoflow: redesign of flow timeout handling
Victor Julien [Thu, 19 Dec 2019 16:26:45 +0000 (17:26 +0100)] 
flow: redesign of flow timeout handling

Goals:
- reduce locking
- take advantage of 'hot' caches
- better locality

Locking reduction

New flow spare pool. The global pool is implmented as a list of blocks,
where each block has a 100 spare flows. Worker threads fetch a block at
a time, storing the block in the local thread storage.

Flow Recycler now returns flows to the pool is blocks as well.

Flow Recycler fetches all flows to be processed in one step instead of
one at a time.

Cache 'hot'ness

Worker threads now check the timeout of flows they evaluate during lookup.
The worker will have to read the flow into cache anyway, so the added
overhead of checking the timeout value is minimal. When a flow is considered
timed out, one of 2 things happens:

- if the flow is 'owned' by the thread it is handled locally. Handling means
  checking if the flow needs 'timeout' work.

- otherwise, the flow is added to a special 'evicted' list in the flow
  bucket where it will be picked up by the flow manager.

Flow Manager timing

By default the flow manager now tries to do passes of the flow hash in
smaller steps, where the goal is to do full pass in 8 x the lowest timeout
value it has to enforce. So if the lowest timeout value is 30s, a full pass
will take 4 minutes. The goal here is to reduce locking overhead and not
get in the way of the workers.

In emergency mode each pass is full, and lower timeouts are used.

Timing of the flow manager is also no longer relying on pthread condition
variables, as these generally cause waking up much quicker than the desired
timout. Instead a simple (u)sleep loop is used.

Both changes reduce the number of hash passes a lot.

Emergency behavior

In emergency mode there a number of changes to the workers. In this scenario
the flow memcap is fully used up and it is unavoidable that some flows won't
be tracked.

1. flow spare pool fetches are reduced to once a second. This avoids locking
   overhead, while the chance of success was very low.

2. getting an active flow directly from the hash skips flows that had very
   recent activity to avoid the scenario where all flows get only into the
   NEW state before getting reused. Rather allow some to have a chance of
   completing.

3. TCP packets that are not SYN packets will not get a used flow, unless
   stream.midstream is enabled. The goal here is again to avoid evicting
   active flows unnecessarily.

Better Localily

Flow Manager injects flows into the worker threads now, instead of one or
two packets. Advantage of this is that the worker threads can get packets
from their local packet pools, avoiding constant overhead of packets returning
to 'foreign' pools.

Counters

A lot of flow counters have been added and some have been renamed.

Overall the worker threads increment 'flow.wrk.*' counters, while the flow
manager increments 'flow.mgr.*'.

Additionally, none of the counters are snapshots anymore, they all increment
over time. The flow.memuse and flow.spare counters are exceptions.

Misc

FlowQueue has been split into a FlowQueuePrivate (unlocked) and FlowQueue.
Flow no longer has 'prev' pointers and used a unified 'next' pointer for
both hash and queue use.

4 years agounittests: check for flow memuse
Victor Julien [Mon, 3 Aug 2020 13:49:05 +0000 (15:49 +0200)] 
unittests: check for flow memuse

4 years agoflow-manager: call other timeouts max once a second
Victor Julien [Tue, 24 Dec 2019 15:12:51 +0000 (16:12 +0100)] 
flow-manager: call other timeouts max once a second

Call Defrag and others only once per second. Flow Manager may wake
up (much) more often when flow engine is under resource pressure.
As this does not affect Defrag and others, it only unnecessarily
adds load.

4 years agoflow-manager: only update FlowBucket::next_ts if it changed
Victor Julien [Mon, 23 Dec 2019 19:22:37 +0000 (20:22 +0100)] 
flow-manager: only update FlowBucket::next_ts if it changed

4 years agoflow: unref flow at end of flow worker
Victor Julien [Wed, 29 Jan 2020 06:55:12 +0000 (07:55 +0100)] 
flow: unref flow at end of flow worker

4 years agoflow: do timeout checks before tuple compare
Victor Julien [Mon, 13 Jan 2020 19:06:00 +0000 (20:06 +0100)] 
flow: do timeout checks before tuple compare

4 years agoflow: don't reorder list on lookup
Victor Julien [Mon, 13 Jan 2020 14:39:20 +0000 (15:39 +0100)] 
flow: don't reorder list on lookup

Reduces cache misses.

4 years agoflow: timeout check on flow lookup
Victor Julien [Mon, 23 Dec 2019 13:23:05 +0000 (14:23 +0100)] 
flow: timeout check on flow lookup

4 years agoflow: simplify hash lookup logic
Victor Julien [Mon, 23 Dec 2019 12:53:48 +0000 (13:53 +0100)] 
flow: simplify hash lookup logic

Remove double compare paths in favor of a single unified path.

4 years agoflow: only move lastts forward
Victor Julien [Mon, 23 Dec 2019 15:09:51 +0000 (16:09 +0100)] 
flow: only move lastts forward

Pcaps with timestamps jumping around could confuse flow timeout
handling otherwise.

4 years agoflow/worker: check pkt src using DEBUG_VALIDATE_BUG_ON
Victor Julien [Sat, 2 May 2020 18:17:04 +0000 (20:17 +0200)] 
flow/worker: check pkt src using DEBUG_VALIDATE_BUG_ON

5 years agorust/rdp: Fix use of incorrect buffer 5276/head
Jeff Lucovsky [Wed, 5 Aug 2020 13:56:58 +0000 (09:56 -0400)] 
rust/rdp: Fix use of incorrect buffer

This commit updates the connection confirmation parsing function to use
the correct buffer when determining the packet type.

5 years agosmb: use uuid crate
Shivani Bhardwaj [Wed, 5 Aug 2020 11:54:09 +0000 (17:24 +0530)] 
smb: use uuid crate

5 years agorust: only run cbindgen if needed
Jason Ish [Wed, 17 Jun 2020 22:44:28 +0000 (16:44 -0600)] 
rust: only run cbindgen if needed

Only run cbindgen when necessary. This is a bit tricky. When
building a dist we want to unconditionally build the headers.

When going through a "make; sudo make install" type process,
cbindgen should not be run as the headers already exist, are
valid, and the environment under sudo is more often than
not suitable to pick up the Rust toolchains when installed
with rustup.

For the normal "make" case we have the gen/rust-bindings.h file
depend on library file, this will cause it to only be rebuilt
if the code was modified.

For "make dist" we unconditionally create "dist/rust-bindings.h".
This means the generated file could be in 2 locations, so update
configure.ac, and the library search find to find it.

The "gen/rust-bindings.h" should be picked up first if it exists,
for those who develop from a dist archive where "dist/rust-bindings.h"
also exists.

Not completely happy having the same file in 2 locations, but not
sure how else to get the dependency tracking correct.

5 years agoalert/eve: add snmp metadata for rdp alerts
Jason Ish [Tue, 4 Aug 2020 22:27:30 +0000 (16:27 -0600)] 
alert/eve: add snmp metadata for rdp alerts

Redmine issue:
https://redmine.openinfosecfoundation.org/issues/3441

5 years agoalert/eve: add snmp metadata for snmp alerts
Jason Ish [Tue, 4 Aug 2020 21:35:07 +0000 (15:35 -0600)] 
alert/eve: add snmp metadata for snmp alerts

Redmine issue:
https://redmine.openinfosecfoundation.org/issues/3441

5 years agodcerpc: handle gap for TCP streams 5270/head
Shivani Bhardwaj [Thu, 25 Jun 2020 20:02:59 +0000 (01:32 +0530)] 
dcerpc: handle gap for TCP streams

5 years agodns: add tailing data to split tcp unit test 5266/head
Jason Ish [Tue, 4 Aug 2020 19:50:26 +0000 (13:50 -0600)] 
dns: add tailing data to split tcp unit test

Add trailing data to the complete payload to test the case
where data is consumed, but still incomplete.

5 years agodns: fix subtraction overflow in debug message
Jason Ish [Tue, 4 Aug 2020 19:47:19 +0000 (13:47 -0600)] 
dns: fix subtraction overflow in debug message

The math for the return value wasn't updated in the debug log
to match the logic and could lead to a subtraction overflow

5 years agodns: return status from parsing tcp request
Philippe Antoine [Thu, 30 Jul 2020 15:23:48 +0000 (17:23 +0200)] 
dns: return status from parsing tcp request

5 years agodns: fix incomplete results
Philippe Antoine [Thu, 30 Jul 2020 14:32:40 +0000 (16:32 +0200)] 
dns: fix incomplete results

and messages parsing whose length is >= 32768

5 years agopcap: recusively reading pcaps / documentation 5265/head
James Dutrisac [Tue, 28 Jul 2020 17:10:42 +0000 (13:10 -0400)] 
pcap: recusively reading pcaps / documentation

Changes to doc/userguide/partials/options.rst for feature 2363
   (reading pcaps recursively)

5 years agopcap: read directories recursively
James Dutrisac [Tue, 28 Jul 2020 17:09:48 +0000 (13:09 -0400)] 
pcap: read directories recursively

Describe Changes
- Added ability to recursively read pcap directories
- src/suricata.c: addition of new command line parameter
    --pcap-file-recursive
- src/source-pcap-file.c: parsing of the command line argument
- src/source-pcap-file-directory-helper.h: two thread vars tracking
    directory depth and should recurse
- src/util-error.c / src/util-error.h:
   Added new warning code "SC_WARN_PATH_READ_ERROR"
- Redmine ticket: https://redmine.openinfosecfoundation.org/issues/2363

Ticket: #2363

5 years agopath: introduce path handling util funcs
James Dutrisac [Tue, 28 Jul 2020 17:08:29 +0000 (13:08 -0400)] 
path: introduce path handling util funcs

This commit provides changes to util-path.c and util-path.h
to support the recursive reading of directories. It adds
4 functions.
- SCIsRegularFile to provide OS independent file info.
- SCIsRegularDirectory to provide OS independent directory info.
- SCRealPath is an OS independent wrapper for realpath.
- PathJoin to manage path resolution logic.

5 years agostream/app-layer: break loop on proto change
Philippe Antoine [Fri, 31 Jul 2020 06:56:37 +0000 (08:56 +0200)] 
stream/app-layer: break loop on proto change

5 years agodatasets: fix null pointer deref
Shivani Bhardwaj [Mon, 3 Aug 2020 16:43:59 +0000 (22:13 +0530)] 
datasets: fix null pointer deref

5 years agodatasets: Init even in socket mode
Shivani Bhardwaj [Mon, 3 Aug 2020 16:41:40 +0000 (22:11 +0530)] 
datasets: Init even in socket mode

Closes redmine ticket 3476.

5 years agodetect-mqtt: unify error handling in rule parsing
Sascha Steinbiss [Mon, 3 Aug 2020 08:27:26 +0000 (10:27 +0200)] 
detect-mqtt: unify error handling in rule parsing

This is meant to provide a single path to the error case.
This might help make things more clear for static
checkers.

5 years agodetect-engine: initialize struct fields
Sascha Steinbiss [Mon, 3 Aug 2020 08:26:04 +0000 (10:26 +0200)] 
detect-engine: initialize struct fields

5 years agohttp: merge duplicated code
Philippe Antoine [Tue, 19 May 2020 12:01:25 +0000 (14:01 +0200)] 
http: merge duplicated code

HtpRequestBodyHandlePUT and HtpRequestBodyHandlePOST

5 years agohttp: use more precise parameter in HtpRequestBodySetupMultipart
Philippe Antoine [Tue, 19 May 2020 11:59:56 +0000 (13:59 +0200)] 
http: use more precise parameter in HtpRequestBodySetupMultipart

So that we can see that it does not have to handle gaps

5 years agohttp: remove unused code
Philippe Antoine [Tue, 19 May 2020 11:58:38 +0000 (13:58 +0200)] 
http: remove unused code

HtpRequestBodySetupPUT function
So that we can see that we do not use data=NULL in there

5 years agofile: handles gaps natively
Philippe Antoine [Tue, 19 May 2020 11:55:41 +0000 (13:55 +0200)] 
file: handles gaps natively

ie data=NULL and len>0 parameters

5 years agoutil: PrintRawDataFp handles null
Philippe Antoine [Tue, 19 May 2020 11:50:24 +0000 (13:50 +0200)] 
util: PrintRawDataFp handles null

for gaps which are data=NULL and len>0

5 years agofiles: rust closes files even on 0 length chunk
Philippe Antoine [Wed, 1 Jul 2020 18:14:27 +0000 (20:14 +0200)] 
files: rust closes files even on 0 length chunk

5 years agoapplayer: allow rust parsers to have only one probe
Philippe Antoine [Fri, 13 Mar 2020 08:37:56 +0000 (09:37 +0100)] 
applayer: allow rust parsers to have only one probe

5 years agooutput-json: add MAC address output 5258/head
Sascha Steinbiss [Mon, 2 Mar 2020 18:10:30 +0000 (19:10 +0100)] 
output-json: add MAC address output

This commit adds MAC address output to the EVE-JSON format. We follow the
remarks made in Redmine ticket #962: for packets, log MAC src/dst as a
scalar field in EVE; for flows, log MAC src/dst as lists in EVE. Field names
are different between flow and packet context to avoid type confusion
(src_mac vs. src_macs). Configuration approach and JSON representation is
taken from previous GitHub PR #2700.

5 years agooutput/anomaly: Restrict anomaly logger count
Jeff Lucovsky [Sat, 1 Aug 2020 13:45:04 +0000 (09:45 -0400)] 
output/anomaly: Restrict anomaly logger count

This commit restricts the anomaly logger count. The restriction is
necessary due to state maintenance in the logger that doesn't scale
beyond a single logger.

Until that issue's solved, when multiple anomaly loggers are configured,
an error message will be emitted to highlight the restriction.

5 years agosignature: checks for integer overflow in limits propagation
Philippe Antoine [Thu, 23 Jul 2020 09:26:16 +0000 (11:26 +0200)] 
signature: checks for integer overflow in limits propagation

5 years agoeve/yaml: move mqtt down
Victor Julien [Sun, 2 Aug 2020 18:23:29 +0000 (20:23 +0200)] 
eve/yaml: move mqtt down

5 years agofuzz/pcap: enable MQTT parser
Victor Julien [Sun, 2 Aug 2020 18:23:08 +0000 (20:23 +0200)] 
fuzz/pcap: enable MQTT parser

5 years agodatasets: reload static sets
Shivani Bhardwaj [Mon, 27 Jul 2020 13:47:10 +0000 (19:17 +0530)] 
datasets: reload static sets

5 years agorust/mqtt: add MQTT parser
Sascha Steinbiss [Mon, 4 May 2020 13:29:23 +0000 (15:29 +0200)] 
rust/mqtt: add MQTT parser

5 years agodetect: adds engine for u8 keywords
Philippe Antoine [Fri, 3 Apr 2020 07:16:24 +0000 (09:16 +0200)] 
detect: adds engine for u8 keywords