]> git.ipfire.org Git - people/ms/suricata.git/log
people/ms/suricata.git
3 years agounix-socket: reset to ready state on startup
Jason Ish [Thu, 25 Feb 2021 17:16:28 +0000 (11:16 -0600)] 
unix-socket: reset to ready state on startup

As part of commit ea15282f47c6ff781533e3a063f9c903dd6f1afb,
some initialization was moved to happen even in unix socket mode,
however, this initialization does setup some loggers that can only have
one instance enabled (anomaly, drop, file-store).

This will cause these loggers to error out on the first pcap, but work
on subsequent runs of the pcap as some deinitialization is done after
each pcap.

This fix just runs the post pcap-file deinitialization routine to
reset some of the initialization done on startup, like is done after
running each pcap in unix socket mode.

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

Additionally this prevents alerts from being logged two times
on the first run of a pcap through the unix socket:

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

3 years agodecode/vntag: Add VNTag decoder logic
Jeff Lucovsky [Sun, 25 Apr 2021 13:20:54 +0000 (09:20 -0400)] 
decode/vntag: Add VNTag decoder logic

3 years agotests/vntag: VNTAG decoder unittests
Jeff Lucovsky [Sat, 24 Apr 2021 19:44:17 +0000 (15:44 -0400)] 
tests/vntag: VNTAG decoder unittests

3 years agodecode/vntag: VNTAG 802.1Qbh decoder
Jeff Lucovsky [Sat, 24 Apr 2021 19:43:50 +0000 (15:43 -0400)] 
decode/vntag: VNTAG 802.1Qbh decoder

3 years agodecode/stats: VNTAG stats
Jeff Lucovsky [Sat, 24 Apr 2021 19:42:48 +0000 (15:42 -0400)] 
decode/stats: VNTAG stats

3 years agodecode/events: VNTAG decoder events
Jeff Lucovsky [Sat, 24 Apr 2021 19:38:16 +0000 (15:38 -0400)] 
decode/events: VNTAG decoder events

3 years agodecode: Add ethertype for VNTAG
Jeff Lucovsky [Sat, 24 Apr 2021 19:36:57 +0000 (15:36 -0400)] 
decode: Add ethertype for VNTAG

3 years agogithub: Update codeowner handle
Shivani Bhardwaj [Fri, 30 Apr 2021 06:55:58 +0000 (12:25 +0530)] 
github: Update codeowner handle

3 years agoftp: completely parses pasv and epsv responses
Philippe Antoine [Tue, 27 Apr 2021 07:03:45 +0000 (09:03 +0200)] 
ftp: completely parses pasv and epsv responses

3 years agoflow/bypass: Properly set the ICMP emergency-bypassed value
Luke Coughlan [Mon, 26 Apr 2021 12:05:15 +0000 (13:05 +0100)] 
flow/bypass: Properly set the ICMP emergency-bypassed value

Currently the ICMP emergency-bypassed value defined in suricata.conf is
overwriting the UDP value rather than correctly setting it for ICMP.
This commit corrects this bug so that the ICMP value can be set as
expected.

3 years agogeneral: Cleanup bool usage
Jeff Lucovsky [Fri, 23 Apr 2021 14:08:07 +0000 (10:08 -0400)] 
general: Cleanup bool usage

3 years agohttp2: have filecontainer for both directions
Philippe Antoine [Fri, 23 Apr 2021 19:55:20 +0000 (21:55 +0200)] 
http2: have filecontainer for both directions

3 years agomisc: include queue.h before other headers
Jason Ish [Thu, 22 Apr 2021 14:52:08 +0000 (08:52 -0600)] 
misc: include queue.h before other headers

At least on FreeBSD, some other include is including "sys/queue.h"
which results in FreeBSDs /usr/include/sys/queue.h being picked
up and setting __SYS_QUEUE_H__ so our queue.h is not picked up.

But the FreeBSD queue.h does not have the CIRCLEQ definitions. To
fix just include our queue.h first, which also sets __SYS_QUEUE_H__
preventing the system one from being picked up.

3 years agodns: remove flood protection purging
Jason Ish [Thu, 22 Apr 2021 15:41:48 +0000 (09:41 -0600)] 
dns: remove flood protection purging

It doesn't look like flood protection is required with the
stateless parser anymore. It actually can get in the way of TCP
DNS when a large number of requests end-up in the same segment
where a TX can get purged before it has a chance to go through
the normal TX life-cycle.

3 years agotx: fix unidir tx cleanup
Jason Ish [Thu, 22 Apr 2021 15:38:24 +0000 (09:38 -0600)] 
tx: fix unidir tx cleanup

A unidirection protocol parser should only have its transactions
marked as "skipped" if it is skipped in both the TS and TC
directions, otherwise unidir transactions are always considered
skipped and the cleanup will never updates its minimum id.

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

3 years agogeneral: Typo cleanup
Jeff Lucovsky [Sat, 17 Oct 2020 14:56:23 +0000 (10:56 -0400)] 
general: Typo cleanup

3 years agodetect/address: Improve support for large addrs
Jeff Lucovsky [Sat, 17 Oct 2020 14:54:51 +0000 (10:54 -0400)] 
detect/address: Improve support for large addrs

This commit improves support for large address variables. Without this
commit, address size was fixed at 8196 or less. This commit permits
larger sized address variables.

3 years agoapplayer: fix test data for a valid DCERPC pkt
Shivani Bhardwaj [Sat, 13 Mar 2021 11:11:48 +0000 (16:41 +0530)] 
applayer: fix test data for a valid DCERPC pkt

3 years agodcerpc/tcp: improve detection
Shivani Bhardwaj [Fri, 12 Mar 2021 05:33:34 +0000 (11:03 +0530)] 
dcerpc/tcp: improve detection

Lately, some of the TLS data was misdetected as DCERPC/TCP because of
the pattern |05 00|. Add more checks in DCERPC probe function to ensure
that it is in fact DCERPC/TCP.

3 years agodoc: add documentation for rawbytes keyword
Andreas Herz [Thu, 22 Oct 2020 20:41:17 +0000 (22:41 +0200)] 
doc: add documentation for rawbytes keyword

3 years agodetect-rawbytes: add rawbytes doc help output
Andreas Herz [Thu, 22 Oct 2020 20:40:10 +0000 (22:40 +0200)] 
detect-rawbytes: add rawbytes doc help output

3 years agodetect-rawbytes: update to new clang format
Andreas Herz [Thu, 22 Oct 2020 20:38:42 +0000 (22:38 +0200)] 
detect-rawbytes: update to new clang format

3 years agoeve: refactor OutputJsonBuilderBuffer to take context
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.

3 years agoeve: convert many loggers to use generate thread context
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.

3 years agoeve: reset buffer in OutputJsonBuilderBuffer
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.

3 years agoeve: factor thread context creation/free for reuse
Jason Ish [Thu, 15 Apr 2021 07:33:43 +0000 (01:33 -0600)] 
eve: factor thread context creation/free for reuse

3 years agoeve: remove duplicate call to LogFileEnsureExists
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.

3 years agogithub-ci: add ebpf build
Eric Leblond [Sun, 11 Apr 2021 19:27:15 +0000 (21:27 +0200)] 
github-ci: add ebpf build

Use Debian 10 to build eBPF.

3 years agoutil/ebpf: fix deprecation warning
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.

3 years agoebpf: fix gre encapsulation in xdp_lb
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.

3 years agoippair/bit: fix formatting
Juliana Fajardini [Wed, 14 Apr 2021 22:22:54 +0000 (23:22 +0100)] 
ippair/bit: fix formatting

3 years agoebpf/util: change flow storage to new 'id' type
Juliana Fajardini [Wed, 14 Apr 2021 13:15:59 +0000 (14:15 +0100)] 
ebpf/util: change flow storage to new 'id' type

3 years agodevice/storage: use dedicated '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.

3 years agodetect/engine-tag: fix typo
Juliana Fajardini [Wed, 14 Apr 2021 22:14:41 +0000 (23:14 +0100)] 
detect/engine-tag: fix typo

3 years agohost/storage: use dedicated 'id' type
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.

3 years agoippair/storage: use dedicated 'id' type
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.

3 years agooutput/log: Removed pcie (Tilera) log vestiges
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).

3 years agooutput/log: Ensure files closed in threaded mode
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.

3 years agoflow/storage: use dedicated 'id' type
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.

3 years agorust: remove exported unused functions
Philippe Antoine [Fri, 5 Feb 2021 14:17:41 +0000 (15:17 +0100)] 
rust: remove exported unused functions

3 years agoapp-layer/expectation: clean up storage id logic
Victor Julien [Fri, 9 Apr 2021 08:15:39 +0000 (10:15 +0200)] 
app-layer/expectation: clean up storage id logic

3 years agoftp: fixes leak with duplicate expectation
Philippe Antoine [Thu, 8 Apr 2021 15:44:01 +0000 (17:44 +0200)] 
ftp: fixes leak with duplicate expectation

3 years agofuzz: use stream.midstream=true
Philippe Antoine [Wed, 7 Apr 2021 07:17:44 +0000 (09:17 +0200)] 
fuzz: use stream.midstream=true

3 years agofuzz: specify protocol with fuzz target name
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

3 years agordp: correctly returns incomplete in parse_tc
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

3 years agohttp2: adds check about dynamic headers table size
Philippe Antoine [Tue, 16 Mar 2021 12:07:30 +0000 (13:07 +0100)] 
http2: adds check about dynamic headers table size

3 years agorules: add newer rule files to makefile for release tarball
Andreas Herz [Tue, 6 Apr 2021 15:29:03 +0000 (17:29 +0200)] 
rules: add newer rule files to makefile for release tarball

3 years agogeneral: Typo cleanup
Jeff Lucovsky [Mon, 29 Mar 2021 12:33:02 +0000 (08:33 -0400)] 
general: Typo cleanup

3 years agodetect/threshold: Improve threshold.config perf
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.

3 years agodetect/threshold: Function to deep-copy thresh obj
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.

3 years agodetect/address: Expose DetectAddressCopy function
Jeff Lucovsky [Mon, 29 Mar 2021 12:26:40 +0000 (08:26 -0400)] 
detect/address: Expose DetectAddressCopy function

3 years agohttp2: pass data through when decompression fails
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

3 years agothreshold-config: Improve support for big IP lists
Jeff Lucovsky [Sat, 5 Dec 2020 14:28:38 +0000 (09:28 -0500)] 
threshold-config: Improve support for big IP lists

3 years agotemplates: fix typos
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

3 years agoscripts/setup-app-layer: fix Makefile.am patch
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.

3 years agologging: removed unused logger IDs
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

3 years agodns: only register a single 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.

3 years agooutput/tx: add warning to avoid future bugs
Victor Julien [Thu, 1 Apr 2021 12:27:30 +0000 (14:27 +0200)] 
output/tx: add warning to avoid future bugs

3 years agooutput/tx: move eof checks out of logging loop
Victor Julien [Thu, 1 Apr 2021 12:10:24 +0000 (14:10 +0200)] 
output/tx: move eof checks out of logging loop

3 years agoapp-layer: minor code cleanups
Victor Julien [Tue, 30 Mar 2021 18:34:53 +0000 (20:34 +0200)] 
app-layer: minor code cleanups

3 years agoapp-layer: remove conditional logic around API calls
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.

3 years agoeve/netflow: use generic json context
Jason Ish [Fri, 26 Mar 2021 22:22:34 +0000 (16:22 -0600)] 
eve/netflow: use generic json context

3 years agoeve/flow: use generic json context
Jason Ish [Fri, 26 Mar 2021 22:14:00 +0000 (16:14 -0600)] 
eve/flow: use generic json context

3 years agoeve/ftp: 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.

3 years agoeve: refactor CreateEveHeaderWithTx to include common options
Jason Ish [Fri, 26 Mar 2021 21:51:21 +0000 (15:51 -0600)] 
eve: refactor CreateEveHeaderWithTx to include common options

3 years agoeve cleanup: remove duplicate/redundant code
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.

3 years agoeve/mqtt: fix mqtt logging with threaded eve
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

3 years agogeneral: Correct typos
Jeff Lucovsky [Sun, 28 Feb 2021 19:38:26 +0000 (14:38 -0500)] 
general: Correct typos

3 years agothresholds: Improve validation of threshold.config
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.

3 years agoerror: Add code for threshold config validation
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.

3 years agoeve/ike: restore common option logging
Eric Leblond [Mon, 22 Mar 2021 21:42:10 +0000 (22:42 +0100)] 
eve/ike: restore common option logging

3 years agosslv2: precise detection pattern with probing parser
Philippe Antoine [Thu, 11 Mar 2021 15:41:11 +0000 (16:41 +0100)] 
sslv2: precise detection pattern with probing parser

3 years agofuzz: adds structure aware target
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

3 years agorust: bump bitflags dependency version
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

3 years agokerberos: fix probing parser tag condition
Philippe Antoine [Thu, 11 Mar 2021 15:12:36 +0000 (16:12 +0100)] 
kerberos: fix probing parser tag condition

according to the comment

3 years agoinstall: better warning on install-full and don't fail
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.

3 years agogithub-ci: add libnet to ubuntu-20-04-cov-sv builder
Victor Julien [Fri, 12 Mar 2021 12:31:08 +0000 (13:31 +0100)] 
github-ci: add libnet to ubuntu-20-04-cov-sv builder

3 years agoeve/drop: use highest priority drop
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

3 years agodetect/alert: apply pd only actions to flow
Victor Julien [Wed, 10 Mar 2021 12:25:55 +0000 (13:25 +0100)] 
detect/alert: apply pd only actions to flow

Ticket #4394

3 years agodetect/alert: minor code refactor
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.

3 years agodetect/iponly: don't check & set flow flags twice
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.

3 years agoeve/ike: gracefully handle renamed output config
Victor Julien [Fri, 5 Mar 2021 09:55:45 +0000 (10:55 +0100)] 
eve/ike: gracefully handle renamed output config

3 years agoikev1: add documentation for ikev1
frank honza [Mon, 26 Oct 2020 12:18:06 +0000 (13:18 +0100)] 
ikev1: add documentation for ikev1

3 years agoikev1: add metadata to alerts
Sascha Steinbiss [Sun, 3 Jan 2021 22:44:23 +0000 (23:44 +0100)] 
ikev1: add metadata to alerts

3 years agoikev1: add ikev1 parser
Sascha Steinbiss [Sun, 3 Jan 2021 22:42:24 +0000 (23:42 +0100)] 
ikev1: add ikev1 parser

3 years agoikev1: rename ikev2 to common ike
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.

3 years agodetect: added support for protocol-aliases
frank honza [Sun, 18 Oct 2020 20:00:48 +0000 (22:00 +0200)] 
detect: added support for protocol-aliases

3 years agoutil: add function converting u8-array into a hex-String
frank honza [Sun, 18 Oct 2020 19:50:29 +0000 (21:50 +0200)] 
util: add function converting u8-array into a hex-String

3 years agodetect: add comparison-mode LTE/GTE for Detect(U32/u8)Data
frank honza [Sun, 18 Oct 2020 19:46:04 +0000 (21:46 +0200)] 
detect: add comparison-mode LTE/GTE for Detect(U32/u8)Data

3 years agodetect/analyzer: fix mpm display on payload only rules
Victor Julien [Thu, 4 Mar 2021 12:40:15 +0000 (13:40 +0100)] 
detect/analyzer: fix mpm display on payload only rules

3 years agodetect: suppress error message for pcre only rules
Victor Julien [Fri, 19 Feb 2021 10:45:00 +0000 (11:45 +0100)] 
detect: suppress error message for pcre only rules

3 years agodetect/analyzer: suggest modern keywords
Victor Julien [Fri, 5 Feb 2021 21:01:26 +0000 (22:01 +0100)] 
detect/analyzer: suggest modern keywords

3 years agodetect/analyzer: fix json output for warnings/notes
Victor Julien [Fri, 5 Feb 2021 20:33:35 +0000 (21:33 +0100)] 
detect/analyzer: fix json output for warnings/notes

3 years agodetect/asn1: minor cleanups
Victor Julien [Sat, 6 Feb 2021 07:10:29 +0000 (08:10 +0100)] 
detect/asn1: minor cleanups

3 years agodetect/http-server-body: clean up test
Victor Julien [Fri, 5 Feb 2021 07:42:37 +0000 (08:42 +0100)] 
detect/http-server-body: clean up test

3 years agodetect/icmp: reject invalid rules for icode/itype
Victor Julien [Wed, 3 Mar 2021 13:01:55 +0000 (14:01 +0100)] 
detect/icmp: reject invalid rules for icode/itype

3 years agodetect/prefilter: fix null ptr deref on invalid rule
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.

3 years agodetect/state: fix reset bug
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.

3 years agodetect/state: test to show reset bug
Victor Julien [Sun, 28 Feb 2021 08:24:35 +0000 (09:24 +0100)] 
detect/state: test to show reset bug

3 years agodetect/state: minor code cleanup
Victor Julien [Sun, 28 Feb 2021 08:21:36 +0000 (09:21 +0100)] 
detect/state: minor code cleanup