]> git.ipfire.org Git - thirdparty/suricata.git/log
thirdparty/suricata.git
6 years agoflow-manager: fix unittest initialization 3466/head
Victor Julien [Sun, 26 Aug 2018 06:56:33 +0000 (08:56 +0200)] 
flow-manager: fix unittest initialization

6 years agoapp-layer-ssl: make sure that JA3 stuff is only initialized once
Mats Klepsland [Sat, 25 Aug 2018 19:50:05 +0000 (21:50 +0200)] 
app-layer-ssl: make sure that JA3 stuff is only initialized once

Avoid possible memory leaks by making sure that JA3 buffer and
string is only initialized once.

6 years agoapp-layer-ssl: fix memleak/coredump (Bug #2603)
Mats Klepsland [Sat, 25 Aug 2018 16:47:18 +0000 (18:47 +0200)] 
app-layer-ssl: fix memleak/coredump (Bug #2603)

6 years agoaf-packet: close the socket in case of early fail
Eric Leblond [Tue, 28 Aug 2018 20:46:25 +0000 (22:46 +0200)] 
af-packet: close the socket in case of early fail

6 years agolog-filestore: fix file descriptor leak
Eric Leblond [Wed, 22 Aug 2018 22:21:51 +0000 (00:21 +0200)] 
log-filestore: fix file descriptor leak

In the case we exceed the number of simultaneously open
file we can reach a state were we will not close the file
after writing.

Thanks to Steve Grubb <sgrubb@redhat.com> for the analysis.

6 years agoprofiling/app-layer: fix TCP parsers showing UDP stats
Victor Julien [Wed, 29 Aug 2018 10:11:03 +0000 (12:11 +0200)] 
profiling/app-layer: fix TCP parsers showing UDP stats

6 years agoprofiling: add missing logger labels
Victor Julien [Wed, 29 Aug 2018 10:08:59 +0000 (12:08 +0200)] 
profiling: add missing logger labels

6 years agodetect: clean up sgh flags and add cocci check 3457/head
Victor Julien [Thu, 16 Aug 2018 20:15:09 +0000 (22:15 +0200)] 
detect: clean up sgh flags and add cocci check

6 years agostream: minor code cleanups
Victor Julien [Thu, 16 Aug 2018 19:59:37 +0000 (21:59 +0200)] 
stream: minor code cleanups

6 years agodetect/mpm: clean up setup code
Victor Julien [Thu, 16 Aug 2018 12:57:20 +0000 (14:57 +0200)] 
detect/mpm: clean up setup code

6 years agodhcp: check length of option before accessing
Jason Ish [Mon, 13 Aug 2018 04:44:02 +0000 (22:44 -0600)] 
dhcp: check length of option before accessing

Prevent Rust index out of bounds panic.

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

6 years agodhcp: remove println!() that got committed
Jason Ish [Mon, 13 Aug 2018 04:40:10 +0000 (22:40 -0600)] 
dhcp: remove println!() that got committed

6 years agodetect: fix file_data detect issue with alert ip
Victor Julien [Wed, 15 Aug 2018 10:28:52 +0000 (12:28 +0200)] 
detect: fix file_data detect issue with alert ip

Fix mpm progress being updated by irrelevant engines. Esp in the
case of file_data engines, signature can contain multiple versions
of the same engine, registered for different 'progress' values.

This would lead to signatures being considered 'can't match' even
in cases where they clearly could still match.

Only consider those progress values that apply to the protocol in
use.

6 years agodetect/parse: try to set flow direction for sigs w/o explict app proto as well
Victor Julien [Wed, 15 Aug 2018 10:15:26 +0000 (12:15 +0200)] 
detect/parse: try to set flow direction for sigs w/o explict app proto as well

6 years agoconfigure: added rust install notes
jason taylor [Tue, 17 Jul 2018 13:27:23 +0000 (09:27 -0400)] 
configure: added rust install notes

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agoconfigure: updated fedora/centos references
jason taylor [Tue, 17 Jul 2018 00:53:24 +0000 (20:53 -0400)] 
configure: updated fedora/centos references

* updated fedora yum references to dnf
* updated/added centos/rhel references

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agoeve/http: add tx->request_port_number as http_port
Maurizio Abba [Fri, 3 Aug 2018 12:51:13 +0000 (13:51 +0100)] 
eve/http: add tx->request_port_number as http_port

Add the port specified in the hostname (if any) to the http object in
eve. The port may be different from the dest_port used by the TCP flow.

6 years agoyaml: add var for DC_SERVERS (Domain Controller)
Konstantin Klinger [Mon, 23 Jul 2018 12:46:33 +0000 (14:46 +0200)] 
yaml: add var for DC_SERVERS (Domain Controller)

6 years agoyaml: add note for dns v1 not available with rust
Konstantin Klinger [Mon, 23 Jul 2018 12:50:21 +0000 (14:50 +0200)] 
yaml: add note for dns v1 not available with rust

6 years agoyaml: add note for dns.log with Rust
Konstantin Klinger [Mon, 23 Jul 2018 12:48:29 +0000 (14:48 +0200)] 
yaml: add note for dns.log with Rust

It is not availbale when rust is enabled.

6 years agodoc: iprep supports CIDR networks
Eric Leblond [Sat, 4 Aug 2018 07:49:59 +0000 (09:49 +0200)] 
doc: iprep supports CIDR networks

6 years agoutil-unittest: fix typo
Eric Leblond [Sat, 4 Aug 2018 07:40:41 +0000 (09:40 +0200)] 
util-unittest: fix typo

6 years agodetect/files: fix inspection issues with 'alert ip'
Victor Julien [Tue, 14 Aug 2018 09:12:37 +0000 (11:12 +0200)] 
detect/files: fix inspection issues with 'alert ip'

Don't track the 'skipped' engines as matches.

6 years agodetect/filehash: try to open data file from rulefile dir
Victor Julien [Tue, 14 Aug 2018 08:17:37 +0000 (10:17 +0200)] 
detect/filehash: try to open data file from rulefile dir

If the data file can't be found in the default location, which
normally is 'default-rule-path', try to see if it can be found
in the path of the rule file that references it.

This makes QA much easier.

6 years agofiles: only prune in own direction
Victor Julien [Tue, 14 Aug 2018 07:21:04 +0000 (09:21 +0200)] 
files: only prune in own direction

Only prune files in own direction. The opposite direction may still
require inspection.

6 years agococci: add more flag checks 3453/head
Victor Julien [Mon, 13 Aug 2018 08:23:59 +0000 (10:23 +0200)] 
cocci: add more flag checks

6 years agodetect: use BIT_* macros
Victor Julien [Mon, 13 Aug 2018 08:13:53 +0000 (10:13 +0200)] 
detect: use BIT_* macros

Also add notes that when adding flags they should be added to the
analyzer as well.

6 years agostream: use BIT_U8 for stream flags
Victor Julien [Mon, 13 Aug 2018 07:21:05 +0000 (09:21 +0200)] 
stream: use BIT_U8 for stream flags

7 years agodetect/prefilter: speed up setup 3451/head
Victor Julien [Thu, 9 Aug 2018 22:06:24 +0000 (00:06 +0200)] 
detect/prefilter: speed up setup

If the global detect.prefilter.default setting is not "auto", it is
wasteful to run each prefilter setup routine. This patch tracks which
of the engines have been explicitly enabled in the rules and only
runs those.

7 years agodetect/prefilter: fix prefilter when setting is 'mpm'
Victor Julien [Thu, 9 Aug 2018 15:35:32 +0000 (17:35 +0200)] 
detect/prefilter: fix prefilter when setting is 'mpm'

When prefilter is not enabled globally, it is still possible to
enable it per signature. This was broken however, as the setup
code would never be called.

This commit always call the setup code and lets that sort out
which signatures (if any) to enable prefiltering for.

7 years agodetect: include keyword types in detect.h
Victor Julien [Thu, 9 Aug 2018 22:05:50 +0000 (00:05 +0200)] 
detect: include keyword types in detect.h

7 years agodetect/analyzer: show pattern that is used by mpm
Victor Julien [Thu, 9 Aug 2018 21:27:00 +0000 (23:27 +0200)] 
detect/analyzer: show pattern that is used by mpm

Set a new DETECT_CONTENT_MPM flag on the pattern that is selected
during setup.

7 years agodetect/prefilter: fix alias for fast_pattern
Victor Julien [Thu, 9 Aug 2018 15:33:19 +0000 (17:33 +0200)] 
detect/prefilter: fix alias for fast_pattern

If prefilter is used on a content keyword, it acts as a simple
fast_pattern statement. This was broken because the SIG_FLAG_PREFILTER
flag bypasses MPM for a sig. This commits fixes this by not setting
the flag when it should act as fast_pattern.

7 years agodetect: limit flush logic to sigs that need it
Victor Julien [Thu, 9 Aug 2018 13:32:49 +0000 (15:32 +0200)] 
detect: limit flush logic to sigs that need it

Limit the early 'flush' logic to sigs that actually need to match
on both stream and http bodies.

7 years agodetect/analyzer: add built-in lists
Victor Julien [Thu, 9 Aug 2018 11:45:24 +0000 (13:45 +0200)] 
detect/analyzer: add built-in lists

7 years agodetect: don't setup PMATCH if it will be unused
Victor Julien [Thu, 9 Aug 2018 11:45:04 +0000 (13:45 +0200)] 
detect: don't setup PMATCH if it will be unused

Safes a bit of memory and makes it easier to debug.

7 years agodetect/analyzer: add Signature::flags
Victor Julien [Thu, 9 Aug 2018 11:10:38 +0000 (13:10 +0200)] 
detect/analyzer: add Signature::flags

7 years agodetect: remove STATE_MATCH flag use at runtime
Victor Julien [Thu, 9 Aug 2018 10:35:58 +0000 (12:35 +0200)] 
detect: remove STATE_MATCH flag use at runtime

Instead, use it only at init time and use Signature::app_inspect
directly at runtime.

7 years agodetect: cleanup direct SIG_FLAG_STATE_MATCH use
Victor Julien [Thu, 9 Aug 2018 09:51:07 +0000 (11:51 +0200)] 
detect: cleanup direct SIG_FLAG_STATE_MATCH use

This flag should normally not be set manually. It will be set by the
code registering the app engines in a signature.

7 years agodetect/dnp3: cleanup list and proto registration
Victor Julien [Thu, 9 Aug 2018 09:45:18 +0000 (11:45 +0200)] 
detect/dnp3: cleanup list and proto registration

7 years agodetect: remove SIG_FLAG_STATE_MATCH flag check
Victor Julien [Thu, 9 Aug 2018 09:32:00 +0000 (11:32 +0200)] 
detect: remove SIG_FLAG_STATE_MATCH flag check

It could not fail as before it the flag was already checked as a bail
out condition.

7 years agodetect: minor formatting fixups
Victor Julien [Thu, 9 Aug 2018 09:21:01 +0000 (11:21 +0200)] 
detect: minor formatting fixups

7 years agoflow: reduce structure size by removing gap
Victor Julien [Thu, 9 Aug 2018 09:14:33 +0000 (11:14 +0200)] 
flow: reduce structure size by removing gap

7 years agodetect/http: flush bodies when inspecting stream
Victor Julien [Wed, 8 Aug 2018 12:06:43 +0000 (14:06 +0200)] 
detect/http: flush bodies when inspecting stream

The HTTP bodies (http_client_body and http_server_body/file_data) use
settings to control how much data we have before doing first inspection:

    request-body-minimal-inspect-size
    response-body-minimal-inspect-size

These settings default to 32k as quite some existing rules need this.

At the same time, the 'raw stream' inspection uses its own limits. By
default it inspects the data in blocks of about 2.5k. This could lead
to a situation where rules would not match.

For example, with 2 rules like this:

    content:"abc"; content:"data="; http_client_body; depth:5; sid:1;
    content:"xyz"; sid:2;

Sid 1 would only be inspected when the POST body reached the 32k limit
or when it was complete. Observed case shows the POST body to be 18k.
Sid 2 is inspected as soon as the 2.5k limit is reached, and then again
for each 2.5k increment. This moves the raw stream tracker forward.

So by the time sid 1 is inspected, some 18/19k into the stream, the
raw stream tracker is actually already moved forward for approximately
17.5k, this leads to the stream match of sid 1 possibly not matching.
Since the body match is at the start of the buffer, it makes sense
that the body and stream are inspected together.

The body inspection uses a tracker 'body_inspected', that keeps track
of how far into the body both MPM and per signature inspection has
moved.

This patch updates the logic in 2 ways:

1. it triggers earlier HTTP body inspection, which is matched to the
   stream inspection. When the detection engine finds it has stream
   data available for inspection, it passes the new 'STREAM_FLUSH'
   flag to the HTTP body inspection code. Which will then do an
   early inspection, even if still before the min inspect size.

2. to still somewhat adhere to the min inspect size, the body
   tracker is not updated until the min inspect size is reached.
   This will lead to some re-evaluation of the same body data.

If raw stream reassembly is disabled, this 'STREAM_FLUSH' flag is
never set, and the old behavior is used.

Bug #2522.

7 years agostream: improve TCP CLOSED handling
Victor Julien [Mon, 30 Jul 2018 08:26:21 +0000 (10:26 +0200)] 
stream: improve TCP CLOSED handling

Trigger app layer reassembly in both directions as soon as we've set
the TCP state to closed.

In IDS mode, if a toserver packet would close the state, the app layer
would not get updated until the next toclient packet. However, in
detection, the raw stream inspection would already use all available
stream data in detection and move the 'raw stream progress' tracker
forward. When in later (a) packet(s) the app layer was updated and
inspection ran on the app layer, the stream progress was already
moved too far forward. This would lead to signatures that matched
on both stream and app layer to not match.

By triggering the app layer reassembly as soon as the TCP state is
set to closed, the inspection as both the stream and app layer data
available at the same time so these rules can match.

Bug: #2570
Bug: #2554

7 years agodetect: add debug statements to stream inspect
Victor Julien [Wed, 8 Aug 2018 05:04:09 +0000 (07:04 +0200)] 
detect: add debug statements to stream inspect

7 years agoproto/detect: add debug info
Victor Julien [Wed, 8 Aug 2018 05:03:25 +0000 (07:03 +0200)] 
proto/detect: add debug info

7 years agoflow: flag packets as established for async
Victor Julien [Tue, 7 Aug 2018 11:28:55 +0000 (13:28 +0200)] 
flow: flag packets as established for async

If a stream is async we see only on side of the traffic. This would
lead to the flow engine not flagging packets as 'established' even
if the flow state was in fact established. The flow was tagged as
such by the TCP engine.

This patch considers the flow state for setting the packet flag.

Bug #2491.

7 years agorust/smb: implement stream-depth, unlimited by default
Victor Julien [Tue, 7 Aug 2018 08:57:49 +0000 (10:57 +0200)] 
rust/smb: implement stream-depth, unlimited by default

7 years agostream-tcp: fix typo in debug message
Eric Leblond [Tue, 12 Jun 2018 16:59:46 +0000 (18:59 +0200)] 
stream-tcp: fix typo in debug message

7 years agoapp-layer-htp: close file with TRUNCATE state
Giuseppe Longo [Mon, 12 Mar 2018 11:41:35 +0000 (12:41 +0100)] 
app-layer-htp: close file with TRUNCATE state

When a file in TOSERVER direction is being stored and
libhtp or stream depth limit is reached,
it will be closed by HTPCallbackRequest without setting
any flags so the file state will be set to CLOSED
instead of TRUNCATED.

7 years agoapp-layer-parser: split registration flags
Victor Julien [Tue, 7 Aug 2018 08:19:02 +0000 (10:19 +0200)] 
app-layer-parser: split registration flags

7 years agoapp-layer-parser: don't overwrite stream_depth value
Giuseppe Longo [Thu, 18 Jan 2018 11:49:53 +0000 (12:49 +0100)] 
app-layer-parser: don't overwrite stream_depth value

When an app-layer parser is enabled, it could set its
own stream_depth value calling the API AppLayerParserSetStreamDepth.

Then, the function AppLayerParserPostStreamSetup will replace
the stream_depth value already set with stream_config.reassembly_depth.

To avoid overwriting, in AppLayerParserSetStreamDepth API a flag
will be set internally to specify that a value is already set.

7 years agodoc: update multi-tentant for device feature 3447/head
Victor Julien [Wed, 31 May 2017 07:55:33 +0000 (09:55 +0200)] 
doc: update multi-tentant for device feature

7 years agomulti-tenant: introduce device selector
Victor Julien [Wed, 31 May 2017 07:33:16 +0000 (09:33 +0200)] 
multi-tenant: introduce device selector

Add device to tenant mapping support:

  mappings:
  - device: ens5f0
    tenant-id: 1
  - device: ens5f1
    tenant-id: 23

Implemented by assigning the tenant id to the 'livedev', which means
it's only supported for capture methods that use the livedev API.

It's also currently not supported for IPS. In a case like 'eth0 -> eth1'
it's unclear which tenant should be used for the return traffic in a
flow, where the incoming device is 'eth1'.

7 years agorust/dhcp: free events and destate at tx end 3446/head
Victor Julien [Mon, 6 Aug 2018 10:08:20 +0000 (12:08 +0200)] 
rust/dhcp: free events and destate at tx end

7 years agodecode: set pktlen of decode handler to uint32
Maurizio Abba [Tue, 16 Jan 2018 16:53:51 +0000 (16:53 +0000)] 
decode: set pktlen of decode handler to uint32

Change the decode handler signature to increase the size of its decode
handler, from uint16 to uint32. This is necessary to let suricata use
interfaces with mtu > 65535 (ex: lo interface has default size 65536).

It's necessary to change several primitive for Packet manipulation, to
unify the parameter "packet length" whenever we are before IP decoding.

Add tests before calling DecodeIPVX function to avoid a possible
integer overflow over the len parameter.

7 years agodetect: free rule group init memory at the end of startup
Victor Julien [Sat, 4 Aug 2018 08:10:58 +0000 (10:10 +0200)] 
detect: free rule group init memory at the end of startup

7 years agodetect: fix fileext and filename negated match
Maurizio Abba [Tue, 31 Jul 2018 06:08:10 +0000 (07:08 +0100)] 
detect: fix fileext and filename negated match

fix bug in fileext and filename preventing negated match to work
correctly. Previously, negated fileext (such as !"php") would cause a
match anyway on files that have extension php, as the last if would not
be accessed.

Using the same workflow as detect-filemagic we remove the final
isolated if and set it as a branch of the previous if.

7 years agoeve/smb: use flow direction for tuple 3440/head
Victor Julien [Thu, 2 Aug 2018 13:10:15 +0000 (15:10 +0200)] 
eve/smb: use flow direction for tuple

7 years agosmb1: add SMB1_COMMAND_QUERY_INFO_DISK command mapping
Victor Julien [Thu, 2 Aug 2018 13:09:52 +0000 (15:09 +0200)] 
smb1: add SMB1_COMMAND_QUERY_INFO_DISK command mapping

7 years agosmb: add smb-events.rules to dist
Victor Julien [Thu, 2 Aug 2018 11:49:26 +0000 (13:49 +0200)] 
smb: add smb-events.rules to dist

7 years agooutput-json: ensure string is json-encodable
Maurizio Abba [Thu, 26 Jul 2018 12:54:58 +0000 (13:54 +0100)] 
output-json: ensure string is json-encodable

Substitute json_string with SCJsonString custom function.
SCJsonString will ensure string passed is json-encodable (utf-8).
If it's not, the string will be converted in such a way that any
non-printable character will be encoded in its hex form.
The resulting json object will be returned.

rust modification will encode any non-printable character during its
conversion in to_cstring.

7 years agodevices: clean up device init code
Victor Julien [Thu, 2 Aug 2018 11:21:51 +0000 (13:21 +0200)] 
devices: clean up device init code

7 years agosuricata: fix init process for layer 2 IPS
Eric Leblond [Tue, 24 Jul 2018 15:28:47 +0000 (17:28 +0200)] 
suricata: fix init process for layer 2 IPS

4474889667d664a66c1c123f4f7d2756e8a7fbb9 did break the logic of IPS
mode detection for layer 2 IPS mode like Netmap and AF_PACKET. This
pach fixes the issue by calling the IPS detection mode after
complete registration of the interfaces.

Reported-by: Alexander Gozman <a.gozman@securitycode.ru>
7 years agooutput/tls: don't pass NULL fingerprint to json logging
Victor Julien [Thu, 2 Aug 2018 10:31:40 +0000 (12:31 +0200)] 
output/tls: don't pass NULL fingerprint to json logging

7 years agossl: fix uninitialized variable warning
Victor Julien [Thu, 2 Aug 2018 06:12:48 +0000 (08:12 +0200)] 
ssl: fix uninitialized variable warning

7 years agodetect/analyzer: log mask flags and more engine details
Victor Julien [Wed, 1 Aug 2018 21:42:29 +0000 (23:42 +0200)] 
detect/analyzer: log mask flags and more engine details

7 years agodcerpc: fix dce_iface not matching
Victor Julien [Wed, 1 Aug 2018 19:52:16 +0000 (21:52 +0200)] 
dcerpc: fix dce_iface not matching

7 years agodetect/dce: fix false positives in detection
Victor Julien [Wed, 1 Aug 2018 15:32:34 +0000 (17:32 +0200)] 
detect/dce: fix false positives in detection

If a signature didn't explicitly specified 'dcerpc' or 'smb' as the
app proto, false positives on other traffic could happen. This was
caused by the sig not having a app_proto set. This isn't set as the
rule is supposed to match against either ALPROTO_DCERPC or ALPROTO_SMB.

To avoid adding runtime costs for checking for both protocols, this
patch adds a new flag for DCERPC in the 'mask' logic. The flag is set
on the sig if dce_* keywords are present and set on the packet if the
flow's app proto is either ALPROTO_DCERPC or ALPROTO_SMB.

Bug #2559

Reported-by: Jason Taylor
7 years agodetect: minor code cleanups
Victor Julien [Wed, 1 Aug 2018 15:12:17 +0000 (17:12 +0200)] 
detect: minor code cleanups

7 years agodetect/dce: keyword cleanups
Victor Julien [Wed, 1 Aug 2018 15:06:26 +0000 (17:06 +0200)] 
detect/dce: keyword cleanups

7 years agosmb: probing parser improvement
Victor Julien [Tue, 31 Jul 2018 17:20:15 +0000 (19:20 +0200)] 
smb: probing parser improvement

7 years agoproto/detect: remove probing parser offset argument
Victor Julien [Tue, 31 Jul 2018 07:34:29 +0000 (09:34 +0200)] 
proto/detect: remove probing parser offset argument

Remove offset argument as it was unused.

7 years agodetect/flow: minor code cleanups
Victor Julien [Mon, 30 Jul 2018 17:27:09 +0000 (19:27 +0200)] 
detect/flow: minor code cleanups

7 years agodetect: avoid potential use-after-free in error path
Victor Julien [Mon, 30 Jul 2018 15:04:57 +0000 (17:04 +0200)] 
detect: avoid potential use-after-free in error path

7 years agoproto/detect: minor cleanup
Victor Julien [Sun, 29 Jul 2018 11:12:21 +0000 (13:12 +0200)] 
proto/detect: minor cleanup

7 years agodetect: clean up counter registration
Victor Julien [Sat, 28 Jul 2018 12:23:01 +0000 (14:23 +0200)] 
detect: clean up counter registration

7 years agoflow: fix comment typos
Victor Julien [Thu, 26 Jul 2018 08:47:52 +0000 (10:47 +0200)] 
flow: fix comment typos

7 years agonfs4: create tx for CREATE procedure 3432/head
Victor Julien [Mon, 23 Jul 2018 09:47:39 +0000 (11:47 +0200)] 
nfs4: create tx for CREATE procedure

7 years agonfs: fix applying nfs3 logging logic to nfs4
Victor Julien [Mon, 23 Jul 2018 09:47:05 +0000 (11:47 +0200)] 
nfs: fix applying nfs3 logging logic to nfs4

7 years agonfs4: log remove procedure + add multi-proc support
Victor Julien [Sat, 21 Jul 2018 16:13:32 +0000 (18:13 +0200)] 
nfs4: log remove procedure + add multi-proc support

Add TX creation for NFS4 transactions. Start with the 'REMOVE' procedure.

Start on logging all procs. In NFS4 COMPOUND records there are multiple
procedures. One of them can be considered the 'main' procedure, with others
as supporting utility. This patch adds the first step in supporting to
track those in the TX for logging and inspection.

7 years agonfs4: for putrootfh set 'mount root' as name
Victor Julien [Sat, 21 Jul 2018 14:59:26 +0000 (16:59 +0200)] 
nfs4: for putrootfh set 'mount root' as name

7 years agonfs: rename generic functions from nfs3 to nfs
Victor Julien [Sat, 21 Jul 2018 08:12:41 +0000 (10:12 +0200)] 
nfs: rename generic functions from nfs3 to nfs

7 years agonfs: move v2 parsing into own file
Victor Julien [Sat, 21 Jul 2018 08:06:18 +0000 (10:06 +0200)] 
nfs: move v2 parsing into own file

7 years agonfs3: move nfs3 specific handling into own file
Victor Julien [Sat, 21 Jul 2018 07:54:36 +0000 (09:54 +0200)] 
nfs3: move nfs3 specific handling into own file

7 years agonfs: request parser cleanup
Victor Julien [Sat, 21 Jul 2018 07:46:42 +0000 (09:46 +0200)] 
nfs: request parser cleanup

7 years agochangelog: update to 4.1rc1 suricata-4.1.0-rc1
Victor Julien [Fri, 20 Jul 2018 08:20:17 +0000 (10:20 +0200)] 
changelog: update to 4.1rc1

7 years agochangelog: add missing 4.1beta1 tickets
Victor Julien [Fri, 20 Jul 2018 08:07:29 +0000 (10:07 +0200)] 
changelog: add missing 4.1beta1 tickets

7 years agonfs: get rid of reachable panic statements
Victor Julien [Thu, 19 Jul 2018 17:13:22 +0000 (19:13 +0200)] 
nfs: get rid of reachable panic statements

7 years agonfs4: remove panic calls, set events instead
Victor Julien [Thu, 19 Jul 2018 13:45:08 +0000 (15:45 +0200)] 
nfs4: remove panic calls, set events instead

7 years agonfs4: support 4.1 SEQUENCE procedure
Victor Julien [Thu, 19 Jul 2018 13:28:12 +0000 (15:28 +0200)] 
nfs4: support 4.1 SEQUENCE procedure

7 years agoconfig: better default rule file configuration 3428/head
Jason Ish [Fri, 13 Jul 2018 14:55:12 +0000 (08:55 -0600)] 
config: better default rule file configuration

Move the rule file configuration down near the bottom of the
configuration file under advanced settings. With the bundling
of Suricata-Update, any rule file configuration within
suricata.yaml could be considered advanced.

Add extra comments to the yaml to make it more clear which was
enabled at installation time.

7 years agodetect-parse: fix missing space in error message (2541)
Danny Browning [Tue, 17 Jul 2018 18:17:19 +0000 (12:17 -0600)] 
detect-parse: fix missing space in error message (2541)

Fix missing space in error message.

7 years agoenip: harden byte parsing code
Victor Julien [Thu, 19 Apr 2018 12:55:01 +0000 (14:55 +0200)] 
enip: harden byte parsing code

Make sure we never read more than we have.

Reported-by: Henning Perl
7 years agossh: fix out of bounds read in banner parsing
Victor Julien [Thu, 19 Apr 2018 09:27:43 +0000 (11:27 +0200)] 
ssh: fix out of bounds read in banner parsing

Reported-by: Henning Perl
7 years agostream: support RST getting lost/ignored
Victor Julien [Thu, 10 May 2018 15:23:05 +0000 (17:23 +0200)] 
stream: support RST getting lost/ignored

In case of a valid RST on a SYN, the state is switched to 'TCP_CLOSED'.
However, the target of the RST may not have received it, or may not
have accepted it. Also, the RST may have been injected, so the supposed
sender may not actually be aware of the RST that was sent in it's name.

In this case the previous behavior was to switch the state to CLOSED and
accept no further TCP updates or stream reassembly.

This patch changes this. It still switches the state to CLOSED, as this
is by far the most likely to be correct. However, it will reconsider
the state if the receiver continues to talk.

To do this on each state change the previous state will be recorded in
TcpSession::pstate. If a non-RST packet is received after a RST, this
TcpSession::pstate is used to try to continue the conversation.

If the (supposed) sender of the RST is also continueing the conversation
as normal, it's highly likely it didn't send the RST. In this case
a stream event is generated.

Ticket: #2501

Reported-By: Kirill Shipulin
7 years agostream-events: fix mapping
Victor Julien [Mon, 21 May 2018 14:15:39 +0000 (16:15 +0200)] 
stream-events: fix mapping

7 years agosmb: log trans2 that enable delete on close 3421/head
Victor Julien [Tue, 10 Jul 2018 15:22:53 +0000 (17:22 +0200)] 
smb: log trans2 that enable delete on close

7 years agosmb1: add support for trans2 set_path_info rename
Victor Julien [Mon, 9 Jul 2018 13:43:02 +0000 (15:43 +0200)] 
smb1: add support for trans2 set_path_info rename