]> git.ipfire.org Git - thirdparty/suricata.git/log
thirdparty/suricata.git
6 years agoprelude: fix potential uninitialized value use 3553/head
Victor Julien [Tue, 20 Nov 2018 11:31:01 +0000 (12:31 +0100)] 
prelude: fix potential uninitialized value use

6 years agodetect: suppress coverity deadcode warnings
Victor Julien [Tue, 20 Nov 2018 11:28:16 +0000 (12:28 +0100)] 
detect: suppress coverity deadcode warnings

Suppress as scan-build-7 relies on this 'dead' code to not issue
a warning.

6 years agofilestore: suppress coverity toctou warning
Victor Julien [Tue, 20 Nov 2018 11:25:04 +0000 (12:25 +0100)] 
filestore: suppress coverity toctou warning

6 years agodetect: fix coverity memory leak warnings
Victor Julien [Tue, 20 Nov 2018 11:22:47 +0000 (12:22 +0100)] 
detect: fix coverity memory leak warnings

6 years agofile: use u32 file id everywhere
Victor Julien [Mon, 19 Nov 2018 21:00:33 +0000 (22:00 +0100)] 
file: use u32 file id everywhere

6 years agodetect/distance: improve value parsing and fix broken test
Victor Julien [Tue, 13 Nov 2018 00:45:05 +0000 (16:45 -0800)] 
detect/distance: improve value parsing and fix broken test

6 years agodetect/within: clean up option value parsing
Victor Julien [Tue, 13 Nov 2018 00:27:27 +0000 (16:27 -0800)] 
detect/within: clean up option value parsing

6 years agodetect/within: test cleanups
Victor Julien [Mon, 12 Nov 2018 23:48:45 +0000 (15:48 -0800)] 
detect/within: test cleanups

6 years agoeve/dns: improve version warning message
Victor Julien [Mon, 12 Nov 2018 23:35:46 +0000 (15:35 -0800)] 
eve/dns: improve version warning message

6 years agodetect/offset: improve value parsing
Victor Julien [Mon, 12 Nov 2018 23:33:39 +0000 (15:33 -0800)] 
detect/offset: improve value parsing

6 years agoapp-layer-ssl: fix coverty error (RESOURCE_LEAK) 3543/head
Mats Klepsland [Tue, 13 Nov 2018 19:06:50 +0000 (20:06 +0100)] 
app-layer-ssl: fix coverty error (RESOURCE_LEAK)

Bug #2677

6 years agochangelog: update for 4.1 suricata-4.1.0
Victor Julien [Tue, 6 Nov 2018 08:54:10 +0000 (09:54 +0100)] 
changelog: update for 4.1

6 years agosmtp/mime: fix null ptr deref on bad traffic
Victor Julien [Tue, 30 Oct 2018 15:10:33 +0000 (16:10 +0100)] 
smtp/mime: fix null ptr deref on bad traffic

Due to missing error handling, a bad mime message could put the
mime parser in an error state, without the SMTP layer taking this
into account. So the SMTP layer would continue to pass data to the
mime parser, even though it was in an error state.

When the parser would be fed a very long line while in this state,
it would try to set an error flag in the state. However, due to
the error state, this setting of the flag would dereference a null
pointer.

This patch fixes this issue by updating the mime parser to check
the state it is in when receiving new input. It will refuse to
process futher data while in the error state. It will also return
a new error code to indicate to the SMTP layer that the parser
was in an error state.

6 years agoipv6: disable zero len padN rule by default
Victor Julien [Fri, 2 Nov 2018 15:59:40 +0000 (16:59 +0100)] 
ipv6: disable zero len padN rule by default

6 years agodoc: Remove gulp references
jason taylor [Tue, 23 Oct 2018 23:23:11 +0000 (19:23 -0400)] 
doc: Remove gulp references

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agodoc: add bypass keyword documentation
jason taylor [Wed, 17 Oct 2018 19:52:59 +0000 (15:52 -0400)] 
doc: add bypass keyword documentation

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agofilestore: fix compiler truncation warnings
Jason Ish [Wed, 31 Oct 2018 22:41:07 +0000 (16:41 -0600)] 
filestore: fix compiler truncation warnings

And error out if the constructed filename is truncated.

6 years agoapp-layer-ssl: add Facebook TLSv1.3 draft versions 3536/head
Mats Klepsland [Tue, 30 Oct 2018 20:35:25 +0000 (21:35 +0100)] 
app-layer-ssl: add Facebook TLSv1.3 draft versions

Add draft versions for Facebooks custom TLSv1.3 implementation "fizz"
to SSLVersionToString().

6 years agoapp-layer-ssl: change how TLSv1.3 drafts are logged
Mats Klepsland [Tue, 30 Oct 2018 19:18:05 +0000 (20:18 +0100)] 
app-layer-ssl: change how TLSv1.3 drafts are logged

Change from logging TLSv1.3 drafts as "TLS 1.3 (draft 28)" to
"TLS 1.3 draft-28" instead.

6 years agouserguide: add documentation for ssl_version keyword 3534/head
Mats Klepsland [Mon, 29 Oct 2018 22:03:08 +0000 (23:03 +0100)] 
userguide: add documentation for ssl_version keyword

6 years agopfring: default to runmode workers
Victor Julien [Mon, 29 Oct 2018 09:31:52 +0000 (10:31 +0100)] 
pfring: default to runmode workers

Now that threads:auto is implemented workers is a better default
as it generally performs better.

6 years agopfring: implement 'threads: auto'
Victor Julien [Mon, 29 Oct 2018 08:56:40 +0000 (09:56 +0100)] 
pfring: implement 'threads: auto'

If threads is set to auto, first try the CPU count. If that would
fail, fall back to RSS queue count.

6 years agopfring: support checking/disabling offloading
Victor Julien [Mon, 29 Oct 2018 08:37:11 +0000 (09:37 +0100)] 
pfring: support checking/disabling offloading

6 years agopfring: fix bypass counter print uninitialized values
Victor Julien [Mon, 29 Oct 2018 08:29:58 +0000 (09:29 +0100)] 
pfring: fix bypass counter print uninitialized values

If the option was disabled in the config the value would be uninitialized.

6 years agostorage: don't leak memory for unittests
Victor Julien [Fri, 26 Oct 2018 14:03:05 +0000 (16:03 +0200)] 
storage: don't leak memory for unittests

6 years agoradix: fix a memleak when removing the last node
Victor Julien [Fri, 26 Oct 2018 14:15:58 +0000 (16:15 +0200)] 
radix: fix a memleak when removing the last node

6 years agodetect/address: minor memory handling cleanups
Victor Julien [Thu, 25 Oct 2018 15:31:49 +0000 (17:31 +0200)] 
detect/address: minor memory handling cleanups

6 years agodetect: suppress scan-build warnings
Victor Julien [Thu, 25 Oct 2018 15:02:43 +0000 (17:02 +0200)] 
detect: suppress scan-build warnings

6 years agodetect/flags: cleanup parsing to not alloc temp strings
Victor Julien [Thu, 25 Oct 2018 10:30:12 +0000 (12:30 +0200)] 
detect/flags: cleanup parsing to not alloc temp strings

6 years agompm: fix minor scan-build warning
Victor Julien [Thu, 25 Oct 2018 09:55:05 +0000 (11:55 +0200)] 
mpm: fix minor scan-build warning

6 years agopool: avoid possible double free in error path
Victor Julien [Thu, 25 Oct 2018 09:44:53 +0000 (11:44 +0200)] 
pool: avoid possible double free in error path

Should be impossible as a double free, but scan-build-7 thinks it
is possible.

6 years agopool: small code cleanups
Victor Julien [Thu, 25 Oct 2018 09:44:15 +0000 (11:44 +0200)] 
pool: small code cleanups

6 years agostream: don't assume malformed TCP packets
Victor Julien [Thu, 25 Oct 2018 06:27:22 +0000 (08:27 +0200)] 
stream: don't assume malformed TCP packets

This deep in the stream engine packets are valid, so don't check
for the tcph header in a packet as it confuses scan-build.

Do add a DEBUG_VALIDATE_BUG_ON so in QA we double check.

6 years agodecode/tcp: rewrite options decoding to assist scan-build
Victor Julien [Wed, 24 Oct 2018 09:05:21 +0000 (11:05 +0200)] 
decode/tcp: rewrite options decoding to assist scan-build

6 years agosmb/c: don't accept null input
Victor Julien [Wed, 24 Oct 2018 08:58:58 +0000 (10:58 +0200)] 
smb/c: don't accept null input

6 years agohtp: fix potential (but unlikely) memleak in uri normalization
Victor Julien [Tue, 23 Oct 2018 14:17:26 +0000 (16:17 +0200)] 
htp: fix potential (but unlikely) memleak in uri normalization

6 years agothresholds: remove dead code in parsing
Victor Julien [Tue, 23 Oct 2018 13:10:56 +0000 (15:10 +0200)] 
thresholds: remove dead code in parsing

6 years agoradix: fix memory leak in error path
Victor Julien [Tue, 23 Oct 2018 13:08:05 +0000 (15:08 +0200)] 
radix: fix memory leak in error path

6 years agocoverity: suppress warnings
Victor Julien [Tue, 23 Oct 2018 13:01:42 +0000 (15:01 +0200)] 
coverity: suppress warnings

6 years agohost/os/info: fix lookup memleak
Victor Julien [Tue, 23 Oct 2018 12:59:15 +0000 (14:59 +0200)] 
host/os/info: fix lookup memleak

6 years agodebug/log: suppress coverity checked_return warning
Victor Julien [Tue, 23 Oct 2018 12:54:17 +0000 (14:54 +0200)] 
debug/log: suppress coverity checked_return warning

6 years agobpf: suppress coverity toctou warning
Victor Julien [Tue, 23 Oct 2018 12:53:28 +0000 (14:53 +0200)] 
bpf: suppress coverity toctou warning

6 years agopcap: fix buffer size validation logic
Victor Julien [Tue, 23 Oct 2018 12:51:25 +0000 (14:51 +0200)] 
pcap: fix buffer size validation logic

6 years agouricontent: move debug func into unittests
Victor Julien [Tue, 23 Oct 2018 12:43:35 +0000 (14:43 +0200)] 
uricontent: move debug func into unittests

Cleanup header, which lead to the app-layer-htp.h header needing to
be added in a few other places.

6 years agodetect/replace: fix mem leak in error path
Victor Julien [Tue, 23 Oct 2018 12:37:05 +0000 (14:37 +0200)] 
detect/replace: fix mem leak in error path

6 years agoisdataat: fix mem leak in error path
Victor Julien [Tue, 23 Oct 2018 12:34:08 +0000 (14:34 +0200)] 
isdataat: fix mem leak in error path

6 years agobits: avoid memory leak in case of adding types
Victor Julien [Tue, 23 Oct 2018 12:29:59 +0000 (14:29 +0200)] 
bits: avoid memory leak in case of adding types

6 years agoipproto: fix memleak in error case
Victor Julien [Tue, 23 Oct 2018 12:10:18 +0000 (14:10 +0200)] 
ipproto: fix memleak in error case

6 years agobytetest: don't leak memory in error condition
Victor Julien [Tue, 23 Oct 2018 11:56:50 +0000 (13:56 +0200)] 
bytetest: don't leak memory in error condition

6 years agoyaml: fix potential memleak and suppress coverity issue
Victor Julien [Tue, 23 Oct 2018 11:53:13 +0000 (13:53 +0200)] 
yaml: fix potential memleak and suppress coverity issue

6 years agooutputs: fix memleaks in the error paths reported by coverity
Victor Julien [Tue, 23 Oct 2018 11:49:37 +0000 (13:49 +0200)] 
outputs: fix memleaks in the error paths reported by coverity

6 years agocoverity: suppress warning for intentional code
Victor Julien [Tue, 23 Oct 2018 11:23:09 +0000 (13:23 +0200)] 
coverity: suppress warning for intentional code

6 years agorust/dns: don't compile unused C code if Rust is enabled
Victor Julien [Tue, 23 Oct 2018 11:21:08 +0000 (13:21 +0200)] 
rust/dns: don't compile unused C code if Rust is enabled

6 years agocoverity: fix filestore v2 memleak
Victor Julien [Tue, 23 Oct 2018 11:06:42 +0000 (13:06 +0200)] 
coverity: fix filestore v2 memleak

6 years agolog-pcap: fix coverity memleak warning
Victor Julien [Tue, 23 Oct 2018 11:01:53 +0000 (13:01 +0200)] 
log-pcap: fix coverity memleak warning

6 years agocoverity: don't warn on fall back random
Victor Julien [Tue, 23 Oct 2018 10:57:50 +0000 (12:57 +0200)] 
coverity: don't warn on fall back random

6 years agoapp-layer-ssl: fix flow and inspection bypass for TLSv1.3 3532/head
Mats Klepsland [Mon, 29 Oct 2018 20:26:13 +0000 (21:26 +0100)] 
app-layer-ssl: fix flow and inspection bypass for TLSv1.3

6 years agoapp-layer-ssl: add 0-RTT support for TLSv1.3
Mats Klepsland [Mon, 29 Oct 2018 20:20:33 +0000 (21:20 +0100)] 
app-layer-ssl: add 0-RTT support for TLSv1.3

6 years agoapp-layer-ssl: decode early data extension in ClientHello record
Mats Klepsland [Mon, 29 Oct 2018 19:56:51 +0000 (20:56 +0100)] 
app-layer-ssl: decode early data extension in ClientHello record

Decode early data extension used by 0-RTT that is used to indicate that
application data will be sent right after the ClientHello record.

6 years agoapp-layer-ssl: use extension length when decoding extensions
Mats Klepsland [Mon, 29 Oct 2018 19:48:54 +0000 (20:48 +0100)] 
app-layer-ssl: use extension length when decoding extensions

Pass extension length to functions decoding extensions, instead of
passing the length left in the record. This enables us to also
decode empty extensions.

6 years agoapp-layer-ssl: handle all versions above TLSv1.2 as TLSv1.3
Mats Klepsland [Mon, 29 Oct 2018 19:30:41 +0000 (20:30 +0100)] 
app-layer-ssl: handle all versions above TLSv1.2 as TLSv1.3

This makes it more likely to log custom versions of TLSv1.3 that
doesn't comply with the draft version numbering.

6 years agotls: remove debug printfs
Victor Julien [Mon, 22 Oct 2018 17:25:04 +0000 (19:25 +0200)] 
tls: remove debug printfs

6 years agodetect-tls-ja3-hash: add another unit test 3520/head
Mats Klepsland [Sun, 21 Oct 2018 17:55:13 +0000 (19:55 +0200)] 
detect-tls-ja3-hash: add another unit test

Add unit test that covers the JA3 bug in TLS extensions decoding.

6 years agoapp-layer-ssl: fix JA3 bug in TLS extension decoding
Mats Klepsland [Fri, 19 Oct 2018 21:00:42 +0000 (23:00 +0200)] 
app-layer-ssl: fix JA3 bug in TLS extension decoding

6 years agoapp-layer-ssl: fix JA3 bug in TLS version decoding
Mats Klepsland [Thu, 18 Oct 2018 21:12:50 +0000 (23:12 +0200)] 
app-layer-ssl: fix JA3 bug in TLS version decoding

6 years agocapture: multidev is not experimental
Victor Julien [Mon, 22 Oct 2018 06:59:44 +0000 (08:59 +0200)] 
capture: multidev is not experimental

6 years agoflow/stream: 'wrong thread' as stream event & counter
Victor Julien [Fri, 5 Oct 2018 18:38:10 +0000 (20:38 +0200)] 
flow/stream: 'wrong thread' as stream event & counter

Set event at most once per flow, for the first 'wrong' packet.

Add 'tcp.pkt_on_wrong_thread' counter. This is incremented for each
'wrong' packet. Note that the first packet for a flow determines
what thread is 'correct'.

6 years agosmtp: fix clang -Wunreachable-code warning
Victor Julien [Mon, 24 Feb 2014 09:01:55 +0000 (10:01 +0100)] 
smtp: fix clang -Wunreachable-code warning

app-layer-smtp.c:756:12: error: will never be executed [-Werror,-Wunreachable-code]
    return 0;
           ^
1 error generated.

6 years agoprofiling/csv: update output format
Victor Julien [Sat, 22 Sep 2018 16:14:56 +0000 (18:14 +0200)] 
profiling/csv: update output format

Update output to be:

pcap_cnt,total,receive,decode,flowworker,threading,proto detect,flow,
stream,app-layer,detect,tcp-prune,loggers,<detect stages>,<loggers>

For TCP, the app-layer cost is not part of stream anymore.

6 years agomulti-tenant: document per tenant settings
Victor Julien [Tue, 7 Aug 2018 19:17:59 +0000 (21:17 +0200)] 
multi-tenant: document per tenant settings

6 years agotest mode: parse interface list in test mode
Victor Julien [Tue, 7 Aug 2018 14:13:31 +0000 (16:13 +0200)] 
test mode: parse interface list in test mode

6 years agowindivert: fix whitespace issue
Victor Julien [Tue, 7 Aug 2018 14:13:01 +0000 (16:13 +0200)] 
windivert: fix whitespace issue

6 years agoaf-packet: suppress noisy info message
Victor Julien [Tue, 7 Aug 2018 14:12:29 +0000 (16:12 +0200)] 
af-packet: suppress noisy info message

6 years agodetect/transforms: fix doc urls 3517/head
Victor Julien [Wed, 17 Oct 2018 20:06:23 +0000 (22:06 +0200)] 
detect/transforms: fix doc urls

6 years agopfring: multiple receive threads is not experimental
Victor Julien [Fri, 19 Oct 2018 14:57:59 +0000 (16:57 +0200)] 
pfring: multiple receive threads is not experimental

6 years agoeve: improve error handling for Rust loggers
Victor Julien [Fri, 19 Oct 2018 14:54:38 +0000 (16:54 +0200)] 
eve: improve error handling for Rust loggers

Give useful warning message if Rust is not compiled in.

6 years agopfring: minor cleanups
Victor Julien [Fri, 19 Oct 2018 13:41:35 +0000 (15:41 +0200)] 
pfring: minor cleanups

6 years agostats: decoder/stream events as stats
Victor Julien [Fri, 19 Oct 2018 13:08:48 +0000 (15:08 +0200)] 
stats: decoder/stream events as stats

6 years agodetect/analyzer: add detection for sigs that could use http keywords
Victor Julien [Thu, 18 Oct 2018 19:02:40 +0000 (21:02 +0200)] 
detect/analyzer: add detection for sigs that could use http keywords

6 years agodetect/analyzer: add debug statements
Victor Julien [Thu, 18 Oct 2018 19:01:56 +0000 (21:01 +0200)] 
detect/analyzer: add debug statements

6 years agodetect/analyzer: fix json analyzer being called on incomplete rules
Victor Julien [Thu, 18 Oct 2018 17:06:28 +0000 (19:06 +0200)] 
detect/analyzer: fix json analyzer being called on incomplete rules

6 years agorust/smb: silence noisy debug messages
Victor Julien [Thu, 18 Oct 2018 15:28:48 +0000 (17:28 +0200)] 
rust/smb: silence noisy debug messages

6 years agostream/events: log as stats
Victor Julien [Thu, 18 Oct 2018 12:26:18 +0000 (14:26 +0200)] 
stream/events: log as stats

6 years agodetect/events: cleanup keyword
Victor Julien [Thu, 18 Oct 2018 12:20:35 +0000 (14:20 +0200)] 
detect/events: cleanup keyword

6 years agodoc/flow: updates and cleanups to flow section 3514/head
Victor Julien [Wed, 17 Oct 2018 10:06:23 +0000 (12:06 +0200)] 
doc/flow: updates and cleanups to flow section

6 years agococci/detect: add flags check to SigTableElmt
Victor Julien [Wed, 17 Oct 2018 07:57:30 +0000 (09:57 +0200)] 
cocci/detect: add flags check to SigTableElmt

6 years agorules/transform: add to list-keywords
Victor Julien [Wed, 17 Oct 2018 07:52:29 +0000 (09:52 +0200)] 
rules/transform: add to list-keywords

6 years agodoc/rules: initial transforms documentation
Victor Julien [Wed, 17 Oct 2018 07:45:56 +0000 (09:45 +0200)] 
doc/rules: initial transforms documentation

6 years agodoc/performance: redo runmodes explanation
Victor Julien [Tue, 16 Oct 2018 15:08:01 +0000 (17:08 +0200)] 
doc/performance: redo runmodes explanation

6 years agodoc/install: update Rust info in generic install overview
Victor Julien [Tue, 16 Oct 2018 15:06:49 +0000 (17:06 +0200)] 
doc/install: update Rust info in generic install overview

6 years agodoc/eve: add community id
Victor Julien [Tue, 16 Oct 2018 13:33:53 +0000 (15:33 +0200)] 
doc/eve: add community id

6 years agodetect-ssh-software: fix url for keyword 3512/head
Mats Klepsland [Tue, 16 Oct 2018 20:05:52 +0000 (22:05 +0200)] 
detect-ssh-software: fix url for keyword

6 years agodetect-ssh-software-version: add description and url to keyword
Mats Klepsland [Tue, 16 Oct 2018 20:04:01 +0000 (22:04 +0200)] 
detect-ssh-software-version: add description and url to keyword

6 years agodetect-ssh-proto-version: add description and url to keyword
Mats Klepsland [Tue, 16 Oct 2018 20:00:07 +0000 (22:00 +0200)] 
detect-ssh-proto-version: add description and url to keyword

6 years agodetect-ssh-proto: fix url for keyword
Mats Klepsland [Tue, 16 Oct 2018 19:53:45 +0000 (21:53 +0200)] 
detect-ssh-proto: fix url for keyword

6 years agodoc: add documentation for SSH keywords
Mats Klepsland [Tue, 16 Oct 2018 19:48:32 +0000 (21:48 +0200)] 
doc: add documentation for SSH keywords

6 years agochangelog: update for 4.1rc2 suricata-4.1.0-rc2
Victor Julien [Mon, 15 Oct 2018 15:18:20 +0000 (17:18 +0200)] 
changelog: update for 4.1rc2

6 years agorust/ike2: free destate on tx free 3511/head
Victor Julien [Mon, 15 Oct 2018 18:53:14 +0000 (20:53 +0200)] 
rust/ike2: free destate on tx free

Bug #2604

6 years agorust: fix (again) out of tree builds
Jason Ish [Mon, 15 Oct 2018 13:47:56 +0000 (07:47 -0600)] 
rust: fix (again) out of tree builds

As the generated Cargo.toml is shipped as part of a release
tarball, build from the source directory but set the cargo
CARGO_TARGET_DIR to the build directory.

6 years agodoc: remove deprecated force-md5 flag from userguide
Pascal Delalande [Fri, 12 Oct 2018 19:32:13 +0000 (21:32 +0200)] 
doc: remove deprecated force-md5 flag from userguide