]> git.ipfire.org Git - thirdparty/suricata.git/log
thirdparty/suricata.git
7 years agoupdated links to suricata.readthedocs.io
jason taylor [Thu, 2 Nov 2017 12:33:54 +0000 (08:33 -0400)] 
updated links to suricata.readthedocs.io

Signed-off-by: jason taylor <jtfas90@gmail.com>
7 years agodetect/dns: fix misdetection on dns_query on udp 2982/head
Victor Julien [Tue, 7 Nov 2017 16:18:30 +0000 (17:18 +0100)] 
detect/dns: fix misdetection on dns_query on udp

If 'raw' content patterns were used in a dns_query rule, the raw
patterns would only be evaluated for TCP, but not for UDP.

This patch adds the inspection for UDP as well.

Bug #2263.

7 years agovalgrind: suppressions for NIC offloading calls 2969/head
Peter Manev [Wed, 1 Nov 2017 12:19:21 +0000 (13:19 +0100)] 
valgrind: suppressions for NIC offloading calls

7 years agodetect/profile: minor fixes
Victor Julien [Wed, 1 Nov 2017 09:16:15 +0000 (10:16 +0100)] 
detect/profile: minor fixes

7 years agoinstall: use up to date url for 'make install-full'
Victor Julien [Sun, 29 Oct 2017 07:38:43 +0000 (08:38 +0100)] 
install: use up to date url for 'make install-full'

7 years agotravis: allow rust-stable build to fail 2952/head
Jason Ish [Tue, 24 Oct 2017 22:34:00 +0000 (16:34 -0600)] 
travis: allow rust-stable build to fail

7 years agotravis: rust 1.21.0 build
Jason Ish [Tue, 24 Oct 2017 14:25:59 +0000 (08:25 -0600)] 
travis: rust 1.21.0 build

7 years agotravis: do make distcheck on Rust 1.15.0 build
Jason Ish [Tue, 24 Oct 2017 12:52:25 +0000 (06:52 -0600)] 
travis: do make distcheck on Rust 1.15.0 build

7 years agodetect: don't register http_*_line twice
Victor Julien [Tue, 24 Oct 2017 06:56:48 +0000 (08:56 +0200)] 
detect: don't register http_*_line twice

7 years agodetect: test for byte_extract/isdataat large values
Victor Julien [Sat, 21 Oct 2017 08:17:07 +0000 (10:17 +0200)] 
detect: test for byte_extract/isdataat large values

7 years agodetect: handle very large byte_extract'ed values in isdataat
Victor Julien [Sat, 21 Oct 2017 08:16:30 +0000 (10:16 +0200)] 
detect: handle very large byte_extract'ed values in isdataat

7 years agodetect: add unittest for byte_extract/isdataat
Victor Julien [Sat, 21 Oct 2017 08:01:20 +0000 (10:01 +0200)] 
detect: add unittest for byte_extract/isdataat

7 years agodetect: implement byte_extract support for isdataat
Victor Julien [Sat, 21 Oct 2017 08:00:47 +0000 (10:00 +0200)] 
detect: implement byte_extract support for isdataat

7 years agodetect: add debug statements for byte_extract/isdataat
Victor Julien [Sat, 21 Oct 2017 08:00:08 +0000 (10:00 +0200)] 
detect: add debug statements for byte_extract/isdataat

7 years agodetect-asn1: fix memory leak in error path
Victor Julien [Fri, 20 Oct 2017 08:04:25 +0000 (10:04 +0200)] 
detect-asn1: fix memory leak in error path

7 years agodetect: fix port parsing memory leak
Victor Julien [Fri, 20 Oct 2017 07:50:59 +0000 (09:50 +0200)] 
detect: fix port parsing memory leak

Leak in error path as seen by scan-build:

  CC       detect-engine-port.o
detect-engine-port.c:1083:13: warning: Potential leak of memory pointed to by 'temp_rule_var_port'
    return -1;
            ^

7 years agodetect-id: clean up to suppress minor coverity warning
Victor Julien [Fri, 20 Oct 2017 07:24:23 +0000 (09:24 +0200)] 
detect-id: clean up to suppress minor coverity warning

7 years agoredis: suppress minor coverity warning
Victor Julien [Fri, 20 Oct 2017 07:17:30 +0000 (09:17 +0200)] 
redis: suppress minor coverity warning

7 years agodecoder: implement IEEE802.1AH
Victor Julien [Thu, 19 Oct 2017 11:47:35 +0000 (13:47 +0200)] 
decoder: implement IEEE802.1AH

7 years agorandom: fix random logic with getrandom
Victor Julien [Tue, 24 Oct 2017 10:04:43 +0000 (12:04 +0200)] 
random: fix random logic with getrandom

The older random functions returned random values in the range of
0 - RAND_MAX. This is what the http randomize code was expecting.

Newer methods, based on getrandom (or probably Windows too), return
a much large range of values, including negative values and >RAND_MAX.

This patch adds a wrapper to turn the returned value into the expected
range before using it in the http code.

The same is true for the stream engine.

7 years agorandom: support getrandom(2) if available 2944/head
Victor Julien [Thu, 19 Oct 2017 07:51:18 +0000 (09:51 +0200)] 
random: support getrandom(2) if available

Ticket: #2193

7 years agonapatech: fix minor memleak in error path
Victor Julien [Thu, 19 Oct 2017 07:03:13 +0000 (09:03 +0200)] 
napatech: fix minor memleak in error path

7 years agoyaml: print errors if integers are invalid
Victor Julien [Thu, 19 Oct 2017 06:59:36 +0000 (08:59 +0200)] 
yaml: print errors if integers are invalid

7 years agodetect: error out on invalid detect.profile option
Victor Julien [Thu, 19 Oct 2017 06:41:09 +0000 (08:41 +0200)] 
detect: error out on invalid detect.profile option

Bug #891.

7 years agoyaml: add 'append' to stats-log entry
Victor Julien [Thu, 19 Oct 2017 06:24:47 +0000 (08:24 +0200)] 
yaml: add 'append' to stats-log entry

Bug #798

7 years agochangelog: update for 4.0.1 release suricata-4.0.1
Victor Julien [Wed, 18 Oct 2017 08:33:47 +0000 (10:33 +0200)] 
changelog: update for 4.0.1 release

7 years agoautotools: fix distcheck with rust enabled
Jason Ish [Wed, 18 Oct 2017 12:53:03 +0000 (14:53 +0200)] 
autotools: fix distcheck with rust enabled

7 years agostats: use unshortened interface names in counters 2941/head
Sascha Steinbiss [Sat, 16 Sep 2017 06:29:35 +0000 (07:29 +0100)] 
stats: use unshortened interface names in counters

7 years agojson: skip over double dots in output tokenizing
Sascha Steinbiss [Fri, 1 Sep 2017 14:24:56 +0000 (16:24 +0200)] 
json: skip over double dots in output tokenizing

Interface name shortening introduces double periods ('..') as spacers,
which cause issues during JSON stats serialization as there '.'
characters are also used as separators to define nesting of the JSON
output. This commit makes sure that '..' are skipped during tokenizing.
Fixes Redmine bug #2208.

7 years agorust/file: improve truncation handling 2940/head
Victor Julien [Mon, 2 Oct 2017 16:34:08 +0000 (18:34 +0200)] 
rust/file: improve truncation handling

7 years agodetect/state: fix offset mask logic
qiangbei [Sun, 8 Oct 2017 12:49:05 +0000 (20:49 +0800)] 
detect/state: fix offset mask logic

changed 0xef to 0x7f

7 years agorunmodes: fix 'threads' option parsing
Victor Julien [Fri, 13 Oct 2017 07:22:49 +0000 (09:22 +0200)] 
runmodes: fix 'threads' option parsing

Don't cast int to uint8_t for no reason. Add warning that upper
limit for threads is 1024.

Small code cleanups.

Bug: #2228

7 years agooutput: harden output deinit
Victor Julien [Sun, 15 Oct 2017 19:25:07 +0000 (21:25 +0200)] 
output: harden output deinit

If thread setup fails allow output deinit code to be called with
NULL data without crashing.

7 years agostream: improve error handling of ssn/segment pools
Victor Julien [Fri, 13 Oct 2017 07:05:02 +0000 (09:05 +0200)] 
stream: improve error handling of ssn/segment pools

With large number of threads the default memcaps lead to pool setup
failures. Make sure these are reported properly so that the user
knows what is going on.

Bug: #2226

7 years agorust/dns: fix new warning in rustc 1.21 2937/head
Victor Julien [Sun, 15 Oct 2017 19:18:22 +0000 (21:18 +0200)] 
rust/dns: fix new warning in rustc 1.21

7 years agorust/nfs: fix new warnings in rustc 1.21
Victor Julien [Sun, 15 Oct 2017 19:16:56 +0000 (21:16 +0200)] 
rust/nfs: fix new warnings in rustc 1.21

7 years agodoc/file_data: add note on negated matching 2925/head
Victor Julien [Thu, 5 Oct 2017 09:11:13 +0000 (11:11 +0200)] 
doc/file_data: add note on negated matching

Explain issue #2216 and how to avoid it.

7 years agodoc/napatech: formatting fixes
Victor Julien [Thu, 5 Oct 2017 09:11:00 +0000 (11:11 +0200)] 
doc/napatech: formatting fixes

7 years agoprofiling: fix app-layer profiling and csv output 2924/head
Victor Julien [Sun, 24 Sep 2017 11:55:34 +0000 (13:55 +0200)] 
profiling: fix app-layer profiling and csv output

7 years agodebug: free pcre memory used for output filtering
Victor Julien [Tue, 3 Oct 2017 08:31:39 +0000 (10:31 +0200)] 
debug: free pcre memory used for output filtering

7 years agotls: don't set event on small input data
Victor Julien [Fri, 29 Sep 2017 17:10:46 +0000 (19:10 +0200)] 
tls: don't set event on small input data

On very small data the max loop count could be 0. Make sure
it's always at least 1.

7 years agoprscript: update urls to use OISF repo
Eric Leblond [Sat, 30 Sep 2017 10:35:14 +0000 (12:35 +0200)] 
prscript: update urls to use OISF repo

7 years agotravis: hook check-setup.sh into the build 2923/head
Jason Ish [Sun, 1 Oct 2017 10:28:47 +0000 (11:28 +0100)] 
travis: hook check-setup.sh into the build

Only do it for one build, for now use the one that also
enables Rust.

7 years agotemplate: script to check the setup scripts
Jason Ish [Sun, 1 Oct 2017 10:28:07 +0000 (11:28 +0100)] 
template: script to check the setup scripts

This script applies the setup scripts one by one followed
by a make distcheck.

7 years agotemplate scripts: allow to be called from top or src
Jason Ish [Sun, 1 Oct 2017 09:41:29 +0000 (10:41 +0100)] 
template scripts: allow to be called from top or src

Allow the template setup script to be called from the top source
directory or from ./src to unify where they can be executed
from.

7 years agotemplates: rename scripts to use - instead of _
Jason Ish [Sun, 1 Oct 2017 08:54:13 +0000 (09:54 +0100)] 
templates: rename scripts to use - instead of _

Use "-" consistently instead of a mix of - and _.

setup_decoder.sh -> setup-decoder.sh
setup_simple_detect.sh -> setup-simple-detect.sh

7 years agogithub: codeowners syntax fixes 2917/head
Victor Julien [Sat, 30 Sep 2017 14:50:47 +0000 (16:50 +0200)] 
github: codeowners syntax fixes

7 years agogithub: add codeowners file 2912/head
Victor Julien [Sat, 30 Sep 2017 11:13:58 +0000 (13:13 +0200)] 
github: add codeowners file

Initial version.

See https://help.github.com/articles/about-codeowners/

7 years agotemplate: fix decoder setup script 2900/head
Victor Julien [Wed, 6 Sep 2017 12:56:06 +0000 (14:56 +0200)] 
template: fix decoder setup script

7 years agotemplate: fix setup detect script
Victor Julien [Mon, 4 Sep 2017 19:03:56 +0000 (21:03 +0200)] 
template: fix setup detect script

7 years agotemplate: minor updates
Victor Julien [Mon, 4 Sep 2017 12:54:24 +0000 (14:54 +0200)] 
template: minor updates

Merge inspect engine into keyword

7 years agodns: fix last timestamp handling
Derek [Thu, 7 Sep 2017 03:23:25 +0000 (20:23 -0700)] 
dns: fix last timestamp handling

Fixes incorrect variable in ticket #2207

In app-layer-dns-tcp.c in the DNSTCPResponseParse function
a variable is set to last_req when it should be last_resp.
This makes it consistent with UDP DNS response parsing.

7 years agoaf-packet: free bpf program
Eric Leblond [Mon, 18 Sep 2017 18:30:20 +0000 (20:30 +0200)] 
af-packet: free bpf program

This fixes a small memory leak when Suricata is running with a
BPF filter.

7 years agoaf-packet: call thread deinit function
Eric Leblond [Mon, 18 Sep 2017 18:24:29 +0000 (20:24 +0200)] 
af-packet: call thread deinit function

7 years agoprscript: update docker code
Eric Leblond [Sat, 9 Sep 2017 09:13:29 +0000 (11:13 +0200)] 
prscript: update docker code

Update docker code to latest docker python API. This patch
preserves backwrd compatibility with older versions.

7 years agodoc: reflect most recent cpu affinity settings 2890/head
Andreas Herz [Sat, 9 Sep 2017 21:22:06 +0000 (23:22 +0200)] 
doc: reflect most recent cpu affinity settings

Some settings like output-cpu-set never been used and detect got renamed
to worker. This reflects those changes already present in the yaml also
within the documentation.

7 years agoapp-layer-ssl: fix bug with >255 records in one stream 2882/head
Mats Klepsland [Wed, 9 Aug 2017 19:07:03 +0000 (21:07 +0200)] 
app-layer-ssl: fix bug with >255 records in one stream

7 years agorule-parser: bump sids within siggroup test
Andreas Herz [Fri, 11 Aug 2017 21:53:55 +0000 (23:53 +0200)] 
rule-parser: bump sids within siggroup test

7 years agorule-parser: detect duplicate rev keyword
Andreas Herz [Fri, 11 Aug 2017 21:25:44 +0000 (23:25 +0200)] 
rule-parser: detect duplicate rev keyword

7 years agorule-parser: detect duplicate sid keyword
Andreas Herz [Fri, 11 Aug 2017 21:24:22 +0000 (23:24 +0200)] 
rule-parser: detect duplicate sid keyword

7 years agorule-parser: detect duplicate classtype keyword
Andreas Herz [Fri, 11 Aug 2017 21:11:46 +0000 (23:11 +0200)] 
rule-parser: detect duplicate classtype keyword

7 years agoafpacket: free ring mem on error
Victor Julien [Tue, 29 Aug 2017 10:57:53 +0000 (12:57 +0200)] 
afpacket: free ring mem on error

7 years agoBug #2201: af_packet - treat BPF filter error as fatal 2880/head
Alexander Gozman [Sun, 20 Aug 2017 12:22:34 +0000 (15:22 +0300)] 
Bug #2201: af_packet - treat BPF filter error as fatal

There is no need to try to set erroneous BPF filter again and again. Such attempts
lead to constant mmap() calls without corresponding munmap() when 'use-mmap' is enabled.

8 years agoredis: support for rpush in list mode 2868/head
Julian [Fri, 2 Jun 2017 15:34:44 +0000 (17:34 +0200)] 
redis: support for rpush in list mode

This adds a new redis mode rpush. Also more consistent config keywords orientated at the redis command: lpush and publish.
Keeping list and channel config keywords for backwards compatibility

8 years agoapp-layer-tls: don't decode client certificates
Mats Klepsland [Wed, 2 Aug 2017 12:49:43 +0000 (14:49 +0200)] 
app-layer-tls: don't decode client certificates

Decoding client certificate overwrites the validity dates from the
server certificate, so we therefore don't decode it, since we don't
do anything with it (right now) anyway.

Fixes Bug #2050

8 years agoRust/Lua: cast value to arch-dependant type (fix build on x86, #2197)
Pierre Chifflier [Wed, 2 Aug 2017 08:00:07 +0000 (10:00 +0200)] 
Rust/Lua: cast value to arch-dependant type (fix build on x86, #2197)

8 years agonapatech: Implementation of packet counters 2862/head
Phil Young [Mon, 17 Jul 2017 14:59:00 +0000 (10:59 -0400)] 
napatech: Implementation of packet counters

added util-napatech module which contains implementation threads
for processing statistics.  And modified source-napatech and
runmode-napatech to instantiate the threads.

napatech: Implementation of packet counters

napatech: implementation of statistics counters

napatech: Implementation of packet counters.

napatech: added util-napatech module

napatech: added utils-napatech module.

added include declaration and napatech specific structure when HAVE_NAPATECH
is defined.

Added util-napatech module to project.

8 years agonapatech: configuration changes.
Phil Young [Mon, 17 Jul 2017 14:11:26 +0000 (10:11 -0400)] 
napatech: configuration changes.

Added comments describing parameter usage.
Changed example to use range formatting of streams.

8 years agonapatech: Added section describing packet counters.
Phil Young [Mon, 17 Jul 2017 14:08:02 +0000 (10:08 -0400)] 
napatech: Added section describing packet counters.

8 years agonapatech: Added description of hba usage.
Phil Young [Mon, 17 Jul 2017 14:03:44 +0000 (10:03 -0400)] 
napatech: Added description of hba usage.

8 years agodetect-msg: cleanup error message
Victor Julien [Tue, 1 Aug 2017 08:13:10 +0000 (10:13 +0200)] 
detect-msg: cleanup error message

8 years agorule-parser: ignore duplicated msg keyword
Andreas Herz [Sat, 29 Jul 2017 22:14:50 +0000 (00:14 +0200)] 
rule-parser: ignore duplicated msg keyword

8 years agoupdated fedora libevent package names 2861/head
jason taylor [Mon, 31 Jul 2017 15:41:19 +0000 (11:41 -0400)] 
updated fedora libevent package names

Signed-off-by: jason taylor <jtfas90@gmail.com>
8 years agochangelog: update for 4.0.0 suricata-4.0.0
Victor Julien [Thu, 27 Jul 2017 07:02:12 +0000 (09:02 +0200)] 
changelog: update for 4.0.0

8 years agodoc: add rust and update version in install
Victor Julien [Wed, 26 Jul 2017 14:08:05 +0000 (16:08 +0200)] 
doc: add rust and update version in install

8 years agodcerpc: improve stub buffer handling 2857/head
Victor Julien [Mon, 24 Jul 2017 08:11:20 +0000 (10:11 +0200)] 
dcerpc: improve stub buffer handling

Stub data buffer could grow without limit depending on traffic.

This patch improves the handling. It honors the 'last frag' setting
and implements a hard limit of 1MB per buffer.

Bug #2186

8 years agodcerpc: cleanup, remove unused field
Victor Julien [Fri, 21 Jul 2017 11:18:21 +0000 (13:18 +0200)] 
dcerpc: cleanup, remove unused field

8 years agoafl: add dcerpc entry points
Victor Julien [Fri, 21 Jul 2017 10:38:49 +0000 (12:38 +0200)] 
afl: add dcerpc entry points

Add for requests and mix of request/responses.

Implement storing the files to disk and rereading them.

8 years agostream/bypass: more liberal policy if no detection
Victor Julien [Mon, 24 Jul 2017 16:48:23 +0000 (18:48 +0200)] 
stream/bypass: more liberal policy if no detection

The reason the stream engine can't easily decide to bypass streams
is that there can be non-stream dependent rules that wouldn't match
if bypassing is done too aggressively.

However, if there is no detection engine, there is no reason to hold
back. In this case we can bypass as soon as the stream engine is done
with a session.

8 years agoaf-packet: optimize BPF
Eric Leblond [Fri, 30 Jun 2017 13:00:40 +0000 (15:00 +0200)] 
af-packet: optimize BPF

This patch turn on code optimization on BPF filter building by
libpcap. This allow to reduce the size of the BPF bytecode and
thus increase the size of BPF filter supported by Suricata.

Reported-by: Martijn van Oosterhout
8 years agoapp-layer-ssh: trigger bypass when done
Eric Leblond [Thu, 20 Jul 2017 08:19:01 +0000 (10:19 +0200)] 
app-layer-ssh: trigger bypass when done

Trigger bypass when application layer will not inspect anymore.

8 years agoautogen: cleanup rust strict warning 2854/head
Jason Ish [Mon, 24 Jul 2017 16:40:53 +0000 (10:40 -0600)] 
autogen: cleanup rust strict warning

8 years agoSample systemd unit file for Suricata.
Jason Ish [Thu, 20 Jul 2017 20:53:09 +0000 (14:53 -0600)] 
Sample systemd unit file for Suricata.

Create a sample systemd unit file based on the build time
configuration.

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

8 years agoSample logrotate configuration file.
Jason Ish [Mon, 24 Jul 2017 15:14:17 +0000 (09:14 -0600)] 
Sample logrotate configuration file.

Create a sample logrotate configuration file with filenames
set for the configuration.

8 years agodetect: more gracefully handle mpm prepare failure 2850/head
Victor Julien [Wed, 19 Jul 2017 10:45:39 +0000 (12:45 +0200)] 
detect: more gracefully handle mpm prepare failure

Exit with error instead of using the detection engine in a broken state.

Bug #2187

8 years agodetect: reject dsize rules that can't match
Victor Julien [Wed, 19 Jul 2017 10:16:48 +0000 (12:16 +0200)] 
detect: reject dsize rules that can't match

Rules can contain conflicting statements and lead to a unmatchable rule.

2 examples are rejected by this patch:

1. dsize < content
2. dsize < content@offset

Bug #2187

8 years agoUpdate public-data-sets.rst with stratosphere project
Sebastian Garcia [Fri, 14 Jul 2017 14:30:48 +0000 (16:30 +0200)] 
Update public-data-sets.rst with stratosphere project

Add the datasets of the Stratosphere project to the list.

8 years agomingw: don't try to build unix socket
Victor Julien [Sat, 15 Jul 2017 08:00:57 +0000 (10:00 +0200)] 
mingw: don't try to build unix socket

8 years agowindows: use wpcap instead of pcap
Victor Julien [Sat, 15 Jul 2017 07:48:40 +0000 (09:48 +0200)] 
windows: use wpcap instead of pcap

Windows pcap libraries such as winpcap all use a library name of
wpcap instead of just pcap. Support this in configure.

8 years agowin32: minor compile warning fixes
Victor Julien [Mon, 17 Jul 2017 08:09:01 +0000 (10:09 +0200)] 
win32: minor compile warning fixes

8 years agomingw: fix random function
Victor Julien [Fri, 14 Jul 2017 19:12:50 +0000 (21:12 +0200)] 
mingw: fix random function

8 years agococci: add test to check for uint use
Victor Julien [Fri, 14 Jul 2017 19:06:37 +0000 (21:06 +0200)] 
cocci: add test to check for uint use

uint is non-standard and not supported by MinGW. So ban it's use.

spatch file by Eric Leblond.

8 years agocleanup: remove all uint use
Victor Julien [Fri, 14 Jul 2017 19:03:04 +0000 (21:03 +0200)] 
cleanup: remove all uint use

8 years agococci: ban memmem
Victor Julien [Fri, 14 Jul 2017 19:30:36 +0000 (21:30 +0200)] 
cocci: ban memmem

8 years agodnp3: use BasicSearch instead of memmem
Jason Ish [Fri, 14 Jul 2017 19:31:10 +0000 (13:31 -0600)] 
dnp3: use BasicSearch instead of memmem

Mingw doesn't support memmem.

8 years agorust: require jansson for rust build
Jason Ish [Fri, 14 Jul 2017 15:09:33 +0000 (09:09 -0600)] 
rust: require jansson for rust build

8 years agotravis: enable strict rust; use rust 1.15.0
Jason Ish [Fri, 14 Jul 2017 14:28:44 +0000 (08:28 -0600)] 
travis: enable strict rust; use rust 1.15.0

Adds --enable-rust-strict to fail on warnings. Also update
the minimum Rust version from 1.7.0 to 1.15.0.

8 years agorust: --enable-rust-strict to turn warnings into errors
Jason Ish [Fri, 14 Jul 2017 14:26:30 +0000 (08:26 -0600)] 
rust: --enable-rust-strict to turn warnings into errors

8 years agodoc: add pid-file section to suricata.yaml doc
Jason Ish [Mon, 17 Jul 2017 21:07:27 +0000 (15:07 -0600)] 
doc: add pid-file section to suricata.yaml doc

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

8 years agosuricata.yaml: better comment on pid-file option
Jason Ish [Mon, 17 Jul 2017 20:58:57 +0000 (14:58 -0600)] 
suricata.yaml: better comment on pid-file option

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