]> git.ipfire.org Git - thirdparty/suricata.git/log
thirdparty/suricata.git
6 years agosource-pcap:set PktAcqBreakLoop as pcap_breakloop 3625/head
Jingyu Yang [Mon, 24 Dec 2018 08:22:42 +0000 (16:22 +0800)] 
source-pcap:set PktAcqBreakLoop as pcap_breakloop

6 years agostream: fix false negative on bad RST
Victor Julien [Fri, 18 Jan 2019 14:03:39 +0000 (15:03 +0100)] 
stream: fix false negative on bad RST

If a bad RST was received the stream inspection would not happen
for that packet, but it would still move the 'raw progress' tracker
forward. Following good packets would then fail to detect anything
before the 'raw progress' position.

Bug #2770

Reported-by: Alexey Vishnyakov
6 years agoeve.stats: warn that output might miss decoder-events
Victor Julien [Thu, 24 Jan 2019 11:23:37 +0000 (12:23 +0100)] 
eve.stats: warn that output might miss decoder-events

6 years agoeve.stats: make decoder event prefix configurable
Victor Julien [Thu, 24 Jan 2019 10:40:39 +0000 (11:40 +0100)] 
eve.stats: make decoder event prefix configurable

6 years agoeve: fix missing decoder-events in stats
Victor Julien [Wed, 23 Jan 2019 20:18:59 +0000 (21:18 +0100)] 
eve: fix missing decoder-events in stats

In the eve log the decoder events are added as optional counters. This
behaviour is enabled by default. However, lots of the counters are
missing, as the names colide with other counters.

E.g.

decoder.ipv6 counts ipv6 packets
decoder.ipv6.unknown_next_header counts how often an unknown next
    header is encountered.

In this example 'ipv6' would be both a json integer and a json object.
It appears that jansson favours the first that is generated, so the
event counters are mostly missing.

This patch registers them as 'decoder.events.<event>' instead. As
these names are generated on the fly, a hash table to contain the
allocated strings was added as well.

6 years agohash: move string hash funcs into util files
Victor Julien [Wed, 23 Jan 2019 21:02:25 +0000 (22:02 +0100)] 
hash: move string hash funcs into util files

6 years agodecoder: add gre over ipv6 support
Victor Julien [Wed, 23 Jan 2019 20:17:56 +0000 (21:17 +0100)] 
decoder: add gre over ipv6 support

6 years agoaf-packet: minor code cleanups 3621/head
Victor Julien [Tue, 22 Jan 2019 20:34:28 +0000 (21:34 +0100)] 
af-packet: minor code cleanups

6 years agoaf-packet: re-enable sync for tpacket v2
Victor Julien [Tue, 22 Jan 2019 20:28:40 +0000 (21:28 +0100)] 
af-packet: re-enable sync for tpacket v2

Synchronize start was disabled for v2 when v3 was introduced, without
a reason being given.

Re-enable as v2 will otherwise also start reading packets before the
other threads are set up. This will lead to hashing issues.

Part of bug #2788.

6 years agoaf-packet: fix sync start for tpacket v3
Victor Julien [Tue, 22 Jan 2019 20:00:57 +0000 (21:00 +0100)] 
af-packet: fix sync start for tpacket v3

The tpacket-v3 implementation of the synchonize start logic would
not correctly consider the timestamp parameter, leading to threads
starting before synchronization between threads was complete.

Bug #2788

6 years agonfqueue: inject fake packet on timeout
Alexander Gozman [Fri, 21 Dec 2018 16:16:29 +0000 (16:16 +0000)] 
nfqueue: inject fake packet on timeout

Fixes nfqueue and delayed-detect.

On systems with small amount of traffic (or with no traffic at all)
nfqueue with 'delayed-detect' enabled hanged in 'workers' mode.

Bug #2362.

6 years agodoc: fix minor typo
Pascal Delalande [Wed, 9 Jan 2019 20:33:32 +0000 (21:33 +0100)] 
doc: fix minor typo

6 years agolua: add lua dir with example to make dist 3602/head
Eric Leblond [Thu, 27 Dec 2018 22:02:47 +0000 (23:02 +0100)] 
lua: add lua dir with example to make dist

6 years agococcinelle: add missing tests to make dist
Eric Leblond [Thu, 27 Dec 2018 22:01:43 +0000 (23:01 +0100)] 
coccinelle: add missing tests to make dist

6 years agoutil-binsearch: remove the files
Eric Leblond [Thu, 27 Dec 2018 20:49:31 +0000 (21:49 +0100)] 
util-binsearch: remove the files

6 years agodoc: add _static dir to make dist
Eric Leblond [Thu, 27 Dec 2018 20:44:09 +0000 (21:44 +0100)] 
doc: add _static dir to make dist

6 years agoebpf: include files in make dist 3601/head
Eric Leblond [Thu, 27 Dec 2018 13:19:46 +0000 (14:19 +0100)] 
ebpf: include files in make dist

6 years agochangelog: update for 4.1.2 release suricata-4.1.2
Victor Julien [Thu, 20 Dec 2018 17:57:46 +0000 (18:57 +0100)] 
changelog: update for 4.1.2 release

6 years agosmb: improve request/response mapping 3593/head
Victor Julien [Thu, 20 Dec 2018 08:11:21 +0000 (09:11 +0100)] 
smb: improve request/response mapping

Only use ssn_id and msg_id for mapping a response to a request.

By not using the tree_id it can always be included in the tx.hdr which
means it can be logged properly in case of IOCTL and DCERPC.

6 years agodoc: add missing and fix 404 for --list-keywords
Travis Green [Thu, 20 Dec 2018 01:41:28 +0000 (18:41 -0700)] 
doc: add missing and fix 404 for --list-keywords

6 years agodoc: added tos keyword
Travis Green [Thu, 20 Dec 2018 00:45:11 +0000 (17:45 -0700)] 
doc: added tos keyword

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

6 years agoFixes other affected tests for smtp pipelining 3590/head
Philippe Antoine [Wed, 5 Dec 2018 09:22:18 +0000 (10:22 +0100)] 
Fixes other affected tests for smtp pipelining

Either checking state has pipelining
Or removing pipelining from input

6 years agosmtp: improve pipelining support
Philippe Antoine [Wed, 5 Dec 2018 08:31:56 +0000 (09:31 +0100)] 
smtp: improve pipelining support

Fixes #1863

6 years agoproto/detect: workaround dns misdetected as dcerpc
Victor Julien [Wed, 19 Dec 2018 10:49:42 +0000 (11:49 +0100)] 
proto/detect: workaround dns misdetected as dcerpc

The DCERPC UDP detection would misfire on DNS with transaction
ID 0x0400. This would happen as the protocol detection engine
gives preference to pattern based detection over probing parsers for
performance reasons.

This hack/workaround fixes this specific case by still running the
probing parser if DCERPC has been detected on UDP. The probing
parser result will take precedence.

Bug #2736.

6 years agoteredo: be stricter on what to consider valid teredo
Victor Julien [Wed, 19 Dec 2018 08:45:35 +0000 (09:45 +0100)] 
teredo: be stricter on what to consider valid teredo

Invalid Teredo can lead to valid DNS traffic (or other UDP traffic)
being misdetected as Teredo. This leads to false negatives in the
UDP payload inspection.

Make the teredo code only consider a packet teredo if the encapsulated
data was decoded without any 'invalid' events being set.

Bug #2736.

6 years agodetect: fix crash during startup with malformed yaml
Victor Julien [Tue, 18 Dec 2018 20:08:19 +0000 (21:08 +0100)] 
detect: fix crash during startup with malformed yaml

detect-engine:
  custom-values:
    toclient-groups: 200
    toserver-groups: 200

Bug #2745

6 years agouserguide/install: add rust, python-yaml to ubuntu 3588/head
Victor Julien [Tue, 18 Dec 2018 15:01:19 +0000 (16:01 +0100)] 
userguide/install: add rust, python-yaml to ubuntu

6 years agooffloading: on bsd, disable rxcsum and v6 variants
Victor Julien [Sat, 15 Dec 2018 14:57:31 +0000 (15:57 +0100)] 
offloading: on bsd, disable rxcsum and v6 variants

6 years agooffloading: don't set multiple times per interface
Victor Julien [Sat, 15 Dec 2018 14:20:39 +0000 (15:20 +0100)] 
offloading: don't set multiple times per interface

This could happen with netmap igb0->igb0^ IPS mode.

6 years agochangelog: update for 4.1.1 suricata-4.1.1
Victor Julien [Mon, 17 Dec 2018 09:13:31 +0000 (10:13 +0100)] 
changelog: update for 4.1.1

6 years agodetect: fix content inspection flags 3584/head
Victor Julien [Thu, 13 Dec 2018 10:23:03 +0000 (11:23 +0100)] 
detect: fix content inspection flags

Fix generic inspect function content inspection flags so that
streaming buffers work correctly.

6 years agodetect/rawbytes: improve error message plus do minor cleanups
Victor Julien [Fri, 14 Dec 2018 09:22:39 +0000 (10:22 +0100)] 
detect/rawbytes: improve error message plus do minor cleanups

6 years agodetect/file-data: fix enabling http body tracking
Victor Julien [Thu, 13 Dec 2018 10:16:04 +0000 (11:16 +0100)] 
detect/file-data: fix enabling http body tracking

6 years agoKrb5: make TCP probing function less strict, messages can be fragmented 3583/head
Pierre Chifflier [Thu, 13 Dec 2018 19:30:29 +0000 (20:30 +0100)] 
Krb5: make TCP probing function less strict, messages can be fragmented

6 years agodetect/parse: error out on unused sticky buffers 3580/head
Victor Julien [Wed, 28 Nov 2018 09:02:57 +0000 (10:02 +0100)] 
detect/parse: error out on unused sticky buffers

6 years agodetect/prefilter: add closing debug return statement
Victor Julien [Tue, 27 Nov 2018 15:09:54 +0000 (16:09 +0100)] 
detect/prefilter: add closing debug return statement

6 years agoyaml: add missing eve pcap-file comment
Victor Julien [Mon, 10 Dec 2018 20:24:38 +0000 (21:24 +0100)] 
yaml: add missing eve pcap-file comment

6 years agocapture: fix mtu plus sign names for non-netmap
Victor Julien [Mon, 10 Dec 2018 19:43:37 +0000 (20:43 +0100)] 
capture: fix mtu plus sign names for non-netmap

Bug #2502.

6 years agostats: more accurate interval handling 3577/head
Victor Julien [Sat, 8 Dec 2018 17:51:23 +0000 (18:51 +0100)] 
stats: more accurate interval handling

In the stats loop sleep for a time period more closely matching
the stats.interval setting. Fix an off by one that would make
the loop wake up ~1 second early.

Bug #2716

6 years agocheck-setup: fix script names for .sh to .py
Jason Ish [Fri, 7 Dec 2018 23:59:35 +0000 (17:59 -0600)] 
check-setup: fix script names for .sh to .py

6 years agotravis: update rust version to 1.24.1 and 1.31.0.
Jason Ish [Fri, 7 Dec 2018 16:42:40 +0000 (10:42 -0600)] 
travis: update rust version to 1.24.1 and 1.31.0.

1.24.1 is now the oldest version we test support for. All major
distributions appear to be at this version or new.

With the release of 1.31.0 just out, test that as the most
recent version.

6 years agodns json v2 (C) - log rrtype in response
Jason Ish [Fri, 7 Dec 2018 15:26:31 +0000 (09:26 -0600)] 
dns json v2 (C) - log rrtype in response

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

6 years agorust/dns/v2 - log rrtype in response
Jason Ish [Fri, 7 Dec 2018 15:25:56 +0000 (09:25 -0600)] 
rust/dns/v2 - log rrtype in response

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

6 years agodns/rust - if let Some over options instead of loop.
Jason Ish [Fri, 7 Dec 2018 15:08:16 +0000 (09:08 -0600)] 
dns/rust - if let Some over options instead of loop.

Except in one case where the loop makes more sense for easy break
out.

Also remove one line of non-conforming debug logging.

6 years agorust/dns/lua - fix call convention to match C.
Jason Ish [Thu, 6 Dec 2018 17:16:00 +0000 (11:16 -0600)] 
rust/dns/lua - fix call convention to match C.

Also, when requesting the query, if the request doesn't exist,
return the query from the response. This makes it behave
more like C implementation.

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

6 years agorust/dns: add v1 dns logging
Jason Ish [Mon, 3 Dec 2018 16:34:36 +0000 (10:34 -0600)] 
rust/dns: add v1 dns logging

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

6 years agounix: fix deadlock in unix runmode on many cores 3576/head
Victor Julien [Sun, 9 Dec 2018 08:05:44 +0000 (09:05 +0100)] 
unix: fix deadlock in unix runmode on many cores

Same issue as in 7f8795c7563827f090d8679cb35847af0085fc56, with the
solution now also applied to the unix socket runmode.

Bug #2734

6 years agooutput/tx: fix multi-instance logger output
Victor Julien [Fri, 7 Dec 2018 12:18:37 +0000 (13:18 +0100)] 
output/tx: fix multi-instance logger output

Fix transactions not being logged after the first tx logger had
logged.

6 years agoapp-layer: improve transaction cleanup handling
Victor Julien [Thu, 6 Dec 2018 14:35:40 +0000 (15:35 +0100)] 
app-layer: improve transaction cleanup handling

The app layers with a custom iterator would skip a tx if during
the ..Cleanup() pass a transaction was removed.

Address this by storing the current index instead of the next
index. Also pass in the next "min_tx_id" to be incremented from
the last TX. Update loops to do this increment.

Also make sure that the min_id is properly updated if the last
TX is removed when out of order.

Finally add a SMB unittest to test this.

Reported by: Ilya Bakhtin

6 years agoapp-layer: fix tx tracking updates in tx cleanup
Victor Julien [Wed, 5 Dec 2018 21:09:15 +0000 (22:09 +0100)] 
app-layer: fix tx tracking updates in tx cleanup

Fix min_id not getting updated in all cases.

Reported by: Ilya Bakhtin

6 years agoapp-layer: add debug statements to tx cleanup logic
Victor Julien [Wed, 5 Dec 2018 21:07:53 +0000 (22:07 +0100)] 
app-layer: add debug statements to tx cleanup logic

6 years agounittests/app-layer: add helper to get app tx trackers
Victor Julien [Wed, 5 Dec 2018 21:05:49 +0000 (22:05 +0100)] 
unittests/app-layer: add helper to get app tx trackers

6 years agouserguide: updated hyperscan version reference 3571/head
jason taylor [Tue, 4 Dec 2018 20:01:55 +0000 (15:01 -0500)] 
userguide: updated hyperscan version reference

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agoUpdated link for Prelude SIEM
Travis Green [Mon, 3 Dec 2018 22:51:10 +0000 (15:51 -0700)] 
Updated link for Prelude SIEM

Updated link for Prelude SIEM to https://www.prelude-siem.org/

6 years agodetect-depth: remove semi coma from desc 3570/head
Eric Leblond [Mon, 12 Nov 2018 22:09:11 +0000 (23:09 +0100)] 
detect-depth: remove semi coma from desc

It was breaking the CSV export.

6 years agodoc: fix some links in list-keywords command
Eric Leblond [Sun, 11 Nov 2018 17:49:39 +0000 (18:49 +0100)] 
doc: fix some links in list-keywords command

6 years agosuricata.yaml: fix path to XDP doc 3567/head
Eric Leblond [Tue, 4 Dec 2018 16:08:40 +0000 (17:08 +0100)] 
suricata.yaml: fix path to XDP doc

6 years agoutil-bpf: workaround OpenBSD old libpcap
Eric Leblond [Mon, 3 Dec 2018 17:06:16 +0000 (18:06 +0100)] 
util-bpf: workaround OpenBSD old libpcap

OpenBSD is not using a pcap_compile_* function so we can just
comment the code for OpenBSD users.

6 years agoaf-packet: remove unused field in AFPThreadVars
Eric Leblond [Thu, 22 Nov 2018 14:00:11 +0000 (15:00 +0100)] 
af-packet: remove unused field in AFPThreadVars

6 years agoconfigure.ac: better llc binary detection
Eric Leblond [Tue, 23 Oct 2018 04:39:18 +0000 (06:39 +0200)] 
configure.ac: better llc binary detection

llc is needed to build the ebpf files and current autoconf code
was not working properly on Debian.

6 years agoaf-packet: remove years old todos
Eric Leblond [Fri, 12 Oct 2018 17:34:43 +0000 (19:34 +0200)] 
af-packet: remove years old todos

6 years agonetmap: use custom BPF compile function
Eric Leblond [Wed, 10 Oct 2018 22:17:59 +0000 (00:17 +0200)] 
netmap: use custom BPF compile function

6 years agoaf-packet: use the new BPF compilation function
Eric Leblond [Wed, 10 Oct 2018 22:12:00 +0000 (00:12 +0200)] 
af-packet: use the new BPF compilation function

6 years agoutil-bpf: introduce custom BPF compile functions
Eric Leblond [Wed, 10 Oct 2018 22:10:54 +0000 (00:10 +0200)] 
util-bpf: introduce custom BPF compile functions

We can't get error from pcap_compile_nopcap() so let's get our
own function and output message.

6 years agoaf-packet: micro optimization
Eric Leblond [Wed, 10 Oct 2018 17:26:29 +0000 (19:26 +0200)] 
af-packet: micro optimization

Use a else if instead of two chained if constructs.

6 years agoaf-packet: improve error handling
Eric Leblond [Mon, 8 Oct 2018 21:51:37 +0000 (23:51 +0200)] 
af-packet: improve error handling

Stress condition in Suricata could lead to interface to disconnect
when it is not necessary. This patch updates the error handling
code to try to continue reading when such a case occurs.

6 years agobypass:added new documentation reference 3563/head
jason taylor [Tue, 27 Nov 2018 19:35:35 +0000 (14:35 -0500)] 
bypass:added new documentation reference

Documentation didn't previously exist for the bypass keyword

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agodebug/log: add log level for JSON type
Eric Urban [Mon, 12 Nov 2018 18:38:50 +0000 (12:38 -0600)] 
debug/log: add log level for JSON type

resolves #2671

6 years agoconfigure: allow for --disable-suricata-update
Jason Ish [Sun, 25 Nov 2018 15:03:22 +0000 (09:03 -0600)] 
configure: allow for --disable-suricata-update

This is to prevent suricata-update from being installed if it
would otherwise be installed based on in being bundled, and
its dependencies being available.

Warn the user that Suricata-Update will not be installed if it
is bundled, but python-yaml is missing (this will also cover
the case where Python is missing).

Add "Install suricata-update" to the build summary. For consistency,
relable "Suricatasc install" as "Install suricatasc".

6 years agoconfigure: check for python-yaml
Jason Ish [Sat, 24 Nov 2018 18:06:46 +0000 (12:06 -0600)] 
configure: check for python-yaml

Don't install suricata-update if python-yaml does not
exist.

6 years agoconfigure: print datarootdir
Jason Ish [Fri, 16 Nov 2018 18:32:01 +0000 (10:32 -0800)] 
configure: print datarootdir

This is relevant now as its where Suricata engine rules
get installed.

6 years agodetect/mpm: fix fast_pattern handling of len >255
Victor Julien [Sat, 1 Dec 2018 09:06:54 +0000 (10:06 +0100)] 
detect/mpm: fix fast_pattern handling of len >255

The fast pattern selection logic would truncate a patterns len to
255 leading to assigning the same pid to different patterns.

This in turn would be caught by the hyperscan setup code which would
abort.

Bug #2714.

6 years agorust/filetracker: remove reachable panic 3561/head
Victor Julien [Fri, 30 Nov 2018 10:59:17 +0000 (11:59 +0100)] 
rust/filetracker: remove reachable panic

Remove reachable panic condition when an existing file chunk is not
completed. Instead trunc the file and reset.

Related to bug #2717

6 years agonfs: improve file tracking under packet loss
Victor Julien [Fri, 30 Nov 2018 10:38:04 +0000 (11:38 +0100)] 
nfs: improve file tracking under packet loss

In case of packet loss during an in-progress chunk the file tracker
could loose track of a file because it couldn't map the XID to a
file handle.

The file tracker would then panic if a new file was opened, as
it noticed the last chunk wasn't yet complete.

This patch tracks the file handle for a in-progress chunk in the
state, just like the tracking of the size that is left.

Bug #2717

6 years agorust/nfs: improve debug output
Victor Julien [Fri, 30 Nov 2018 10:37:46 +0000 (11:37 +0100)] 
rust/nfs: improve debug output

6 years agoiprep: small cleanups 3559/head
Victor Julien [Thu, 22 Nov 2018 09:34:57 +0000 (10:34 +0100)] 
iprep: small cleanups

6 years agoiprep: improve error checking of path handling
Victor Julien [Thu, 22 Nov 2018 09:34:49 +0000 (10:34 +0100)] 
iprep: improve error checking of path handling

6 years agodetect: improve inspect buffer handling
Victor Julien [Wed, 18 Apr 2018 13:25:40 +0000 (15:25 +0200)] 
detect: improve inspect buffer handling

Fix and Optimize cleanup. For the simple single inspect buffer optimize
the cleanup by keeping track of the actually used buffers. This avoid
looping over unused buffers.

Fix the case of cleaning not being done after a tx if the next tx is
also inspected in the context of the same packet.

Fix cleanup of the multi-inspect buffers. Optimize in 2 ways. First
like with single keep track of which multi-inspect buffers have been
used. Second, keep a max of the buffers within a multi-inspect buffer.
Use this max to limit (nested) looping.

6 years agoprofiling: set loop limit to match array size 3554/head
jason taylor [Thu, 15 Nov 2018 04:18:52 +0000 (23:18 -0500)] 
profiling: set loop limit to match array size

Signed-off-by: jason taylor <jtfas90@gmail.com>
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.