]>
git.ipfire.org Git - thirdparty/suricata.git/log
Jason Ish [Thu, 15 Apr 2021 20:59:28 +0000 (14:59 -0600)]
eve: refactor OutputJsonBuilderBuffer to take context
All callers of OutputJsonBuilderBuffer are now calling it
using fields from an OutputJsonThreadCtx, so just pass
a pointer to the thread context now.
Jason Ish [Thu, 15 Apr 2021 07:36:25 +0000 (01:36 -0600)]
eve: convert many loggers to use generate thread context
- mqtt
- dnp3
- smtp
- ike
- dns
- alert
- tls
- anomaly
- drop
- file
- http
- http2
- templates
- dhcp
The idea is to factor out the commom code for setting
up the output file objects, which is repetitive, and
often done wrong when it comes to threading.
Jason Ish [Thu, 15 Apr 2021 07:35:45 +0000 (01:35 -0600)]
eve: reset buffer in OutputJsonBuilderBuffer
Reset the buffer here so each caller doesn't need to do it.
Jason Ish [Thu, 15 Apr 2021 07:33:43 +0000 (01:33 -0600)]
eve: factor thread context creation/free for reuse
Jason Ish [Thu, 15 Apr 2021 01:46:20 +0000 (19:46 -0600)]
eve: remove duplicate call to LogFileEnsureExists
Remove duplicate call to LogFileEnsureExists in the generic
eve thread init function.
Eric Leblond [Sun, 11 Apr 2021 19:27:15 +0000 (21:27 +0200)]
github-ci: add ebpf build
Use Debian 10 to build eBPF.
Eric Leblond [Thu, 11 Feb 2021 22:32:38 +0000 (23:32 +0100)]
util/ebpf: fix deprecation warning
The function bpf_program__title has been deprecated in favor of
bpf_program__section_name.
Eric Leblond [Fri, 9 Apr 2021 15:03:44 +0000 (17:03 +0200)]
ebpf: fix gre encapsulation in xdp_lb
The xdp_lb was not handling correctly the GRE load balancing
and it was not supporting the GRE + ERSPAN that is used by
some aggregator devices.
Juliana Fajardini [Wed, 14 Apr 2021 22:22:54 +0000 (23:22 +0100)]
ippair/bit: fix formatting
Juliana Fajardini [Wed, 14 Apr 2021 13:15:59 +0000 (14:15 +0100)]
ebpf/util: change flow storage to new 'id' type
Juliana Fajardini [Wed, 14 Apr 2021 22:16:07 +0000 (23:16 +0100)]
device/storage: use dedicated 'id' type
- Wrap the id in a new LiveDevStorageId struct, to avoid id
confusion with other storage API calls.
- Formatting fixes by clang.
Juliana Fajardini [Wed, 14 Apr 2021 22:14:41 +0000 (23:14 +0100)]
detect/engine-tag: fix typo
Juliana Fajardini [Wed, 14 Apr 2021 22:12:28 +0000 (23:12 +0100)]
host/storage: use dedicated 'id' type
- Wrap the id in a HostStorageId struct to avoid id confusion
with other storage API calls.
- Fix formatting with clang script.
Juliana Fajardini [Wed, 14 Apr 2021 22:09:02 +0000 (23:09 +0100)]
ippair/storage: use dedicated 'id' type
- Wrap the id in a new IPPairStorageId struct, to avoid id
confusion with other storage API calls.
- Formatting fixes by clang.
Jeff Lucovsky [Mon, 12 Apr 2021 13:12:23 +0000 (09:12 -0400)]
output/log: Removed pcie (Tilera) log vestiges
This commit removes the last remnants of the Tilera log output mechanism
(unsupported since 5.0.x).
Jeff Lucovsky [Sun, 11 Apr 2021 16:20:15 +0000 (12:20 -0400)]
output/log: Ensure files closed in threaded mode
This commit ensures that file objects are closed in threaded mode.
Victor Julien [Fri, 9 Apr 2021 10:56:01 +0000 (12:56 +0200)]
flow/storage: use dedicated 'id' type
Wrap the id in a new FlowStorageId struct to avoid id confusion with other
storage API calls.
Philippe Antoine [Fri, 5 Feb 2021 14:17:41 +0000 (15:17 +0100)]
rust: remove exported unused functions
Victor Julien [Fri, 9 Apr 2021 08:15:39 +0000 (10:15 +0200)]
app-layer/expectation: clean up storage id logic
Philippe Antoine [Thu, 8 Apr 2021 15:44:01 +0000 (17:44 +0200)]
ftp: fixes leak with duplicate expectation
Philippe Antoine [Wed, 7 Apr 2021 07:17:44 +0000 (09:17 +0200)]
fuzz: use stream.midstream=true
Philippe Antoine [Mon, 29 Mar 2021 18:27:34 +0000 (20:27 +0200)]
fuzz: specify protocol with fuzz target name
cf https://redmine.openinfosecfoundation.org/issues/4125
This allows fuzz_applayerparser_parse to fuzz one specific
app-layer protocol based on the binary name, as is done
with the environment variable FUZZ_APPLAYER
That is if we rename/copy to fuzz_applayerparser_parse_smb,
it will fuzz only SMB protocol
This way, we can easily produce different fuzz targets for
each protocol in oss-fuzz
Philippe Antoine [Thu, 11 Mar 2021 21:17:13 +0000 (22:17 +0100)]
rdp: correctly returns incomplete in parse_tc
Adding the already consumed bytes
In case an incomplete tls handshake is handled with/after
a refular rdp t123_tpkt
Philippe Antoine [Tue, 16 Mar 2021 12:07:30 +0000 (13:07 +0100)]
http2: adds check about dynamic headers table size
Andreas Herz [Tue, 6 Apr 2021 15:29:03 +0000 (17:29 +0200)]
rules: add newer rule files to makefile for release tarball
Jeff Lucovsky [Mon, 29 Mar 2021 12:33:02 +0000 (08:33 -0400)]
general: Typo cleanup
Jeff Lucovsky [Mon, 29 Mar 2021 12:30:59 +0000 (08:30 -0400)]
detect/threshold: Improve threshold.config perf
This commit improves performance when parsing threshold.config by
removing a loop-invariant to create a one-time object with the parsed
address(es).
Then, as needed, copies of this object are made as the suppression
rule(s) are processed.
Jeff Lucovsky [Mon, 29 Mar 2021 12:28:50 +0000 (08:28 -0400)]
detect/threshold: Function to deep-copy thresh obj
This commit adds a function to make a deep copy of a DetectThresholdData
object.
The function is used when parsing threshold.config items to make a
one-time object and then add copies as needed.
Jeff Lucovsky [Mon, 29 Mar 2021 12:26:40 +0000 (08:26 -0400)]
detect/address: Expose DetectAddressCopy function
Philippe Antoine [Mon, 5 Apr 2021 13:53:09 +0000 (15:53 +0200)]
http2: pass data through when decompression fails
as is done for HTTP1
Jeff Lucovsky [Sat, 5 Dec 2020 14:28:38 +0000 (09:28 -0500)]
threshold-config: Improve support for big IP lists
Juliana Fajardini [Tue, 23 Mar 2021 17:59:58 +0000 (17:59 +0000)]
templates: fix typos
- *template*files[ch][rs]: fix typos
- scripts/setup-app-layer: fix typos
Juliana Fajardini [Thu, 18 Mar 2021 18:23:23 +0000 (18:23 +0000)]
scripts/setup-app-layer: fix Makefile.am patch
adjust lines for patching /src/Makefile.am, as current generated
Makefile wasn't building Suricata.
Add suggestion to run "./configure" before running "make".
Add --logger and --parser options to examples.
Jason Ish [Tue, 16 Mar 2021 21:35:46 +0000 (15:35 -0600)]
logging: removed unused logger IDs
- pre-json dns logger
- unified2
- pre-json drop logger
Jason Ish [Tue, 16 Mar 2021 21:28:01 +0000 (15:28 -0600)]
dns: only register a single logger
DNS no longer requires a logger to be registered for to-client and
to-server directions. This has not been required with the stateless
design of the Rust DNS parser.
Victor Julien [Thu, 1 Apr 2021 12:27:30 +0000 (14:27 +0200)]
output/tx: add warning to avoid future bugs
Victor Julien [Thu, 1 Apr 2021 12:10:24 +0000 (14:10 +0200)]
output/tx: move eof checks out of logging loop
Victor Julien [Tue, 30 Mar 2021 18:34:53 +0000 (20:34 +0200)]
app-layer: minor code cleanups
Victor Julien [Tue, 30 Mar 2021 15:17:10 +0000 (17:17 +0200)]
app-layer: remove conditional logic around API calls
Remove logic that suggested some API calls could be conditional,
even though Suricata wouldn't even start up if they weren't
registered.
Jason Ish [Fri, 26 Mar 2021 22:22:34 +0000 (16:22 -0600)]
eve/netflow: use generic json context
Jason Ish [Fri, 26 Mar 2021 22:14:00 +0000 (16:14 -0600)]
eve/flow: use generic json context
Jason Ish [Fri, 26 Mar 2021 21:55:10 +0000 (15:55 -0600)]
eve/ftp: use generic json context
The FTP logger contained no extra data in its context so the
generic json context can be used.
Jason Ish [Fri, 26 Mar 2021 21:51:21 +0000 (15:51 -0600)]
eve: refactor CreateEveHeaderWithTx to include common options
Jason Ish [Wed, 24 Mar 2021 23:01:18 +0000 (17:01 -0600)]
eve cleanup: remove duplicate/redundant code
The first change was to have CreateEveHeader add the common options
as this was left out in a few loggers. While update all the loggers
that use CreateEveHeader, remove redundant code, in particular
from loggers that don't need to use their own context but
can use the generic one.
Jason Ish [Thu, 25 Mar 2021 18:11:01 +0000 (12:11 -0600)]
eve/mqtt: fix mqtt logging with threaded eve
Mqtt was not setting up a per-thread file context for logging
in threaded mode, leading a crash when used in threaded mode.
Redmine issue:
https://redmine.openinfosecfoundation.org/issues/4404
Jeff Lucovsky [Sun, 28 Feb 2021 19:38:26 +0000 (14:38 -0500)]
general: Correct typos
Jeff Lucovsky [Sun, 28 Feb 2021 19:33:58 +0000 (14:33 -0500)]
thresholds: Improve validation of threshold.config
This commit improves the handling of threshold.config. When used with
"-T", a non-zero return code occurs when the file cannot be validated.
To maintain legacy behavior, when "-T" is not used and threshold.config
contains one or more invalid lines, Suricata continues execution.
Jeff Lucovsky [Sun, 28 Feb 2021 19:32:15 +0000 (14:32 -0500)]
error: Add code for threshold config validation
This commit adds a new warning code for threshold config file validation
failures.
Eric Leblond [Mon, 22 Mar 2021 21:42:10 +0000 (22:42 +0100)]
eve/ike: restore common option logging
Philippe Antoine [Thu, 11 Mar 2021 15:41:11 +0000 (16:41 +0100)]
sslv2: precise detection pattern with probing parser
Philippe Antoine [Wed, 3 Feb 2021 13:26:24 +0000 (14:26 +0100)]
fuzz: adds structure aware target
so as not to fuzz libpcap
and generate structure aware signatures
Philippe Antoine [Sun, 28 Mar 2021 15:53:50 +0000 (17:53 +0200)]
rust: bump bitflags dependency version
So that lexical-core, needed by nom, and using bitflags
is used with version 0.7.5 instead of version 0.7.0
which fixed the fact that BITS is now a reserved keyword
in nightly version
Philippe Antoine [Thu, 11 Mar 2021 15:12:36 +0000 (16:12 +0100)]
kerberos: fix probing parser tag condition
according to the comment
Jason Ish [Wed, 10 Mar 2021 04:54:43 +0000 (22:54 -0600)]
install: better warning on install-full and don't fail
If suricata-update is not available on "make install-full", don't
exit 1, instead give the reason why its not installed, but still
succeed the install.
Victor Julien [Fri, 12 Mar 2021 12:31:08 +0000 (13:31 +0100)]
github-ci: add libnet to ubuntu-20-04-cov-sv builder
Victor Julien [Fri, 12 Mar 2021 09:22:01 +0000 (10:22 +0100)]
eve/drop: use highest priority drop
When adding the alert to a drop record make sure the add the highest
priority.
It would until now add all drops from high to low prio, effectively
overwriting the record each time.
Ticket #4397
Victor Julien [Wed, 10 Mar 2021 12:25:55 +0000 (13:25 +0100)]
detect/alert: apply pd only actions to flow
Ticket #4394
Victor Julien [Tue, 9 Mar 2021 19:56:14 +0000 (20:56 +0100)]
detect/alert: minor code refactor
Use a simpler reject check and move logic into util func.
Victor Julien [Tue, 9 Mar 2021 15:25:14 +0000 (16:25 +0100)]
detect/iponly: don't check & set flow flags twice
Per flow IP-only flags are checked and set by IP-only engine, so
no need to set/check them per alert.
Victor Julien [Fri, 5 Mar 2021 09:55:45 +0000 (10:55 +0100)]
eve/ike: gracefully handle renamed output config
frank honza [Mon, 26 Oct 2020 12:18:06 +0000 (13:18 +0100)]
ikev1: add documentation for ikev1
Sascha Steinbiss [Sun, 3 Jan 2021 22:44:23 +0000 (23:44 +0100)]
ikev1: add metadata to alerts
Sascha Steinbiss [Sun, 3 Jan 2021 22:42:24 +0000 (23:42 +0100)]
ikev1: add ikev1 parser
frank honza [Sun, 18 Oct 2020 19:38:06 +0000 (21:38 +0200)]
ikev1: rename ikev2 to common ike
Renaming was done with shell commands, git mv for moving the files and content like
find -iname '*.c' | xargs sed -i 's/ikev1/ike/g' respecting the different mixes of upper/lower case.
frank honza [Sun, 18 Oct 2020 20:00:48 +0000 (22:00 +0200)]
detect: added support for protocol-aliases
frank honza [Sun, 18 Oct 2020 19:50:29 +0000 (21:50 +0200)]
util: add function converting u8-array into a hex-String
frank honza [Sun, 18 Oct 2020 19:46:04 +0000 (21:46 +0200)]
detect: add comparison-mode LTE/GTE for Detect(U32/u8)Data
Victor Julien [Thu, 4 Mar 2021 12:40:15 +0000 (13:40 +0100)]
detect/analyzer: fix mpm display on payload only rules
Victor Julien [Fri, 19 Feb 2021 10:45:00 +0000 (11:45 +0100)]
detect: suppress error message for pcre only rules
Victor Julien [Fri, 5 Feb 2021 21:01:26 +0000 (22:01 +0100)]
detect/analyzer: suggest modern keywords
Victor Julien [Fri, 5 Feb 2021 20:33:35 +0000 (21:33 +0100)]
detect/analyzer: fix json output for warnings/notes
Victor Julien [Sat, 6 Feb 2021 07:10:29 +0000 (08:10 +0100)]
detect/asn1: minor cleanups
Victor Julien [Fri, 5 Feb 2021 07:42:37 +0000 (08:42 +0100)]
detect/http-server-body: clean up test
Victor Julien [Wed, 3 Mar 2021 13:01:55 +0000 (14:01 +0100)]
detect/icmp: reject invalid rules for icode/itype
Victor Julien [Wed, 3 Mar 2021 12:41:26 +0000 (13:41 +0100)]
detect/prefilter: fix null ptr deref on invalid rule
A bad rule 'icode:<0; prefilter;' would trigger a null ptr deref
in ApplyToU8Hash.
Bug #4375.
Victor Julien [Sun, 28 Feb 2021 08:39:16 +0000 (09:39 +0100)]
detect/state: fix reset bug
Fix issue where after a reset the now empty list elements are not
reused and the values may not be valid for the current detect
engine anymore.
Introduce a 'current' (cur) pointer that points to the store element
currently being filled. This way existing stores will be reused.
If 'cur' is NULL and 'head' is not NULL it means we need to use
'tail' to append a new store.
Victor Julien [Sun, 28 Feb 2021 08:24:35 +0000 (09:24 +0100)]
detect/state: test to show reset bug
Victor Julien [Sun, 28 Feb 2021 08:21:36 +0000 (09:21 +0100)]
detect/state: minor code cleanup
Jason Ish [Fri, 18 Dec 2020 17:34:30 +0000 (11:34 -0600)]
filestore: fix global counter init in unix socket mode
Move initialization of filestore global counter to PreRunInit,
so they get registered during program initialization, or as
required in unix-socket mode, initialized for each file run.
Fixes Redmine issue:
https://redmine.openinfosecfoundation.org/issues/4216
Philippe Antoine [Wed, 17 Feb 2021 14:36:12 +0000 (15:36 +0100)]
smb: relax probing parser to handle first NBSS message
cf dcerpc-udp S-V test :
First message is Message Type: Session request (0x81)
Second message is SMB
Philippe Antoine [Wed, 17 Feb 2021 13:54:46 +0000 (14:54 +0100)]
protodetect: only run ProbingParserTc if STREAM_TOCLIENT
Philippe Antoine [Tue, 2 Feb 2021 13:44:43 +0000 (14:44 +0100)]
fuzz: more precise assertion for protocol detection
Only in the cases of stream start is the assertion valable.
Otherwise, it can only be best effort.
Philippe Antoine [Tue, 2 Feb 2021 12:31:08 +0000 (13:31 +0100)]
smb: probing parser for start and midstream
The probing parser is more strict at the start of the stream
Philippe Antoine [Tue, 2 Feb 2021 12:29:14 +0000 (13:29 +0100)]
smb: split probing function for code style
Introduces rs_smb_probe_tcp_midstream
Philippe Antoine [Wed, 17 Feb 2021 16:02:35 +0000 (17:02 +0100)]
detect: fix overflows in SetupU8Hash
For instance ">255" resulted in overflow
Philippe Antoine [Fri, 18 Dec 2020 21:12:23 +0000 (22:12 +0100)]
ssl: reset state when breaking out of SSLV3_HANDSHAKE_PROTOCOL
So that we cannot resumt it with corrupted values
Philippe Antoine [Thu, 17 Dec 2020 20:48:54 +0000 (21:48 +0100)]
modbus: stop allocating transactions when flooded
cf #4224
Philippe Antoine [Fri, 18 Dec 2020 13:21:16 +0000 (14:21 +0100)]
icmpv6: bail out for icmpv6.hdr keyword if not ICMPv6
Jeff Lucovsky [Tue, 8 Dec 2020 13:38:18 +0000 (08:38 -0500)]
output/http2: Multi-threaded EVE logging support
This commit adds multi-threaded EVE logging support to the HTTP/2
logging path.
Philippe Antoine [Mon, 7 Dec 2020 11:16:31 +0000 (12:16 +0100)]
eve: fix memory leak in metadata
Fixes #4205
Shivani Bhardwaj [Thu, 25 Feb 2021 05:44:24 +0000 (11:14 +0530)]
doc: fix ubuntu pkg name for tcmalloc
Philippe Antoine [Thu, 28 Jan 2021 16:48:48 +0000 (17:48 +0100)]
decode: limits the number of decoded layers
so as to avoid overrecursion leading to stack exhaustion
Victor Julien [Thu, 25 Feb 2021 21:38:34 +0000 (22:38 +0100)]
detect: set HTTP SWF decompress limits
Victor Julien [Thu, 25 Feb 2021 21:00:17 +0000 (22:00 +0100)]
detect/http.request_body: fix tracking with xforms
Fix handling of file progress tracking for regular http.request_body
along with transform combinations.
This is done by implementing the 'base id' logic.
Related tickets: #4361 #4199 #3616
Victor Julien [Thu, 25 Feb 2021 20:36:27 +0000 (21:36 +0100)]
detect/file.data: fix mixing transforms (http)
Fix handling of file progress tracking for regular file.data along
with transform combinations for the part of the implementation that
uses the HTTP inspection logic.
This is done by implementing the 'base id' logic.
Related tickets: #4361 #4199 #3616
Victor Julien [Thu, 25 Feb 2021 19:07:41 +0000 (20:07 +0100)]
detect/file.data: fix mixing transforms (file api)
Fix handling of file progress tracking for regular file.data along
with transform combinations for the part of the implementation that
uses the File API.
This is done by implementing the 'base id' logic.
Related tickets: #4361 #4199 #3616
Victor Julien [Thu, 25 Feb 2021 19:06:40 +0000 (20:06 +0100)]
detect: track base id for xform buffers
Buffers with transforms are based on the non-transformed "base"
buffer, with a new ID assigned and the transform callbacks added.
This patch stores the id of the original buffer in the new buffer
inspect and prefilter structures. This way the buffers with and
without transforms can share some of the logic are progression
of file and body inspection trackers.
Related tickets: #4361 #4199 #3616
Victor Julien [Sun, 7 Feb 2021 08:00:49 +0000 (09:00 +0100)]
detect/analyzer: fix pkt engine display
Victor Julien [Wed, 24 Feb 2021 15:30:13 +0000 (16:30 +0100)]
classification: sync and update
Sync to latest ET open and introduce inappropriate as a classification
to replace something some find inappropriate.
Shivani Bhardwaj [Tue, 23 Feb 2021 09:55:52 +0000 (15:25 +0530)]
dcerpc: trigger raw assembly on record completion