]> git.ipfire.org Git - thirdparty/suricata.git/log
thirdparty/suricata.git
9 years agoutil-runmode: pass initdata to runmode workers for nfqueue 2156/head
Andreas Herz [Wed, 15 Jun 2016 21:44:34 +0000 (23:44 +0200)] 
util-runmode: pass initdata to runmode workers for nfqueue

The VerdictNFQ was missing the initdata which results in a segfault
within CaptureStatsSetup. This commit adds the passing of the initdata.

9 years agoafpacket: disable tpacket-v3 by default 2155/head
Victor Julien [Fri, 17 Jun 2016 07:32:16 +0000 (09:32 +0200)] 
afpacket: disable tpacket-v3 by default

It's still considered experimental at this point.

9 years agolibnet: work around older libnet type difference 2143/head
Victor Julien [Wed, 8 Jun 2016 14:58:55 +0000 (16:58 +0200)] 
libnet: work around older libnet type difference

Older libnet 1.1.x have a non-const type for libnet_init's dev
argument.

9 years agopfring: no longer link against rt and numa libs
Victor Julien [Wed, 8 Jun 2016 11:52:34 +0000 (13:52 +0200)] 
pfring: no longer link against rt and numa libs

9 years agodetect: get proper legacy custom values. Issue #1804
Victor Julien [Wed, 8 Jun 2016 06:57:29 +0000 (08:57 +0200)] 
detect: get proper legacy custom values. Issue #1804

9 years agolivedev: shorten devname at registration
Victor Julien [Wed, 8 Jun 2016 06:17:13 +0000 (08:17 +0200)] 
livedev: shorten devname at registration

9 years agoafl: fix various --afl-* options
Victor Julien [Tue, 7 Jun 2016 16:29:42 +0000 (18:29 +0200)] 
afl: fix various --afl-* options

9 years agoUpdate Changelog for 3.1RC1 suricata-3.1RC1
Victor Julien [Tue, 7 Jun 2016 12:56:13 +0000 (14:56 +0200)] 
Update Changelog for 3.1RC1

9 years agohttp body: fix compression tests 2140/head
Victor Julien [Mon, 30 May 2016 12:55:34 +0000 (14:55 +0200)] 
http body: fix compression tests

9 years agohttp: set of response body decompress limit
Victor Julien [Thu, 9 Jul 2015 14:47:25 +0000 (16:47 +0200)] 
http: set of response body decompress limit

This is a per personality setting.

9 years agounittest: minor cleanup
Victor Julien [Wed, 8 Jul 2015 11:43:59 +0000 (13:43 +0200)] 
unittest: minor cleanup

9 years agohttp: update compression mismatch test
Victor Julien [Fri, 26 Feb 2016 13:00:00 +0000 (14:00 +0100)] 
http: update compression mismatch test

9 years agoconfigure: cleanup configure output 2139/head
Victor Julien [Thu, 31 Mar 2016 19:12:57 +0000 (21:12 +0200)] 
configure: cleanup configure output

Don't present missing spatch as a warning. Remove verbose libnet
warnings as well.

9 years agodetect-filemagic: fix heap-use-after-free 2138/head
Andreas Herz [Sat, 4 Jun 2016 22:48:38 +0000 (00:48 +0200)] 
detect-filemagic: fix heap-use-after-free

This fixes the heap-use-after-free issue with sm being freed without
being removed from the signature (s) list. Move the protocol check for
rules with filemagic before the alloc and make the error log more
precise.

9 years agonetmap: work around mtu error on iface+ settings 2137/head
Victor Julien [Fri, 3 Jun 2016 10:38:08 +0000 (12:38 +0200)] 
netmap: work around mtu error on iface+ settings

9 years agonetmap: don't set more than 1 thread on sw ring
Victor Julien [Fri, 3 Jun 2016 10:28:09 +0000 (12:28 +0200)] 
netmap: don't set more than 1 thread on sw ring

9 years agonetmap: code cleanup
Victor Julien [Fri, 3 Jun 2016 10:27:47 +0000 (12:27 +0200)] 
netmap: code cleanup

9 years agoconfigure: don't set -march=native for powerpc
Victor Julien [Fri, 3 Jun 2016 10:25:14 +0000 (12:25 +0200)] 
configure: don't set -march=native for powerpc

9 years agoyaml: improve affinity defaults
Victor Julien [Fri, 3 Jun 2016 08:53:46 +0000 (10:53 +0200)] 
yaml: improve affinity defaults

9 years agoaffinity: small cleanups to output & code
Victor Julien [Fri, 3 Jun 2016 08:49:53 +0000 (10:49 +0200)] 
affinity: small cleanups to output & code

9 years agoaffinity: rename detect -> worker set internall
Victor Julien [Fri, 3 Jun 2016 08:37:59 +0000 (10:37 +0200)] 
affinity: rename detect -> worker set internall

9 years agoaffinity: rename detect-cpu-set to worker-cpu-set
Victor Julien [Fri, 3 Jun 2016 08:32:43 +0000 (10:32 +0200)] 
affinity: rename detect-cpu-set to worker-cpu-set

Add fallback for existing configs.

9 years agoaffinity: improve suricata.yaml doc
Victor Julien [Fri, 3 Jun 2016 08:24:03 +0000 (10:24 +0200)] 
affinity: improve suricata.yaml doc

9 years agoaffinity: remove unused settings
Victor Julien [Fri, 3 Jun 2016 08:01:28 +0000 (10:01 +0200)] 
affinity: remove unused settings

These were never referenced to in the code so they can be removed.

Add bypass to config parser in case the settings are still in old
yamls.

9 years agoaffinity: type cleanup
Victor Julien [Fri, 3 Jun 2016 07:55:44 +0000 (09:55 +0200)] 
affinity: type cleanup

9 years agooutput: reduce verbosity on info level
Victor Julien [Fri, 3 Jun 2016 07:45:23 +0000 (09:45 +0200)] 
output: reduce verbosity on info level

9 years agonetmap: don't check for offloading twice
Victor Julien [Fri, 3 Jun 2016 07:33:12 +0000 (09:33 +0200)] 
netmap: don't check for offloading twice

9 years agonetmap: output cleanup
Victor Julien [Fri, 3 Jun 2016 07:32:37 +0000 (09:32 +0200)] 
netmap: output cleanup

9 years agooutput: introduce config and perf output levels 2136/head
Victor Julien [Sat, 11 Jul 2015 21:14:14 +0000 (23:14 +0200)] 
output: introduce config and perf output levels

Goal is to reduce info output

9 years agooutput: improve notice and warning/error color handling
Victor Julien [Sat, 11 Jul 2015 21:22:37 +0000 (23:22 +0200)] 
output: improve notice and warning/error color handling

9 years agoyaml: profiling 'json' depend on jansson availability
Victor Julien [Thu, 2 Jun 2016 08:06:38 +0000 (10:06 +0200)] 
yaml: profiling 'json' depend on jansson availability

9 years agoprofiling: fix minor compiler warning
Victor Julien [Thu, 2 Jun 2016 06:06:07 +0000 (08:06 +0200)] 
profiling: fix minor compiler warning

9 years agonetmap: get offloading settings and warn if needed 2134/head
Victor Julien [Thu, 2 Jun 2016 08:49:35 +0000 (10:49 +0200)] 
netmap: get offloading settings and warn if needed

Add FreeBSD lookup function and use the existing code on Linux.

9 years agonetmap: get correct RSS queues on Linux as well 2133/head
Victor Julien [Thu, 2 Jun 2016 09:01:29 +0000 (11:01 +0200)] 
netmap: get correct RSS queues on Linux as well

9 years agonetmap: reduce verbosity at startup 2132/head
Victor Julien [Thu, 2 Jun 2016 06:09:12 +0000 (08:09 +0200)] 
netmap: reduce verbosity at startup

9 years agonetmap: handle missing config with better defaults
Victor Julien [Thu, 2 Jun 2016 04:53:32 +0000 (06:53 +0200)] 
netmap: handle missing config with better defaults

Default to 'threads: auto' which uses RSS RX count when no config
has been created for a interface.

9 years agonetmap: implement 'threads: auto'
Victor Julien [Thu, 2 Jun 2016 04:41:50 +0000 (06:41 +0200)] 
netmap: implement 'threads: auto'

Add until function for retrieving RSS RX count from netmap. Use the
RSS count to create the threads.

9 years agoinstance: use enum for runmode 2131/head
Victor Julien [Wed, 1 Jun 2016 18:08:47 +0000 (20:08 +0200)] 
instance: use enum for runmode

9 years agoinstance: memset to 0 before use
Victor Julien [Wed, 1 Jun 2016 18:08:20 +0000 (20:08 +0200)] 
instance: memset to 0 before use

9 years agoutil-ioctcl: increase header size 2129/head
Eric Leblond [Tue, 31 May 2016 13:55:31 +0000 (15:55 +0200)] 
util-ioctcl: increase header size

Headers can contain VLAN or Qing so we need to increase the value
returned by GetIfaceMaxHWHeaderLength.

9 years agosuricata: fix double packet processing threads
Andreas Herz [Tue, 31 May 2016 21:18:06 +0000 (23:18 +0200)] 
suricata: fix double packet processing threads

With the additional ParseInterfacesList the packet processing threads
were doubled since the Interface was included twice unless the device
was passed via the commandline with af-packet=IF.
The additonal ParseInterfacesList isn't necessary so remove it again

9 years agoac-ks: don't allow use on big-endian
Victor Julien [Tue, 31 May 2016 14:58:29 +0000 (16:58 +0200)] 
ac-ks: don't allow use on big-endian

9 years agoflow-worker: small cleanups
Victor Julien [Mon, 30 May 2016 16:01:02 +0000 (18:01 +0200)] 
flow-worker: small cleanups

9 years agodetect: make pattern matcher messages less verbose
Victor Julien [Mon, 30 May 2016 15:55:27 +0000 (17:55 +0200)] 
detect: make pattern matcher messages less verbose

9 years agoyaml: replace ac-tile by ac-ks
Victor Julien [Mon, 30 May 2016 15:52:43 +0000 (17:52 +0200)] 
yaml: replace ac-tile by ac-ks

9 years agoyaml: remove conf_filename global
Victor Julien [Tue, 31 May 2016 14:21:50 +0000 (16:21 +0200)] 
yaml: remove conf_filename global

conf_filename was a global pointer to the filename of the yaml.

Move into SCInstance. This reduces it's scope and cleans up the code.

9 years agoprofiling: fix compilation if libjansson is missing 2124/head
Victor Julien [Tue, 31 May 2016 12:41:31 +0000 (14:41 +0200)] 
profiling: fix compilation if libjansson is missing

9 years agopfring: cleanup
Victor Julien [Tue, 31 May 2016 12:22:00 +0000 (14:22 +0200)] 
pfring: cleanup

9 years agopfring: improve profiling
Victor Julien [Tue, 31 May 2016 12:18:04 +0000 (14:18 +0200)] 
pfring: improve profiling

Reset packet profiling after pfring_recv. The packet was taken from
the packet pool before this call. The packet will already have it's
start ticks initialized. To avoid including ticks while pfring_recv
waits for traffic, reset the ticks right after it.

9 years agoprofiling: allow packet profiling to be reset
Victor Julien [Tue, 31 May 2016 12:17:35 +0000 (14:17 +0200)] 
profiling: allow packet profiling to be reset

9 years agocoverity: fix CID 1362014
Eric Leblond [Tue, 31 May 2016 09:21:31 +0000 (11:21 +0200)] 
coverity: fix CID 1362014

Error handling was not correct regarding ring buffer memory
handling.

9 years agoaf-packet: use better defaults if config is missing
Victor Julien [Tue, 31 May 2016 11:44:16 +0000 (13:44 +0200)] 
af-packet: use better defaults if config is missing

9 years agoyaml: make eve log in yaml depend on libjansson 2121/head
Victor Julien [Tue, 31 May 2016 06:57:07 +0000 (08:57 +0200)] 
yaml: make eve log in yaml depend on libjansson

9 years agoyaml: improve capture comments
Victor Julien [Tue, 31 May 2016 06:51:57 +0000 (08:51 +0200)] 
yaml: improve capture comments

9 years agoyaml: move classification etc below the rules
Victor Julien [Tue, 31 May 2016 06:51:15 +0000 (08:51 +0200)] 
yaml: move classification etc below the rules

9 years agoyaml: new defaults for outputs
Victor Julien [Tue, 31 May 2016 06:50:45 +0000 (08:50 +0200)] 
yaml: new defaults for outputs

Enable eve.flow, disable plain http.log.

9 years agoyaml: file logging at info level
Victor Julien [Mon, 30 May 2016 19:32:17 +0000 (21:32 +0200)] 
yaml: file logging at info level

9 years agoyaml: improved defaults and misc cleanups
Victor Julien [Mon, 30 May 2016 19:30:25 +0000 (21:30 +0200)] 
yaml: improved defaults and misc cleanups

9 years agoyaml: add performance tuning section
Victor Julien [Mon, 30 May 2016 19:21:20 +0000 (21:21 +0200)] 
yaml: add performance tuning section

9 years agoyaml: more reshuffling
Victor Julien [Mon, 30 May 2016 19:10:44 +0000 (21:10 +0200)] 
yaml: more reshuffling

9 years agoyaml: create advancted sections
Victor Julien [Mon, 30 May 2016 17:38:46 +0000 (19:38 +0200)] 
yaml: create advancted sections

Sections for advancted detection settings and traffic tracking and
reconstruction.

9 years agoyaml: add hw accel section, move cuda there
Victor Julien [Mon, 30 May 2016 17:33:00 +0000 (19:33 +0200)] 
yaml: add hw accel section, move cuda there

9 years agoyaml: add netfilter section
Victor Julien [Mon, 30 May 2016 17:30:33 +0000 (19:30 +0200)] 
yaml: add netfilter section

9 years agoyaml: move outputs to the logging step
Victor Julien [Mon, 30 May 2016 17:28:34 +0000 (19:28 +0200)] 
yaml: move outputs to the logging step

9 years agoyaml: introduce 'advanced settings'
Victor Julien [Mon, 30 May 2016 17:19:56 +0000 (19:19 +0200)] 
yaml: introduce 'advanced settings'

9 years agoyaml: move app layer up
Victor Julien [Mon, 30 May 2016 17:15:41 +0000 (19:15 +0200)] 
yaml: move app layer up

9 years agoyaml: move afpacket, pcap, pcap-file up
Victor Julien [Mon, 30 May 2016 17:10:31 +0000 (19:10 +0200)] 
yaml: move afpacket, pcap, pcap-file up

9 years agoyaml: move logging up
Victor Julien [Mon, 30 May 2016 17:02:17 +0000 (19:02 +0200)] 
yaml: move logging up

9 years agoyaml: move rules up in the file
Victor Julien [Mon, 30 May 2016 16:57:20 +0000 (18:57 +0200)] 
yaml: move rules up in the file

Also disable decoder and stream events by default, as they are too noisy
in a untuned environment.

9 years agoyaml: move vars to the top
Victor Julien [Mon, 30 May 2016 16:53:52 +0000 (18:53 +0200)] 
yaml: move vars to the top

9 years agologging: clean up at shutdown
Victor Julien [Tue, 31 May 2016 02:22:47 +0000 (04:22 +0200)] 
logging: clean up at shutdown

9 years agoflow worker: move UDP app-layer into main function 2118/head
Victor Julien [Sun, 29 May 2016 09:29:30 +0000 (11:29 +0200)] 
flow worker: move UDP app-layer into main function

This way it's more clean what happens and we can profile it.

9 years agoflow worker: profiling
Victor Julien [Sun, 29 May 2016 08:40:46 +0000 (10:40 +0200)] 
flow worker: profiling

Previously the detect and stream code lived in their own thread
modules. This meant profiling showed their cost as part of the
thread module profiling logic. Now that only the flow worker is
a thread module this no longer works.

This patch introduces profiling for the 3 current flow worker
steps: flow, stream, detect.

9 years agodebug: fix compiler warnings 2115/head
Victor Julien [Sat, 28 May 2016 07:21:05 +0000 (09:21 +0200)] 
debug: fix compiler warnings

9 years agothread modules: remove unused id's
Victor Julien [Fri, 27 May 2016 14:46:03 +0000 (16:46 +0200)] 
thread modules: remove unused id's

9 years agodetect: no longer a thread module
Victor Julien [Fri, 27 May 2016 14:39:14 +0000 (16:39 +0200)] 
detect: no longer a thread module

Like stream, detect is now invoked directly by the FlowWorker.

9 years agostream-tcp: more cleanups
Victor Julien [Fri, 27 May 2016 14:10:59 +0000 (16:10 +0200)] 
stream-tcp: more cleanups

9 years agostream-tcp: no longer register as a thread module
Victor Julien [Fri, 27 May 2016 14:02:06 +0000 (16:02 +0200)] 
stream-tcp: no longer register as a thread module

Now that the FlowWorker handles the TCP Stream directly, having
the TCP engine as a thread module is no longer needed.

This patch removes the registration.

9 years agodrmemory: broader suppressions for hyperscan
Victor Julien [Fri, 27 May 2016 12:54:36 +0000 (14:54 +0200)] 
drmemory: broader suppressions for hyperscan

9 years agosmtp: improve thread data use
Victor Julien [Fri, 27 May 2016 10:14:16 +0000 (12:14 +0200)] 
smtp: improve thread data use

The SMTP app layer used a thread local data structure for the mpm in
reply parsing, but it only used a pmq. The MpmThreadCtx was actually
global. Until now this wasn't really noticed because non of the mpm's
used the thread ctx.

Hyperscan does use it however.

This patch creates a new structure SMTPThreadCtx, which contains both
the pmq and the mpm thread ctx. It's passed directly to the reply
parsing function instead of storing a pointer to it in the SMTPState.

Additionally fix a small memory leak warning wrt the smtp global mpm
state.

9 years agoapp-layer-smtp: free mpm contexts on shutdown
Justin Viiret [Wed, 25 May 2016 01:47:24 +0000 (11:47 +1000)] 
app-layer-smtp: free mpm contexts on shutdown

Adds a cleanup function for the SMTP parser that destroys the MPM
context and MPM thread context it uses.

Also marks smtp_mpm_thread_ctx static.

9 years agodetect-engine: log MPM/SPM matchers being used
Justin Viiret [Mon, 23 May 2016 04:22:30 +0000 (14:22 +1000)] 
detect-engine: log MPM/SPM matchers being used

9 years agompm: add "auto" default for mpm-algo
Justin Viiret [Mon, 23 May 2016 00:46:53 +0000 (10:46 +1000)] 
mpm: add "auto" default for mpm-algo

Setting mpm-algo to "auto" will use "hs" if Suricata was built against
Hyperscan, and "ac" otherwise (or "ac-tile" on Tilera platforms).

9 years agoapp-layer-detect-proto: use mpm-algo
Justin Viiret [Mon, 23 May 2016 03:46:24 +0000 (13:46 +1000)] 
app-layer-detect-proto: use mpm-algo

Use the matcher configured by the user rather than hard-coding MPM_AC.

9 years agoapp-layer-detect-proto: pass mpm_ctx to DestroyCtx
Justin Viiret [Mon, 23 May 2016 03:42:05 +0000 (13:42 +1000)] 
app-layer-detect-proto: pass mpm_ctx to DestroyCtx

The MPM DestroyCtx function accepts the MpmCtx, not the ctx pointer
inside it.

9 years agodetect-engine: adjust unit tests for hs mpm
Justin Viiret [Mon, 23 May 2016 01:58:01 +0000 (11:58 +1000)] 
detect-engine: adjust unit tests for hs mpm

The Hyperscan MPM does match deduplication internally (using
HS_FLAG_SINGLEMATCH) and only returns the number of unique matches,
unlike AC.

9 years agoapp-layer-smtp: init mpm thread ctx after prepare
Justin Viiret [Mon, 23 May 2016 01:06:39 +0000 (11:06 +1000)] 
app-layer-smtp: init mpm thread ctx after prepare

This allows the Hyperscan MPM to correctly allocate scratch.

9 years agompm-hs: make errors from hs_scan() fatal
Justin Viiret [Mon, 23 May 2016 03:57:50 +0000 (13:57 +1000)] 
mpm-hs: make errors from hs_scan() fatal

Hyperscan will only return an error at scan time if the database or
scratch region are corrupted, which should provoke a fatal error.

9 years agompm-hs,spm-hs: don't call hs_scan() for zero bytes
Justin Viiret [Mon, 23 May 2016 04:06:00 +0000 (14:06 +1000)] 
mpm-hs,spm-hs: don't call hs_scan() for zero bytes

9 years agonetmap: close sw ring before hw rings
Aleksey Katargin [Wed, 25 May 2016 04:45:07 +0000 (09:45 +0500)] 
netmap: close sw ring before hw rings
Fix issue #1714

9 years agotls-json-log: register module as tls-json-log, not dns-json-log
Jason Ish [Thu, 26 May 2016 17:44:19 +0000 (11:44 -0600)] 
tls-json-log: register module as tls-json-log, not dns-json-log

Fixes issue:
https://redmine.openinfosecfoundation.org/issues/1792
where dns-json-log would not log any data.

9 years agoprscript: fix error handling
Eric Leblond [Fri, 27 May 2016 07:16:02 +0000 (09:16 +0200)] 
prscript: fix error handling

Last result was used as global result.

9 years agoisdataat: remove unused code
Victor Julien [Tue, 24 May 2016 14:57:16 +0000 (16:57 +0200)] 
isdataat: remove unused code

9 years agosrc/: fix typo: receieved vs received 2095/head
Arturo Borrero Gonzalez [Mon, 23 May 2016 10:32:34 +0000 (12:32 +0200)] 
src/: fix typo: receieved vs received

Reported by Debian's lintian tool.

Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
9 years agoflow worker: set up decoder thread vars
Victor Julien [Sat, 21 May 2016 12:22:13 +0000 (14:22 +0200)] 
flow worker: set up decoder thread vars

9 years agoac: allow use of 31bits of pid space instead of 16 2092/head
Victor Julien [Fri, 22 Apr 2016 10:57:41 +0000 (12:57 +0200)] 
ac: allow use of 31bits of pid space instead of 16

9 years agodns: add support for sshfp records
Victor Julien [Wed, 23 Sep 2015 14:34:40 +0000 (16:34 +0200)] 
dns: add support for sshfp records

Update parser to process the records.

Update json output to log it.

9 years agocoverity: CID 1362011: Control flow issues (DEADCODE)
Victor Julien [Fri, 20 May 2016 16:45:16 +0000 (18:45 +0200)] 
coverity: CID 1362011: Control flow issues (DEADCODE)

9 years agocoverity: CID 1362012: Incorrect expression (EVALUATION_ORDER)
Victor Julien [Fri, 20 May 2016 16:42:46 +0000 (18:42 +0200)] 
coverity: CID 1362012: Incorrect expression (EVALUATION_ORDER)

9 years agocoverity CID 1362013: Control flow issues (NESTING_INDENT_MISMATCH)
Victor Julien [Fri, 20 May 2016 16:40:45 +0000 (18:40 +0200)] 
coverity CID 1362013: Control flow issues (NESTING_INDENT_MISMATCH)