]>
git.ipfire.org Git - thirdparty/suricata.git/log
Victor Julien [Mon, 21 Sep 2020 19:44:36 +0000 (21:44 +0200)]
app-layer: improve depth handling
Consider txs inspected and done for a direction after depth is reached for
that direction.
Victor Julien [Mon, 21 Sep 2020 07:12:55 +0000 (09:12 +0200)]
stream: make sure to call app-layer in case of depth reached
Victor Julien [Sat, 19 Sep 2020 18:57:35 +0000 (20:57 +0200)]
dcerpc: implement tx free function
Victor Julien [Sat, 19 Sep 2020 18:44:40 +0000 (20:44 +0200)]
dcerpc/tcp: implement trunc logic
When one side of the connection reaches the STREAM_DEPTH condition the
parser should be aware of this. Otherwise transactions will forever be
waiting for data in that direction.
Victor Julien [Sat, 19 Sep 2020 18:25:05 +0000 (20:25 +0200)]
applayer/rust: expose truncate callback
Victor Julien [Sat, 19 Sep 2020 13:50:47 +0000 (15:50 +0200)]
app-layer: don't check tx detect flags if detect is disabled
Victor Julien [Wed, 23 Sep 2020 11:52:29 +0000 (13:52 +0200)]
stream: remove GAP flag from stream
This flag was checked in many places, but never set expect in 2 unittests.
Jeff Lucovsky [Wed, 16 Sep 2020 12:11:10 +0000 (08:11 -0400)]
log/eve: Rename fileinfo alert object to files
This commit changes the name of the "fileinfo" array in the alert object
to "files" to better support legacy use of "fileinfo" in reporting and
elsewhere.
The "fileinfo" event type is not an array while the alert "fileinfo"
member was.
Jason Ish [Tue, 15 Sep 2020 15:27:36 +0000 (09:27 -0600)]
doc/userguide: include man page even when not including pdf
Fix a mistake in Makefile.am where the man page was only being
added to the distribution if the PDF was also created. It should
be included even if the PDF cannot be included.
Shivani Bhardwaj [Thu, 24 Sep 2020 05:22:01 +0000 (10:52 +0530)]
dcerpc: fix datatypes while handling stub data
Shivani Bhardwaj [Thu, 24 Sep 2020 14:42:09 +0000 (20:12 +0530)]
dcerpc: fix datatype for stub data len
Philippe Antoine [Wed, 9 Sep 2020 14:05:56 +0000 (16:05 +0200)]
rust: rebuilds std when building fuzzers
so as to have MSAN working
Victor Julien [Fri, 7 Aug 2020 14:42:22 +0000 (16:42 +0200)]
version: continue 6 development
Victor Julien [Thu, 10 Sep 2020 19:42:35 +0000 (21:42 +0200)]
version: update to 6.0.0-rc1
Victor Julien [Thu, 10 Sep 2020 19:42:00 +0000 (21:42 +0200)]
changelog: update for 6.0.0-rc1
Philippe Antoine [Fri, 11 Sep 2020 07:44:25 +0000 (09:44 +0200)]
dceprc: signature rust check with is_char_boundary
before calling split_at which would panic
Shivani Bhardwaj [Fri, 11 Sep 2020 06:28:28 +0000 (11:58 +0530)]
datasets: use default memcap
Philippe Antoine [Wed, 9 Sep 2020 13:54:36 +0000 (15:54 +0200)]
detect: initialize pointer before calling pcre_study
So as not to check an uninitialized value
Found by MSAN
Victor Julien [Thu, 10 Sep 2020 19:52:44 +0000 (21:52 +0200)]
datasets: remove experimental warning
Shivani Bhardwaj [Thu, 10 Sep 2020 12:22:18 +0000 (17:52 +0530)]
doc/datasets: add info about memcap and hashsize
Shivani Bhardwaj [Thu, 10 Sep 2020 08:34:16 +0000 (14:04 +0530)]
datasets: parse defaults section from yaml
Datasets can now have a global defaults setting in suricata.yaml. In
case the settings for memcap and hashsize are not find in the yaml or
rule, this shall be the fallback.
Example:
datasets:
defaults:
memcap: 100mb
hashsize: 2048
ua-seen:
type: string
load: datasets.csv
Shivani Bhardwaj [Thu, 10 Sep 2020 11:45:00 +0000 (17:15 +0530)]
datasets: allow memcap, hashsize be set via yaml or rule
It is now possible to set the memcap and hashsize via suricata.yaml and
rules.
Rule example:
alert http any any -> any any (http.user_agent; dataset:isset,ua-seen,type string,load datasets.csv,memcap 100mb,hashsize 2048; sid:1;)
suricata.yaml example:
datasets:
ua-seen:
type: string
load: datasets.csv
memcap: 20mb
hashsize: 2048
Shivani Bhardwaj [Thu, 10 Sep 2020 11:34:21 +0000 (17:04 +0530)]
datasets: allow max possible memcap while loading
While using the "load" option of datasets, it should be possible to load
any file from the disk, so set the limit to highest possible.
Jason Ish [Thu, 3 Sep 2020 19:29:57 +0000 (13:29 -0600)]
rules/tls: sync with changes to the TLS events
Sync rules with event changes in commit
01aef49cbd32fb2437d1615a2111111e5f3ee862 .
Jeff Lucovsky [Wed, 9 Sep 2020 12:59:32 +0000 (08:59 -0400)]
log/eve: Ensure eve logs have sequential suffixes
This commit ensures that the eve logs have sequential suffixes without
gaps.
Jeff Lucovsky [Thu, 10 Sep 2020 11:47:46 +0000 (07:47 -0400)]
atomics: Add "decl and init with value" function
This commit adds an interface to declare and initialize an atomic with a
specific value. This can help with situations where there's no defined
initialization path to set things up.
Jeff Lucovsky [Tue, 8 Sep 2020 12:26:36 +0000 (08:26 -0400)]
log: Ensure threaded eve honors SIGHUP
This commit ensures that all logging contexts register for the file
rotation mechanism (SIGHUP and configured).
Jason Ish [Tue, 8 Sep 2020 20:01:02 +0000 (14:01 -0600)]
doc: document removal of unified2
And suggest an alternate tool, Meer if compatibility with
Barnyard2 style databases is required.
Redmine ticket:
https://redmine.openinfosecfoundation.org/issues/3497
Jason Ish [Tue, 8 Sep 2020 19:29:11 +0000 (13:29 -0600)]
doc: add removal of individual json loggers
Add link to multiple eve instances as a replacement for this
feature.
Philippe Antoine [Fri, 4 Sep 2020 07:39:44 +0000 (09:39 +0200)]
http: disables lzma by default for HTTP
Philippe Antoine [Thu, 3 Sep 2020 12:22:29 +0000 (14:22 +0200)]
http2: settings from http1 upgrade
Philippe Antoine [Fri, 4 Sep 2020 14:06:16 +0000 (16:06 +0200)]
http2: mimic HTTP1 request from upgrade
Philippe Antoine [Thu, 3 Sep 2020 12:19:28 +0000 (14:19 +0200)]
http2: first connection upgrade from http1
Philippe Antoine [Sat, 5 Sep 2020 09:43:53 +0000 (11:43 +0200)]
dnp3: fix unit tests when fuzzing
Philippe Antoine [Tue, 8 Sep 2020 07:23:24 +0000 (09:23 +0200)]
applayer: keep running detection on protocol change
ie do not stop on first try if we do not have enough data
Philippe Antoine [Wed, 9 Sep 2020 08:09:33 +0000 (10:09 +0200)]
applayer: on protocol change, use previous state
Philippe Antoine [Wed, 9 Sep 2020 08:08:50 +0000 (10:08 +0200)]
http: removal of connect unit tests
moved to suricata-verify
Philippe Antoine [Fri, 4 Sep 2020 13:29:41 +0000 (15:29 +0200)]
applayer: pass parameter to StateAlloc
This parameter is NULL or the pointer to the previous state
for the previous protocol in the case of a protocol change,
for instance from HTTP1 to HTTP2
This way, the new protocol can use the old protocol context.
For instance, HTTP2 mimicks the HTTP1 request, to have a HTTP2
transaction with both request and response
Sascha Steinbiss [Wed, 9 Sep 2020 07:51:56 +0000 (09:51 +0200)]
mqtt: add some extra tests for varint parsing
Philippe Antoine [Wed, 9 Sep 2020 07:27:00 +0000 (09:27 +0200)]
http2: handles incomplete frames after banner
To signal incomplete data, we must return the number of
consumed bytes. When we get a banner and some records, we have
to take into account the number of bytes already consumed by
the banner parsing before reaching an incomplete record.
Philippe Antoine [Tue, 8 Sep 2020 19:13:07 +0000 (21:13 +0200)]
mqtt: limit size of variable integer
Jason Ish [Tue, 8 Sep 2020 16:54:20 +0000 (10:54 -0600)]
datasets: fix dataset load path construction
Test the full path instead of just the filename provided in the
rule to see if it exists.
Fixes the case where a rule file is loaded from a directory
other than the default-rule-directory.
Redmine issue:
https://redmine.openinfosecfoundation.org/issues/3916
Philippe Antoine [Tue, 8 Sep 2020 14:23:29 +0000 (16:23 +0200)]
http2: returns error in case of index 0
As is documented in RFC 7541, section 6.1
The index value of 0 is not used. It MUST be treated as a decoding
error if found in an indexed header field representation.
Philippe Antoine [Tue, 8 Sep 2020 11:33:34 +0000 (13:33 +0200)]
signature: frees transform options in SigMatchPrepare
Philippe Antoine [Thu, 27 Aug 2020 15:11:10 +0000 (17:11 +0200)]
detect: checks for overflow when comparing signatures priorities
Victor Julien [Tue, 8 Sep 2020 08:41:29 +0000 (10:41 +0200)]
flow: suppress Coverity FP
Victor Julien [Tue, 8 Sep 2020 08:40:06 +0000 (10:40 +0200)]
flow: minor code cleanup
Victor Julien [Tue, 8 Sep 2020 08:29:23 +0000 (10:29 +0200)]
flow: turn BUG_ON into debug check
Eric Leblond [Sat, 5 Sep 2020 20:57:23 +0000 (22:57 +0200)]
ebpf: fix invalid description in doc string
Victor Julien [Mon, 7 Sep 2020 18:04:02 +0000 (20:04 +0200)]
doc/datasets: explain reloads, general improvements
Victor Julien [Mon, 7 Sep 2020 14:46:39 +0000 (16:46 +0200)]
detect/app-layer-events: improve warnings/errors
Improve handling of outdated events that are no longer supported by the engine.
Eric Leblond [Sun, 6 Sep 2020 18:27:04 +0000 (20:27 +0200)]
prscript: port to python 3
Victor Julien [Mon, 7 Sep 2020 10:57:59 +0000 (12:57 +0200)]
flow/bypass: don't bypass on flow timeout pseudo packets
Jason Ish [Fri, 4 Sep 2020 16:45:52 +0000 (10:45 -0600)]
rule parsing: valid that input rule string is UTF8
Before parsing a rule string, validate that it is UTF-8 first.
Related Redmine issue:
https://redmine.openinfosecfoundation.org/issues/3850
Jason Ish [Fri, 4 Sep 2020 16:44:27 +0000 (10:44 -0600)]
rust/util: expose function to test strings for valid UTF-8
rs_check_utf8 will check that the provided string is valid
UTF-8 by converting it to a Rust string and returning true
or false.
Jason Ish [Fri, 4 Sep 2020 15:04:34 +0000 (09:04 -0600)]
http/eve: use set_string_from_bytes where appropriate
The JsonBuilder set_string_from_bytes will escape unprintable
characters in the output stream. Using BytesToStringBuffer
can generate invalid UTF-8 which prevents the conversion from
a C string to a Rust string.
Victor Julien [Mon, 7 Sep 2020 09:38:11 +0000 (11:38 +0200)]
detect/dataset: error if set couldn't be fully loaded
Victor Julien [Mon, 7 Sep 2020 08:25:37 +0000 (10:25 +0200)]
datasets: free old data when reusing a hash container
Jeff Lucovsky [Tue, 11 Aug 2020 12:17:12 +0000 (08:17 -0400)]
log: Log errors while writing log info
This commit adds logic to log errors during output. Errors are logged
once and the number of errors is maintained.
Jeff Lucovsky [Tue, 11 Aug 2020 12:16:52 +0000 (08:16 -0400)]
log: Add log output error code
Jeff Lucovsky [Fri, 7 Aug 2020 12:34:20 +0000 (08:34 -0400)]
log: Use unlocked variants of stdio functions
This commit uses the unlocked variants of additional stdio functions
Jeff Lucovsky [Tue, 11 Aug 2020 12:15:52 +0000 (08:15 -0400)]
log: Add more stdio_unlocked macros
This commit adds additional macros for interfaces in stdio_unlocked
according to their local availability.
Victor Julien [Mon, 7 Sep 2020 05:09:05 +0000 (07:09 +0200)]
error: reformat enum
Victor Julien [Fri, 4 Sep 2020 13:38:58 +0000 (15:38 +0200)]
app-layer: handle parser return code issues more gracefully
Victor Julien [Fri, 4 Sep 2020 08:52:04 +0000 (10:52 +0200)]
pcap: fix minor scan-build warnings
Victor Julien [Fri, 4 Sep 2020 08:46:59 +0000 (10:46 +0200)]
commandline: add static analyzer hint for -r parsing
Victor Julien [Fri, 4 Sep 2020 08:44:54 +0000 (10:44 +0200)]
commandline: minor formatting fixes
Jeff Lucovsky [Thu, 6 Aug 2020 12:34:45 +0000 (08:34 -0400)]
general: Improve grammar in error messages
This commit corrects a minor grammar issue in address/port error
messages.
Victor Julien [Fri, 4 Sep 2020 08:11:40 +0000 (10:11 +0200)]
decode/geneve: add config to yaml
Jason Ish [Wed, 2 Sep 2020 17:53:20 +0000 (11:53 -0600)]
github-ci: apply default CFLAGS to all builds
Jason Ish [Tue, 1 Sep 2020 21:37:54 +0000 (15:37 -0600)]
github-ci: add test build without jansson
This is to cover a test from Travis CI where we make sure
that ./configure fails if libjansson is not available.
Jason Ish [Tue, 1 Sep 2020 21:32:38 +0000 (15:32 -0600)]
github-ci: update debian 9 test to use known Rust version
Choose Rust 1.39.0 as a known version of Rust that we build against
to see in CI if we build with this version, but fail with latest.
This is to cover a similar test from Travis CI.
Jason Ish [Tue, 1 Sep 2020 21:23:03 +0000 (15:23 -0600)]
github-ci: enable debug on Fedora 32 build
Jason Ish [Wed, 19 Aug 2020 18:17:00 +0000 (12:17 -0600)]
github-ci: check that configure fails if rust to old
Migration of similar test from Travis-CI.
Redmine issue:
https://redmine.openinfosecfoundation.org/issues/3869
Jason Ish [Wed, 19 Aug 2020 15:28:07 +0000 (09:28 -0600)]
github-ci: Ubuntu 20.4 build with -NDEBUG
To cover Travis-CI test that builds with -NDEBUG.
Redmine issue:
https://redmine.openinfosecfoundation.org/issues/3869
Jason Ish [Mon, 17 Aug 2020 22:51:38 +0000 (16:51 -0600)]
github-ci: ubuntu 20.04 build without nss/nspr
Adds a test that builds and tests Suricata without nss/nspr
to replace the similar test on Travis-CI.
Redmine issue:
https://redmine.openinfosecfoundation.org/issues/3869
Jason Ish [Wed, 12 Aug 2020 15:06:23 +0000 (09:06 -0600)]
github-ci: Fedora 32 builder with asan enabled
Also enables -Wshadow and rust-strict to cover those cases
from Travis.
Redmine issue:
https://redmine.openinfosecfoundation.org/issues/3868
Ali Jad Khalil [Sat, 2 May 2020 21:04:07 +0000 (21:04 +0000)]
decode/teredo: Modified/refactored Teredo logic
This is just a slight refactor to make analagous decoding/encapsulation
schemes - Geneve, Teredo, and VXLAN - be implemented as similarly as
possible.
Ali Jad Khalil [Sat, 2 May 2020 21:01:58 +0000 (21:01 +0000)]
decode/vxlan: Modified/refactored VXLAN logic
This is just a slight refactor to make analagous decoding/encapsulation
schemes - Geneve, Teredo, and VXLAN - be implemented as similarly as
possible.
Ali Jad Khalil [Wed, 29 Apr 2020 07:36:18 +0000 (07:36 +0000)]
decode/geneve: Add Geneve decoding functionality
These changes are in response to feature request 3063. Geneve is
very similar to VXLAN, but uses a slightly different encapsulation
scheme.
Simon Dugas [Thu, 23 Apr 2020 18:29:23 +0000 (18:29 +0000)]
doc: dns - document additional fields in eve event
Documentation of additional fields for soa and sshfp. Also some minor
doc fixes and updates.
Simon Dugas [Fri, 24 Apr 2020 17:57:20 +0000 (17:57 +0000)]
dns: parse and log fields for SOA record type
Added `dns_parse_rdata_soa` to parse SOA fields into an `DNSRDataSOA`
struct.
Added logging for answer and authority SOA records in both version
1 & 2, as well as grouped formats.
Simon Dugas [Fri, 24 Apr 2020 18:03:23 +0000 (18:03 +0000)]
dns: use nom's rest to take all remaining rdata
Using nom's `rest` combinator eliminates the need to call the do_parse
macro for parsing a single element.
Simon Dugas [Wed, 15 Apr 2020 15:20:22 +0000 (15:20 +0000)]
dns: refactor to handle more rdata formats
Represent rdata as `DNSRData` enum variants instead of `Vec<u8>`.
This will allow parsing/logging of more complex formats like SOA.
Victor Julien [Fri, 4 Sep 2020 10:57:54 +0000 (12:57 +0200)]
decode: reformat event table
Jeff Lucovsky [Sun, 23 Aug 2020 23:42:21 +0000 (19:42 -0400)]
doc: Improve grammar, spelling and clarifications
This commit improves the overall documentation's grammar, spelling, and
adds clarifications where needed.
Jason Ish [Tue, 25 Aug 2020 19:52:00 +0000 (13:52 -0600)]
plugins: require registration function SCPluginRegister
Instead of looking for a symbol, "PluginSpec" look for a function
named SCPluginRegister that returns a SCPlugin.
This makes it much easier to create Rust plugins without having
to deal with dlopen constructors and such, which is rather
straight forward in C, but a bit of advanced boilerplate in Rust
that can be eliminated by simply calling a registration function.
Jason Ish [Tue, 25 Aug 2020 19:17:55 +0000 (13:17 -0600)]
rust/log: minor cleanup
Group functions for setting and getting the log level
together.
Jason Ish [Tue, 25 Aug 2020 19:15:21 +0000 (13:15 -0600)]
rust: function macro now returns the function name
Borrow a macro from https://github.com/popzxc/stdext-rs that
will give us the Rust function name in SCLog messages in Rust.
As this trick only works on Rust 1.38 and newer, keep the old
macro around and set a feature based on a Rust version test
done during ./configure.
Jason Ish [Tue, 25 Aug 2020 18:51:26 +0000 (12:51 -0600)]
rust: plugin bootstrap function
Functions written in Rust will need to suricata::plugin::init()
to bootstrap themselves. This bootstrap process sets the log level
within the Rust address space, and hooks up function pointers
that are expected to be set during normal runs of Suricata.
Jason Ish [Tue, 25 Aug 2020 18:50:31 +0000 (12:50 -0600)]
rust/log: set the log level with a pure Rust function
Make sure the log level is setup with a pure Rust function, so
when it is set, its set within the address space of the caller.
This is important for Rust plugins where the Rust modules are not
in the address space of the Suricata main process.
Jason Ish [Tue, 25 Aug 2020 16:12:04 +0000 (10:12 -0600)]
suricata: expose the SuricataContext with a function
Expose the "SuricataContext" required by Rust as a function. During
normal startup we register this context with the Rust code, but
plugins written in Rust will need to get the same registration
done, but to do this in a plugin, the plugin code must
call and set the context within its address space.
Jason Ish [Tue, 25 Aug 2020 18:47:10 +0000 (12:47 -0600)]
logging: expose the log level with a function
The log level needs to exposed so Rust plugins can bootstrap
themselves with the correct login to SCLogNotice!(), etc work
as expected.
Jason Ish [Mon, 17 Aug 2020 16:36:19 +0000 (10:36 -0600)]
rust/logging: allow log macros to be used by plugins
Fix plugin macros so they can be used by external Rust crates
such as plugins.
Jason Ish [Mon, 17 Aug 2020 16:32:05 +0000 (10:32 -0600)]
rust/Cargo: build as rlib for plugin linkage
Build Rust code as an rlib, in addition to a staticlib so plugins
can link with the Rust code.
Jason Ish [Tue, 25 Aug 2020 16:10:03 +0000 (10:10 -0600)]
rust-context: remove unused opaque type Store
Joshua Lumb [Thu, 13 Aug 2020 13:43:05 +0000 (09:43 -0400)]
runmodes: memory leak on runmode single
Jason Ish [Tue, 1 Sep 2020 15:49:46 +0000 (09:49 -0600)]
configure: fix test for rust headers for cross compile
Use "if test ..." instead of AC_CHECK_FILES which does not work
when cross compiling.
Jeff Lucovsky [Sat, 29 Aug 2020 14:59:49 +0000 (10:59 -0400)]
config/lua: Cross-compiling support
This commit guards the run-time check for a Lua integer so that it no
longer attempts execution in a cross-compilation environment.
Jeff Lucovsky [Sat, 29 Aug 2020 14:58:54 +0000 (10:58 -0400)]
config/pcre: Improved support for cross-compiling
This commit changes the logic used to determine if pcre_jit_exec is
available from a run-time to a compile-time check.