]> git.ipfire.org Git - thirdparty/suricata.git/log
thirdparty/suricata.git
3 years agohttp2: follow range requests 6409/head
Philippe Antoine [Tue, 7 Sep 2021 12:54:57 +0000 (14:54 +0200)] 
http2: follow range requests

Move the content-range parsing code to rust

3 years agorange: post process out of order blocks
Philippe Antoine [Tue, 7 Sep 2021 12:52:36 +0000 (14:52 +0200)] 
range: post process out of order blocks

A block is determined out of order on opening.
But on closing, the gap before it may have been filled.
So, we must post-process it, ie iterate over the red and black
tree so see what blocks we can get.

3 years agorange: no final zero in key
Philippe Antoine [Tue, 7 Sep 2021 12:50:27 +0000 (14:50 +0200)] 
range: no final zero in key

for future compatibility with rust

3 years agohttp2: better rust lifetimes
Philippe Antoine [Tue, 7 Sep 2021 12:44:25 +0000 (14:44 +0200)] 
http2: better rust lifetimes

so that borrow check gets happy

3 years agorust: rename to StreamingBufferConfig as in C
Philippe Antoine [Tue, 7 Sep 2021 12:43:16 +0000 (14:43 +0200)] 
rust: rename to StreamingBufferConfig as in C

3 years agohttp: more consistent return values for HTPFileOpenWithRange
Philippe Antoine [Thu, 2 Sep 2021 19:27:14 +0000 (21:27 +0200)] 
http: more consistent return values for HTPFileOpenWithRange

3 years agohttp: increase tracked files for ranges as well
Philippe Antoine [Thu, 2 Sep 2021 19:15:02 +0000 (21:15 +0200)] 
http: increase tracked files for ranges as well

3 years agohttp: range transfering ownership of file container
Philippe Antoine [Thu, 2 Sep 2021 15:14:50 +0000 (17:14 +0200)] 
http: range transfering ownership of file container

To make concurrency reasoning clearer

3 years agohttp: avoid one lock for range append data
Philippe Antoine [Fri, 27 Aug 2021 15:11:23 +0000 (17:11 +0200)] 
http: avoid one lock for range append data

Better structure design to ensure that one flow maximum
is owning and appending into the file, adding fileOwning field.

Adds also a gap field in a range buffer, so that we can
feed the gap on closing, when we are protected from concurrency
by a lock, (lock which got removed in the append path)

Fixes memcap when encountering a duplicate while inserting
in red and black tree

Adds many comments

3 years agothash: add debug validation check for use_cnt
Victor Julien [Tue, 17 Aug 2021 12:07:17 +0000 (14:07 +0200)] 
thash: add debug validation check for use_cnt

3 years agohttp/range: cleanup and simplification
Victor Julien [Tue, 3 Aug 2021 09:51:26 +0000 (11:51 +0200)] 
http/range: cleanup and simplification

Simplify locking by using the THashData lock instead of a separate
range lock.

Avoid size_t in function arguments.

Clean up file handling functions.

Implement handling of alloc errors.

Rename yaml entry to byterange

Unify public api naming

3 years agohttp/range: optimize struct layout
Victor Julien [Tue, 3 Aug 2021 10:21:31 +0000 (12:21 +0200)] 
http/range: optimize struct layout

3 years agohttp/range: fix memory leak on out of order ranges
Victor Julien [Mon, 2 Aug 2021 10:39:21 +0000 (12:39 +0200)] 
http/range: fix memory leak on out of order ranges

3 years agohttp/range: reassemble files from different flows with range
Philippe Antoine [Thu, 18 Feb 2021 14:03:36 +0000 (15:03 +0100)] 
http/range: reassemble files from different flows with range

adds a container, ie a thread safe hash table whose
key is the filename

keep a tree of unordered ranges, up to a memcap limit

adds HTPFileOpenWithRange to handle like HTPFileOpen
if there is a range : open 2 files, one for the whole reassembled,
and one only for the current range

3 years agoutil: export Djb2 hash string function
Philippe Antoine [Thu, 18 Feb 2021 10:44:24 +0000 (11:44 +0100)] 
util: export Djb2 hash string function

3 years agoutil: adds util function SCBufferCmp
Philippe Antoine [Tue, 18 Feb 2020 14:01:03 +0000 (15:01 +0100)] 
util: adds util function SCBufferCmp

Compares two buffers with their two sizes

3 years agodetect: suppress scan-build warning
Victor Julien [Thu, 12 Aug 2021 14:23:11 +0000 (16:23 +0200)] 
detect: suppress scan-build warning

3 years agogithub-ci: remove fedora 32 builds (eol) 6404/head
Jason Ish [Wed, 22 Sep 2021 16:48:52 +0000 (10:48 -0600)] 
github-ci: remove fedora 32 builds (eol)

Promote Fedora versions used in builds to 33 or 34.

3 years agolua: move lua includes to util-lua.h
Jason Ish [Wed, 22 Sep 2021 01:54:03 +0000 (19:54 -0600)] 
lua: move lua includes to util-lua.h

Moves Lua includes to util-lua.h instead of suricata-common
so plugins (or library users) don't need to be aware of the
Lua that Suricata was built with. Instead only source files
that need to be Lua aware can include util-lua.h.

3 years agosmb: fix broken stream depth setting 6395/head
Shivani Bhardwaj [Tue, 7 Sep 2021 12:01:04 +0000 (17:31 +0530)] 
smb: fix broken stream depth setting

The stream depth setting was broken since it was moved to Rust because
of a missing parser for memory values in configuration.
Use get_memval fn from conf.rs to calculate and fetch the correct
values.

3 years agorust/conf: add getter for memval
Shivani Bhardwaj [Thu, 9 Sep 2021 02:36:51 +0000 (08:06 +0530)] 
rust/conf: add getter for memval

Add a parser for memory values like 50kb, 20mb, etc on the Rust side.

3 years agotransform: use generic Free function
Philippe Antoine [Thu, 18 Mar 2021 15:07:55 +0000 (16:07 +0100)] 
transform: use generic Free function

to free subelements in the context structure

3 years agofuzz: fixes a leak in applayerparse target
Philippe Antoine [Mon, 20 Sep 2021 18:45:10 +0000 (20:45 +0200)] 
fuzz: fixes a leak in applayerparse target

If a protocol change was requested, the target did not handle
it as Suricata, as the target is meant to handle only one
app-layer protocol.

3 years agoplugins: check if eve file type is registered
Jason Ish [Mon, 31 May 2021 22:55:31 +0000 (16:55 -0600)] 
plugins: check if eve file type is registered

Instead of the 2 registration functions, just use one with
a utility method to check for conflicts against built-in
types.

3 years agoplugins: remove internal fields
Jason Ish [Thu, 27 May 2021 17:46:19 +0000 (11:46 -0600)] 
plugins: remove internal fields

The internal flag is not really used. This also reverts the behaviour of
the plugin refactor of passing a ConfNode based on the plugin name
instead of the eve ConfNode.

3 years agoeve/syslog: remove "plugin" naming
Jason Ish [Wed, 26 May 2021 21:25:22 +0000 (15:25 -0600)] 
eve/syslog: remove "plugin" naming

3 years agoeve: register internal output file types
Jason Ish [Wed, 26 May 2021 18:46:54 +0000 (12:46 -0600)] 
eve: register internal output file types

Register known eve output file types during eve registration. This
removes the function to load internal plugins as they are not really
plugins and moves the registration of them into their respective
subsystem.

3 years agoplugins: rename SCPLuginFileType to SCEveFileType
Jason Ish [Wed, 26 May 2021 18:26:38 +0000 (12:26 -0600)] 
plugins: rename SCPLuginFileType to SCEveFileType

With internal code using the plugin API to register an Eve
filetype, the name plugin no longer makes sense. This is
part of my idea that internal plugins aren't plugins at all,
and the plugin interface should be an abstraction over
internal APIs.

Along that idea, this is the start of a refactor of the plugin
file types to be internal, where the plugin API is just an external
interface to that internal API.

3 years agooutput/syslog: Register syslog plugin
Jeff Lucovsky [Sat, 15 May 2021 17:40:32 +0000 (13:40 -0400)] 
output/syslog: Register syslog plugin

This commit completes the syslog conversion to an internal output plugin
with registration to make it available as an output file type.

3 years agooutput/plugin: Refactor eve registration function
Jeff Lucovsky [Sat, 15 May 2021 14:38:40 +0000 (10:38 -0400)] 
output/plugin: Refactor eve registration function

3 years agooutput/syslog: Refactor syslog definitions
Jeff Lucovsky [Sat, 15 May 2021 14:13:59 +0000 (10:13 -0400)] 
output/syslog: Refactor syslog definitions

3 years agooutput/syslog: Convert syslog eve output to plugin
Jeff Lucovsky [Sat, 15 May 2021 14:08:33 +0000 (10:08 -0400)] 
output/syslog: Convert syslog eve output to plugin

This commit converts the "built-in" syslog eve output handler into an
internal plugin.

3 years agooutput/json: Refactor internal routines
Jeff Lucovsky [Sat, 15 May 2021 14:02:14 +0000 (10:02 -0400)] 
output/json: Refactor internal routines

3 years agoplugin: Refactor and create registration function
Jeff Lucovsky [Sat, 15 May 2021 13:49:23 +0000 (09:49 -0400)] 
plugin: Refactor and create registration function

This commit refactors the plugin registration code and creates an API
for plugin registration

3 years agooutput/plugin: Load internal plugins
Jeff Lucovsky [Sat, 15 May 2021 13:23:54 +0000 (09:23 -0400)] 
output/plugin: Load internal plugins

This commit adds an interface for loading plugins that are internal to
Suricata. These are always loaded and are in a modified format from
external pliguns.

3 years agoplugin: Add "not set" plugin value type
Jeff Lucovsky [Thu, 18 Mar 2021 13:27:48 +0000 (09:27 -0400)] 
plugin: Add "not set" plugin value type

This value is used as a sentinel to determine if the configured
eve.json filetype was located.

First, the built-in and internal output plugins are checked. If the
sentinel value remains set, the external plugins are searched for the
filetype.

3 years agoutil/lua-common: use lua_pushnumber for SCFileInfo 6383/head
Juliana Fajardini [Thu, 16 Sep 2021 13:48:09 +0000 (14:48 +0100)] 
util/lua-common: use lua_pushnumber for SCFileInfo

3 years agodoc/lua-functions: add sha items to SCFileInfo doc
Juliana Fajardini [Tue, 14 Sep 2021 09:04:38 +0000 (10:04 +0100)] 
doc/lua-functions: add sha items to SCFileInfo doc

3 years agoutil/lua-common: fix SCFileInfo bug & doc comment
Juliana Fajardini [Tue, 14 Sep 2021 08:49:07 +0000 (09:49 +0100)] 
util/lua-common: fix SCFileInfo bug & doc comment

The callback for FileInfo was returning the wrong value, resulting
in loss of some tuple values for one calling SCFileInfo in a script.

The documentation comment wasn't mentioning the sha items that are
pushed.

3 years agoutil/lua-common: use pushinteger w/ byte & pkt cnt
Juliana Fajardini [Tue, 7 Sep 2021 09:37:19 +0000 (10:37 +0100)] 
util/lua-common: use pushinteger w/ byte & pkt cnt

LuaCallbackStatsPushToStackFromFlow tuple is composed of integer values
not all of them had been converted to lua_pushinteger yet.

3 years agoutil/lua-common: update copyright year
Juliana Fajardini [Mon, 26 Jul 2021 14:35:40 +0000 (15:35 +0100)] 
util/lua-common: update copyright year

3 years agoutil-lua-common: use lua_pushinteger w/ int values
Juliana Fajardini [Mon, 26 Jul 2021 12:24:02 +0000 (13:24 +0100)] 
util-lua-common: use lua_pushinteger w/ int values

replace lua_pushnumber with lua_pushinteger for SCFlowStats and
SCRuleIds.

3 years agolua/output: fix typo
Juliana Fajardini [Thu, 22 Jul 2021 19:58:01 +0000 (20:58 +0100)] 
lua/output: fix typo

3 years agolua: use pushinteger for int in flow/packet tuples
Juliana Fajardini [Mon, 5 Jul 2021 11:18:41 +0000 (12:18 +0100)] 
lua: use pushinteger for int in flow/packet tuples

3 years agossh: remove futile default port setting
Shivani Bhardwaj [Tue, 7 Sep 2021 00:29:04 +0000 (05:59 +0530)] 
ssh: remove futile default port setting

3 years agosmb: remove futile default port setting
Shivani Bhardwaj [Tue, 7 Sep 2021 00:28:44 +0000 (05:58 +0530)] 
smb: remove futile default port setting

3 years agorfb: remove futile default port setting
Shivani Bhardwaj [Tue, 7 Sep 2021 00:28:13 +0000 (05:58 +0530)] 
rfb: remove futile default port setting

3 years agonfs: remove futile default port setting
Shivani Bhardwaj [Tue, 7 Sep 2021 00:27:55 +0000 (05:57 +0530)] 
nfs: remove futile default port setting

3 years agoapplayer: error if probes are null but port is not
Shivani Bhardwaj [Tue, 7 Sep 2021 00:20:11 +0000 (05:50 +0530)] 
applayer: error if probes are null but port is not

If the default port is set via the Rust registration table but the probe
fns to server and to client are set to None, the port is never used.
Setting port in such a case is useless so error out.

3 years agodcerpc: use null for default ports
Shivani Bhardwaj [Fri, 25 Jun 2021 17:56:44 +0000 (23:26 +0530)] 
dcerpc: use null for default ports

3 years agodoc: remove prelude and document as removed
Jason Ish [Tue, 7 Sep 2021 20:40:36 +0000 (14:40 -0600)] 
doc: remove prelude and document as removed

3 years agoprelude: remove the prelude output
Jason Ish [Tue, 7 Sep 2021 20:37:46 +0000 (14:37 -0600)] 
prelude: remove the prelude output

It was broken in 6 and that didn't cause much issue. Just remove
it for 7.

3 years agodoc/upgrade: move ike logging changes to 7.0 changes
Jason Ish [Mon, 13 Sep 2021 20:28:49 +0000 (14:28 -0600)] 
doc/upgrade: move ike logging changes to 7.0 changes

Was mistakenly put in 6.0 changes.

3 years agodoc/upgrade: mention that nss is no longer required
Jason Ish [Mon, 13 Sep 2021 20:27:45 +0000 (14:27 -0600)] 
doc/upgrade: mention that nss is no longer required

3 years agoci: use quiet option w suricata-verify
Shivani Bhardwaj [Fri, 17 Sep 2021 06:54:13 +0000 (12:24 +0530)] 
ci: use quiet option w suricata-verify

3 years agodetect/prefilter: bail early if possible
Victor Julien [Wed, 15 Sep 2021 17:49:32 +0000 (19:49 +0200)] 
detect/prefilter: bail early if possible

3 years agodetect/prefilter: update tx_min_progress to uint8_t
Victor Julien [Wed, 15 Sep 2021 14:58:17 +0000 (16:58 +0200)] 
detect/prefilter: update tx_min_progress to uint8_t

Now that our make progress value is 47, we don't need an int.

3 years agodetect: enforce max app-layer progress
Victor Julien [Wed, 15 Sep 2021 14:54:43 +0000 (16:54 +0200)] 
detect: enforce max app-layer progress

Allow progress values in the range 0-47 so we have 48 bits to track
prefilter engines.

Mark bits 48-62 as reserved explicitly.

Add debug validation checks to make sure the reserved space isn't used.

3 years agodetect: track prefilter by progress, not engine
Victor Julien [Tue, 14 Sep 2021 08:35:18 +0000 (10:35 +0200)] 
detect: track prefilter by progress, not engine

Fix FNs in case of too many prefilter engines. A transaction was tracking
which engines have run using a u64 bit array. The engines 'local_id' was
used to set and check this bit. However the bit checking code didn't
handle int types correctly, leading to an incorrect left shift result of
a u32 to a u64 bit value.

This commit addresses that by fixing the int handling, but also by
changing how the engines are tracked.

To avoid wasting prefilter engine tracking bit space, track what
ran by the progress they are registered at, instead of the individual
engine id's. While we can have many engines, the protocols use far
fewer unique progress values. So instead of tracking for dozens of
prefilter id's, we track for the handful of progress values.

To allow for this the engine array is sorted by tx_min_progress, then
app_proto and finally local_id. A new field is added to "know" when
the last relevant engine for a progress value is reached, so that we
can set the prefilter bit then.

A consquence is that the progress values have a ceiling now that
needs to fit in a 64 bit bitarray. The values used by parsers currently
does not exceed 5, so that seems to be ok.

Bug: #4685.

3 years agoflow: log action applied to all packets
Victor Julien [Fri, 10 Sep 2021 12:07:49 +0000 (14:07 +0200)] 
flow: log action applied to all packets

Log if action applied to whole flow is drop or pass.

3 years agotests: fix drop test; cleanup
Victor Julien [Fri, 10 Sep 2021 11:43:26 +0000 (13:43 +0200)] 
tests: fix drop test; cleanup

SigTestDropFlow04 was incorrectly expecting an alert in the packet
following a "drop" packet. The first drop is applied to the flow, so
it should lead to the 2nd packet being dropped before inspection is
run.

Clean up the test as well.

3 years agodetect/tests: improve detection entry
Victor Julien [Fri, 10 Sep 2021 11:42:15 +0000 (13:42 +0200)] 
detect/tests: improve detection entry

Lots of tests still use SigMatchSignatures as their main detection
entry function, which bypassed some logic. Make it match main logic
more closely.

3 years agotests: clean up drop test
Victor Julien [Fri, 10 Sep 2021 11:03:26 +0000 (13:03 +0200)] 
tests: clean up drop test

3 years agodetect: enforce flow drops earlier
Victor Julien [Fri, 10 Sep 2021 10:35:13 +0000 (12:35 +0200)] 
detect: enforce flow drops earlier

Enforcing flow drops is now done earlier in the detection engine and
moved out of the IP-only engine where it didn't belong.

3 years agodetect: unify alert handling; fix bugs
Victor Julien [Fri, 3 Sep 2021 15:04:02 +0000 (17:04 +0200)] 
detect: unify alert handling; fix bugs

Unify handling of signature matches between various rule types and
between noalert and regular rules.

"noalert" sigs are added to the alert queue initially, but removed
from it after handling their actions. This way all actions are applied
from a single place.

Make sure flow drop and pass are mutually exclusive.

The above addresses issue with pass and drops not getting applied
correctly in various cases.

Bug: #4663
Bug: #4670

3 years agodetect: remove dead code
Victor Julien [Fri, 10 Sep 2021 08:19:50 +0000 (10:19 +0200)] 
detect: remove dead code

3 years agodetect/lua: use BIT_U32 for flags
Victor Julien [Tue, 14 Sep 2021 09:46:58 +0000 (11:46 +0200)] 
detect/lua: use BIT_U32 for flags

3 years agodetect/lua: minor cleanup
Victor Julien [Tue, 14 Sep 2021 09:46:28 +0000 (11:46 +0200)] 
detect/lua: minor cleanup

3 years agooutput/tx: check flags using BIT_U32
Victor Julien [Tue, 14 Sep 2021 09:39:26 +0000 (11:39 +0200)] 
output/tx: check flags using BIT_U32

3 years agopacket: use BIT_U32 for flags
Victor Julien [Tue, 14 Sep 2021 09:25:58 +0000 (11:25 +0200)] 
packet: use BIT_U32 for flags

3 years agodetect/mpm: micro optimization for initialization
Victor Julien [Tue, 14 Sep 2021 08:20:58 +0000 (10:20 +0200)] 
detect/mpm: micro optimization for initialization

Do less expensive check first.

3 years agodetect: remove ticker 6371/head
Victor Julien [Sat, 11 Sep 2021 07:50:36 +0000 (09:50 +0200)] 
detect: remove ticker

Last consumer of it has been converted.

3 years agodetect/http: clean up header buffer logic
Victor Julien [Sat, 11 Sep 2021 07:47:31 +0000 (09:47 +0200)] 
detect/http: clean up header buffer logic

Simplify and clean up header buffer management. The code was designed
to track buffers for several transactions in parallel, from when the
detection engine wasn't aware of transactions.

For http.start and http.header_names use generic mpm and inspect
functions.

3 years agoipv6: decoder event on invalid length 6336/head
Philippe Antoine [Mon, 19 Jul 2021 15:31:32 +0000 (17:31 +0200)] 
ipv6: decoder event on invalid length

From RFC 2460, section 4.5,
each fragment, except the last one, must have a length
which is a multiple of 8

3 years agohttp2: better rust style
Philippe Antoine [Fri, 4 Jun 2021 13:18:32 +0000 (15:18 +0200)] 
http2: better rust style

3 years agohttp2: concatenate one headers multiple values
Philippe Antoine [Mon, 31 May 2021 14:17:22 +0000 (16:17 +0200)] 
http2: concatenate one headers multiple values

For detection, as is done with HTTP1

3 years agohttp2: generic http2_header_blocks
Philippe Antoine [Mon, 31 May 2021 09:40:42 +0000 (11:40 +0200)] 
http2: generic http2_header_blocks

so as not to forget continuation and push promise
when iterating over headers

3 years agohttp2: http.header keyword now works for HTTP2
Philippe Antoine [Mon, 31 May 2021 08:50:38 +0000 (10:50 +0200)] 
http2: http.header keyword now works for HTTP2

As well as http.header.raw

3 years agohttp2: http.header_names keyword now works for HTTP2
Philippe Antoine [Mon, 31 May 2021 08:11:27 +0000 (10:11 +0200)] 
http2: http.header_names keyword now works for HTTP2

3 years agohttp2: http.host normalized keyword now works for HTTP2
Philippe Antoine [Wed, 26 May 2021 19:45:30 +0000 (21:45 +0200)] 
http2: http.host normalized keyword now works for HTTP2

3 years agohttp2: turn Host header into authority during upgrade
Philippe Antoine [Wed, 26 May 2021 18:54:01 +0000 (20:54 +0200)] 
http2: turn Host header into authority during upgrade

HTTP1 uses Host, but HTTP2 uses rather :authority cf HPACK

3 years agohttp2: better file tracking 6332/head
Philippe Antoine [Thu, 2 Sep 2021 14:31:20 +0000 (16:31 +0200)] 
http2: better file tracking

If an HTTP2 file was within only ont DATA frame, the filetracker
would open it and close it in the same call, preventing the
firther call to incr_files_opened

Also includes rustfmt again for all HTTP2 files

3 years agohttp2: support deflate decompression
Philippe Antoine [Mon, 5 Jul 2021 09:18:26 +0000 (11:18 +0200)] 
http2: support deflate decompression

cf #4556

3 years agoftp: support per-tx file accounting 6324/head
Victor Julien [Thu, 18 Mar 2021 12:47:26 +0000 (13:47 +0100)] 
ftp: support per-tx file accounting

3 years agosmtp: support per-tx file accounting
Victor Julien [Thu, 18 Mar 2021 07:38:03 +0000 (08:38 +0100)] 
smtp: support per-tx file accounting

3 years agosmb: add debug validation on file counts
Victor Julien [Thu, 18 Mar 2021 12:06:22 +0000 (13:06 +0100)] 
smb: add debug validation on file counts

3 years agosmb: count files in tx
Victor Julien [Thu, 18 Mar 2021 07:37:08 +0000 (08:37 +0100)] 
smb: count files in tx

3 years agohttp2: support per-tx file accounting
Victor Julien [Thu, 18 Mar 2021 07:36:22 +0000 (08:36 +0100)] 
http2: support per-tx file accounting

3 years agonfs: add debug validation on file counts
Victor Julien [Thu, 18 Mar 2021 12:06:34 +0000 (13:06 +0100)] 
nfs: add debug validation on file counts

3 years agonfs: support per-tx file accounting
Victor Julien [Thu, 18 Mar 2021 10:09:01 +0000 (11:09 +0100)] 
nfs: support per-tx file accounting

3 years agonfs: don't reuse file transactions
Victor Julien [Thu, 18 Mar 2021 10:05:35 +0000 (11:05 +0100)] 
nfs: don't reuse file transactions

After a file has been closed (CLOSE, COMMIT command or EOF/SYNC part of
READ/WRITE data block) mark it as such so that new file commands on that
file do not reuse the transaction.

When a file transfer is completed it will be flagged as such and not be
found anymore by the NFSState::get_file_tx_by_handle() method. This forces
a new transaction to be created.

3 years agohttp: support per-tx file accounting
Victor Julien [Thu, 18 Mar 2021 09:57:48 +0000 (10:57 +0100)] 
http: support per-tx file accounting

3 years agofilestore: track files getting stored per tx
Victor Julien [Tue, 23 Mar 2021 10:08:33 +0000 (11:08 +0100)] 
filestore: track files getting stored per tx

Avoid evicting a tx before the filedata logger has decided it is
done.

3 years agofilestore: store chunks in packet direction
Victor Julien [Thu, 18 Mar 2021 13:38:33 +0000 (14:38 +0100)] 
filestore: store chunks in packet direction

Storing too early can lead to files being considered TRUNCATED if the
TCP state is not yet CLOSED when logging is triggered. This has been
observed with FTP-DATA and might also be an issue with simple HTTP.

3 years agoapp-layer/transactions: track files opens and logs
Victor Julien [Thu, 18 Mar 2021 09:55:50 +0000 (10:55 +0100)] 
app-layer/transactions: track files opens and logs

To make sure a transaction is not evicted before all file logging is complete.

3 years agoeve/files: log in packet direction only
Victor Julien [Thu, 18 Mar 2021 09:52:44 +0000 (10:52 +0100)] 
eve/files: log in packet direction only

Bug: #3703.

Don't log files too soon.

3 years agoGRE: Handling pptp without payload
Vladimir Ivchenko [Thu, 10 Dec 2020 15:05:15 +0000 (20:05 +0500)] 
GRE: Handling pptp without payload

If one of the ppp peers sends a packet with an acknowledge flag,
the ppp payload will be empty and DecodePPP will return TM_ECODE_FAILED.
To handle this case, the packet_length field in the GRE extended header (https://tools.ietf.org/html/rfc2637#section-4.1) is used.
DecodeGRE no longer tries to parse PPP payload if packet_length is zero.

3 years agoscripts: bundle script for requirements
Jason Ish [Thu, 29 Oct 2020 23:05:01 +0000 (17:05 -0600)] 
scripts: bundle script for requirements

Add a bundle.sh script to bundle the requirements of libhtp
and suricata-update. This uses a Python like requirements.txt
file to specify the URL to download for libhtp and suricata-update.

3 years agodoc: Update public-data-sets.rst
Lukas Sismis [Tue, 27 Oct 2020 10:21:06 +0000 (11:21 +0100)] 
doc: Update public-data-sets.rst

Replace dead link

Dataset on ll.mit.edu returns 404. Link updated with a search result of more datasets.

3 years agodetect-dsize: Add ! operator for dsize matching
Joshua Lumb [Tue, 9 Jun 2020 16:12:26 +0000 (12:12 -0400)] 
detect-dsize: Add ! operator for dsize matching