]> git.ipfire.org Git - thirdparty/suricata.git/log
thirdparty/suricata.git
3 years agodpdk: add DPDK test support in Github CI 6708/head
Lukas Sismis [Fri, 20 Aug 2021 19:27:51 +0000 (21:27 +0200)] 
dpdk: add DPDK test support in Github CI

Add DPDK dependency to the build process in distributions with
a native support of DPDK in their default package managers.

3 years agodpdk: add documentation for the DPDK runmode
Lukas Sismis [Mon, 24 May 2021 18:11:24 +0000 (20:11 +0200)] 
dpdk: add documentation for the DPDK runmode

Briefly present the DPDK runmode through configuration file.

3 years agodpdk/ice: setup RSS for Intel ICE PMD
Lukas Sismis [Mon, 29 Nov 2021 21:17:58 +0000 (22:17 +0100)] 
dpdk/ice: setup RSS for Intel ICE PMD

Set RSS hash function according to Intel ICE PMD available hash functions

Set hash functions according to the support by the ICE PMD, so that no warning
regarding RSS setting is issued.

3 years agodpdk/ixgbe: setup RSS for Intel IXGBE PMD
Lukas Sismis [Mon, 22 Nov 2021 15:43:29 +0000 (16:43 +0100)] 
dpdk/ixgbe: setup RSS for Intel IXGBE PMD

Set RSS hash function according to Intel IXGBE PMD available hash functions.

During configuration, a warning appeared stating that RSS hash function
has been changed from one value to the other. This has meant that
the supported hash functions did not cover all required hash functions
by the configuration. This commit solves the warning.

3 years agodpdk/i40e: support RSS on Intel i40e PMD driver
Lukas Sismis [Sun, 21 Nov 2021 22:22:24 +0000 (23:22 +0100)] 
dpdk/i40e: support RSS on Intel i40e PMD driver

Due to peculiar behavior of i40e PMD driver, the RSS is required to be set
via rte_flow rules or a hash filter as compared to other NICs where RSS is
configured through port configuration structure.
RTE_FLOW rules are created on 5-tuples (as opposed to 3-tuple configured
on the other NICs). Fragmented traffic have been tested with this setup
and it has been proven that fragmented packets of the same flow are
received on the same queue. At the same time, setting 3-tuple on rte_flow
rules have not yield in the expected results.

Notes from the experiments:

- Configuration of 5-tuple (as is in the commit):
    fragmented and nonfragmented packets are received by the same workers
    even when I applied seed to alter them via tcpreplay-edit (option --seed)

- Setting only ETH_RSS_FRAG_IPV4 and ETH_RSS_IPV4 (i.e. setting 3-tuple):
    when setting ETH_RSS_IPV4, the PMD driver says that pctype is not
    supported (generally this means that the "type" of traffic is not
    a valid configuration for the i40e)

- Setting only ETH_RSS_FRAG_IPV4 and ETH_RSS_NONFRAG_IPV4_OTHER:
    this doesn't work well, packets of the same flow are received on
    the different workers (my explanation is that the fragmented packets are
    matched with ETH_RSS_FRAG_IPV4 but the other UDP packets are not matched
    with ETH_RSS_NONFRAG_IPV4_OTHER rte_flow rule (they would be matched with
    ETH_RSS_NONFRAG_IPV4_UDP).

3 years agodpdk: add RSS flags that are set in the NIC
Victor Julien [Sun, 14 Nov 2021 18:47:24 +0000 (19:47 +0100)] 
dpdk: add RSS flags that are set in the NIC

3 years agodpdk: add specific error counters
Victor Julien [Sun, 14 Nov 2021 14:49:43 +0000 (15:49 +0100)] 
dpdk: add specific error counters

3 years agodpdk: initial support with workers runmode
Lukas Sismis [Sun, 21 Nov 2021 22:18:36 +0000 (23:18 +0100)] 
dpdk: initial support with workers runmode

Register a new runmode - DPDK. This enables a new flag on Suricata start
(--dpdk).

With the flag given, DPDK runmode is enabled.

Runmode loads the configuration and then initializes EAL.

If successful, it configures the physical NICs according to the configuration
file. After that, worker threads are initialized and then are in continuous
receive loop.

3 years agodpdk: edit configure.ac to include DPDK compilation option
Lukas Sismis [Sun, 29 Aug 2021 21:43:14 +0000 (23:43 +0200)] 
dpdk: edit configure.ac to include DPDK compilation option

Add a build flag --enable-dpdk to support DPDK parts in the source code.

3 years agonetmap: allow specifying a library directory 6707/head
Jeff Lucovsky [Sat, 11 Dec 2021 13:45:57 +0000 (08:45 -0500)] 
netmap: allow specifying a library directory

Ticket: #4482

3 years agodatasets: initialize after dropping privileges
Jason Ish [Thu, 9 Dec 2021 22:59:04 +0000 (16:59 -0600)] 
datasets: initialize after dropping privileges

Move initialization of datasets to a point after privileges
have been dropped.

Ticket 4239

3 years agorust/smb: convert parser to nom7 functions (SMB1) 6705/head
Pierre Chifflier [Sun, 14 Nov 2021 17:24:00 +0000 (18:24 +0100)] 
rust/smb: convert parser to nom7 functions (SMB1)

3 years agorust/smb: convert parser to nom7 functions (DCERPC records)
Pierre Chifflier [Sun, 14 Nov 2021 16:18:14 +0000 (17:18 +0100)] 
rust/smb: convert parser to nom7 functions (DCERPC records)

3 years agorust/smb: convert parser to nom7 functions (SMB2)
Pierre Chifflier [Fri, 12 Nov 2021 17:20:51 +0000 (18:20 +0100)] 
rust/smb: convert parser to nom7 functions (SMB2)

3 years agorust/smb: convert parser to nom7 functions (SMB3)
Pierre Chifflier [Fri, 12 Nov 2021 16:38:14 +0000 (17:38 +0100)] 
rust/smb: convert parser to nom7 functions (SMB3)

3 years agorust/smb: convert parser to nom7 functions (NTLM/SSP records)
Pierre Chifflier [Fri, 12 Nov 2021 16:28:45 +0000 (17:28 +0100)] 
rust/smb: convert parser to nom7 functions (NTLM/SSP records)

3 years agorust/smb: convert parser to nom7 functions (NBSS records)
Pierre Chifflier [Fri, 12 Nov 2021 13:32:09 +0000 (14:32 +0100)] 
rust/smb: convert parser to nom7 functions (NBSS records)

3 years agorust: add nom7 combinator take_until_and_consume
Pierre Chifflier [Fri, 12 Nov 2021 12:45:40 +0000 (13:45 +0100)] 
rust: add nom7 combinator take_until_and_consume

3 years agodoc: fix typo in "Stream engine" documentation
Lukas Sismis [Wed, 8 Dec 2021 18:26:07 +0000 (19:26 +0100)] 
doc: fix typo in "Stream engine" documentation

3 years agoftp: do not set alproto if one was already found
Philippe Antoine [Mon, 29 Nov 2021 09:59:10 +0000 (10:59 +0100)] 
ftp: do not set alproto if one was already found

Ticket: 4857

If a pattern such as GET is seen ine the beginning of the
file transferred over ftp-data, this flow will get recognized
as HTTP, and a HTTP state will be created during parsing.

Thus, we cannot override directly alproto's values

This solves the segfault, but not the logical bug that the flow
should be classified as FTP-DATA instead of HTTP

3 years agoapp-layer/htp: cleanup test
Victor Julien [Fri, 10 Dec 2021 07:00:23 +0000 (08:00 +0100)] 
app-layer/htp: cleanup test

3 years agohtp: rename callbacks to make purpose clearer
Victor Julien [Fri, 10 Dec 2021 13:05:35 +0000 (14:05 +0100)] 
htp: rename callbacks to make purpose clearer

3 years agostream: unify ack'd right edge handling
Victor Julien [Sat, 11 Dec 2021 07:12:31 +0000 (08:12 +0100)] 
stream: unify ack'd right edge handling

Use util function in all code needing the ack'd data.

3 years agodetect/engine: store buffer name in local array
Victor Julien [Fri, 3 Dec 2021 06:57:52 +0000 (07:57 +0100)] 
detect/engine: store buffer name in local array

Instead of storing a name and description as a pointer in DetectBufferType
store them in fixed size arrays. This is in preparation of runtime registration
of buffer types, where a constant name/desc is not available.

3 years agomingw: add bcrypt to LDADD for rust compilation 6681/head
Victor Julien [Tue, 7 Dec 2021 08:56:51 +0000 (09:56 +0100)] 
mingw: add bcrypt to LDADD for rust compilation

3 years agostream/reassembly: ignore min_inspect_depth on TCP state CLOSED
Victor Julien [Fri, 26 Nov 2021 12:06:00 +0000 (13:06 +0100)] 
stream/reassembly: ignore min_inspect_depth on TCP state CLOSED

3 years agodetect/http: don't set min-inspect-depth higher than setting
Victor Julien [Fri, 26 Nov 2021 10:05:46 +0000 (11:05 +0100)] 
detect/http: don't set min-inspect-depth higher than setting

3 years agoeve/ftp-data: log alert metadata in ftp-data object
Philippe Antoine [Tue, 30 Nov 2021 13:21:48 +0000 (14:21 +0100)] 
eve/ftp-data: log alert metadata in ftp-data object

Ticket: 4860

instead of directly in root

3 years agorust: export constants via cbindgen
Philippe Antoine [Tue, 30 Nov 2021 08:19:20 +0000 (09:19 +0100)] 
rust: export constants via cbindgen

so that constants are not defined twice in Rust anc C
So that we are sure they have the same value

3 years agomime: handles multiple sections for a parameter
Philippe Antoine [Fri, 4 Jun 2021 13:06:10 +0000 (15:06 +0200)] 
mime: handles multiple sections for a parameter

Ticket: 4386

as per RFC2231.
For instance filename can be split between filename*0,
filename*1, etc...

3 years agomime: move FindMimeHeaderTokenRestrict to rust
Philippe Antoine [Fri, 4 Jun 2021 13:05:14 +0000 (15:05 +0200)] 
mime: move FindMimeHeaderTokenRestrict to rust

Also fixes the case where the token name is present
in a value

3 years agodetect-ipopts: convert unittests to FAIL/PASS APIs
Modupe Falodun [Mon, 6 Dec 2021 08:28:42 +0000 (09:28 +0100)] 
detect-ipopts: convert unittests to FAIL/PASS APIs

Bug: 4047

3 years agomqtt: fix transaction completion
Philippe Antoine [Thu, 2 Dec 2021 09:29:40 +0000 (10:29 +0100)] 
mqtt: fix transaction completion

Ticket: 4862

A transaction to client is always considered
complete in the direction to server and vice versa.
Otherwise, transactions are never complete for
AppLayerParserTransactionsCleanup

3 years agodetect/fast_pattern: allow for rule time registration
Victor Julien [Fri, 24 Sep 2021 05:45:39 +0000 (07:45 +0200)] 
detect/fast_pattern: allow for rule time registration

In preparation of more dynamic logic in rule loading also doing
some registration, allow for buffers to be registered as fast_patterns
during rule parsing.

Leaves the register time registrations mostly as-is, but copies the
resulting list into the DetectEngineCtx and works with that onwards.
This list can then be extended.

3 years agodetect: add buffer helper functions
Victor Julien [Fri, 3 Dec 2021 08:45:56 +0000 (09:45 +0100)] 
detect: add buffer helper functions

3 years agodetect: split register time and detect load time buffer funcs
Victor Julien [Wed, 22 Sep 2021 19:07:17 +0000 (21:07 +0200)] 
detect: split register time and detect load time buffer funcs

3 years agodetect: use hashes for all buffer to id
Victor Julien [Wed, 22 Sep 2021 17:26:02 +0000 (19:26 +0200)] 
detect: use hashes for all buffer to id

Instead of a map that is constantly realloc'd, use 2 hash tables for
DetectBufferType entries: one by name (+transforms), the other by
id. Use these everywhere.

3 years agodetect: increase SigMatch type from u8 to u16
Victor Julien [Fri, 3 Dec 2021 07:01:51 +0000 (08:01 +0100)] 
detect: increase SigMatch type from u8 to u16

3 years agodetect: use bool for uint16_t used as bool
Victor Julien [Tue, 30 Nov 2021 12:35:48 +0000 (13:35 +0100)] 
detect: use bool for uint16_t used as bool

3 years agocommon: fix missing ; in header
Victor Julien [Fri, 3 Dec 2021 15:26:32 +0000 (16:26 +0100)] 
common: fix missing ; in header

3 years agodetect: allows <> syntax for uint ranges 6642/head
Philippe Antoine [Thu, 18 Feb 2021 14:43:03 +0000 (15:43 +0100)] 
detect: allows <> syntax for uint ranges

3 years agodetect: use prefilter values for modes
Philippe Antoine [Wed, 17 Feb 2021 16:26:38 +0000 (17:26 +0100)] 
detect: use prefilter values for modes

3 years agodetect: errors for rule with impossible conditions
Philippe Antoine [Wed, 17 Feb 2021 16:14:21 +0000 (17:14 +0100)] 
detect: errors for rule with impossible conditions

Such as >255 for an uint8 field

3 years agouserguide: (nit) fix typo in lua-output page
Juliana Fajardini [Fri, 15 Oct 2021 15:36:24 +0000 (16:36 +0100)] 
userguide: (nit) fix typo in lua-output page

3 years agouserguide: rename pg Lua Scripting->Lua Detection
Juliana Fajardini [Thu, 14 Oct 2021 22:06:01 +0000 (23:06 +0100)] 
userguide: rename pg Lua Scripting->Lua Detection

Since we can have scripts for output _or_ detection, it seems more
clear to rename this page to add more meaning

3 years agouserguide: update buffers list for lua-scripting
Juliana Fajardini [Thu, 14 Oct 2021 21:48:47 +0000 (22:48 +0100)] 
userguide: update buffers list for lua-scripting

3 years agouserguide/lua: add explanation about `need` diffs
Juliana Fajardini [Thu, 14 Oct 2021 21:42:11 +0000 (22:42 +0100)] 
userguide/lua: add explanation about `need` diffs

The differences on how the `need` key works, depending on script
usage (output or detection) confuses users, sometimes (cf doc#4725).
While we don't fix that, just explain this behavior.

3 years agofuzz: restrict flags passed to AppLayerProtoDetectGetProto
Philippe Antoine [Tue, 23 Nov 2021 21:13:56 +0000 (22:13 +0100)] 
fuzz: restrict flags passed to AppLayerProtoDetectGetProto

Completes commit 05f9b3ffc687d1afcfc5984ac9f0ce1888d06bf5

3 years agoapp-layer: include decoder events in app-layer tx data
Jason Ish [Tue, 16 Nov 2021 22:43:57 +0000 (16:43 -0600)] 
app-layer: include decoder events in app-layer tx data

As most parsers use an events structure we can include it in the
tx_data structure to reduce some boilerplate/housekeeping code
in app-layer parsers.

3 years agorange: prevents memory leak of file from HTTP2
Philippe Antoine [Tue, 23 Nov 2021 12:59:47 +0000 (13:59 +0100)] 
range: prevents memory leak of file from HTTP2

Ticket: 4811
Completes commit c023116857426137eb0c7240b80e99a8940f3c5b

state.free should also close files with ranges
as state.free_tx did already

And file_range field should be reset so that there is no
use after free.

3 years agoenip: fix int warnings
Philippe Antoine [Mon, 22 Nov 2021 08:42:40 +0000 (09:42 +0100)] 
enip: fix int warnings

There seems to fix a real bug when an ENIP connection
has more than 65k transactions

3 years agodnp3: fix int warnings
Philippe Antoine [Mon, 22 Nov 2021 08:13:54 +0000 (09:13 +0100)] 
dnp3: fix int warnings

There is a hack to know the type of an integer
and do an explicit cast in the python script
generating the C file

Also extends some bounds check against negative values

3 years agoprotodetect: fix int warnings
Philippe Antoine [Sat, 23 Oct 2021 11:04:48 +0000 (13:04 +0200)] 
protodetect: fix int warnings

There is actually a real evasion with AppLayerProtoDetectPMGetProto
using u16 instead of u32 for buflen

3 years agoci: adds default warning flag about float conversions
Philippe Antoine [Sat, 23 Oct 2021 10:25:39 +0000 (12:25 +0200)] 
ci: adds default warning flag about float conversions

3 years agowarning: explicit casts to double
Philippe Antoine [Sat, 23 Oct 2021 10:23:14 +0000 (12:23 +0200)] 
warning: explicit casts to double

3 years agosource/pcap: remove unused code
Philippe Antoine [Sat, 23 Oct 2021 10:22:54 +0000 (12:22 +0200)] 
source/pcap: remove unused code

3 years agofuzz: restrict flags passed to AppLayerProtoDetectGetProto 6634/head
Philippe Antoine [Mon, 22 Nov 2021 14:08:52 +0000 (15:08 +0100)] 
fuzz: restrict flags passed to AppLayerProtoDetectGetProto

So that rust does not panic with an unhandled value

3 years agoaf-packet: add send error counter
Victor Julien [Fri, 19 Nov 2021 06:03:10 +0000 (07:03 +0100)] 
af-packet: add send error counter

3 years agopacketpool: ReleasePacket callback check on getter
Victor Julien [Fri, 5 Nov 2021 19:09:17 +0000 (20:09 +0100)] 
packetpool: ReleasePacket callback check on getter

Any packet coming from the pool should have `PacketPoolReturnPacket`
as its callback. Check that this is the case.

3 years agoaf-packet: only ref mpeer if needed in tpacket v2
Victor Julien [Fri, 5 Nov 2021 12:50:18 +0000 (13:50 +0100)] 
af-packet: only ref mpeer if needed in tpacket v2

We only use it in autofp mode, for reference counting purposes.

Removes 2 atomic operations per packet in the more common workers
runmode.

3 years agoaf-packet: minor output updates
Victor Julien [Fri, 5 Nov 2021 11:23:48 +0000 (12:23 +0100)] 
af-packet: minor output updates

3 years agoaf-packet: optimize packet setup
Victor Julien [Fri, 5 Nov 2021 10:21:02 +0000 (11:21 +0100)] 
af-packet: optimize packet setup

Don't set fields we don't use in V3.

3 years agoaf-packet: add counters on how poll() works
Victor Julien [Thu, 4 Nov 2021 12:25:03 +0000 (13:25 +0100)] 
af-packet: add counters on how poll() works

Use `capture.afpacket.*` counter name space.

3 years agoaf-packet: don't check ifstate per send call in IPS
Victor Julien [Thu, 4 Nov 2021 16:38:58 +0000 (17:38 +0100)] 
af-packet: don't check ifstate per send call in IPS

Instead just accept that the socket state leads to `sendto` errors.
So print at most one error per socket.

3 years agoaf-packet: simplify AFPWritePacket
Victor Julien [Thu, 4 Nov 2021 09:39:36 +0000 (10:39 +0100)] 
af-packet: simplify AFPWritePacket

Since return code was ignored by all callers, we can just turn it into a
void function and slightly simplify the logic.

3 years agoaf-packet: use BUG_ON for 'impossible' condition
Victor Julien [Thu, 4 Nov 2021 09:05:54 +0000 (10:05 +0100)] 
af-packet: use BUG_ON for 'impossible' condition

3 years agoaf-packet: refactor VLAN hdr handling
Victor Julien [Thu, 4 Nov 2021 09:00:17 +0000 (10:00 +0100)] 
af-packet: refactor VLAN hdr handling

Update the packet payload after decode, instead of during IPS send.

This means the updates happen in the capture thread, and the VLAN header
is available to logging as well.

Ticket: #4805.

3 years agoaf-packet: remove tpacket-v1 support
Victor Julien [Sun, 31 Oct 2021 20:27:49 +0000 (21:27 +0100)] 
af-packet: remove tpacket-v1 support

Ticket: #4796.

V2 (for IDS and IPS) and V3 (for IDS) are widely supported. V2 was introduced
in 2008, so we can safely assume that all systems can run V2+.

3 years agoapp-layer/template: don't always enable if unittests built
Jason Ish [Fri, 12 Nov 2021 16:53:52 +0000 (10:53 -0600)] 
app-layer/template: don't always enable if unittests built

314ec77f88325a4e8989e898991b9af493cad3dc had the unintended side affect
of enabling the template parser and detection buffer if unittests were
enabled.

Fix this by using the new `Default` method for registering parsers.
However, the buffer still needs an explicit configuration check.

Also convert Notice debug messages to Debug to reduce output when in
unittest mode.  If we feel stronly this should still be Notice in the
template, that is a conversion we can make in the generation script when
generating a new parser.

3 years agotftp: Change references to echo
Jeff Lucovsky [Wed, 10 Nov 2021 14:43:56 +0000 (09:43 -0500)] 
tftp: Change references to echo

This commit changes the references to the "echo" protocol to tftp. The
references to echo are part of the template parser code.

3 years agoftp: Remove diagnostic print
Jeff Lucovsky [Wed, 10 Nov 2021 14:20:30 +0000 (09:20 -0500)] 
ftp: Remove diagnostic print

This commit removes a diagnostic message displayed during extraction of
the EPSV port.

3 years agonetmap: V14 API changes 6629/head
Jeff Lucovsky [Fri, 20 Aug 2021 13:10:26 +0000 (09:10 -0400)] 
netmap: V14 API changes

This commit modifies the Netmap packet handling to use API version 14.

@bmeeks8 contributed many changes instrumental to this effort.

3 years agoutil: Add sys/ioctl.h to common include
Jeff Lucovsky [Mon, 23 Aug 2021 12:46:10 +0000 (08:46 -0400)] 
util: Add sys/ioctl.h to common include

This commit adds another system include file based on autoconf to the
common Suricata include file for convenience.

3 years agoutil/log: Include device name with thread count
Jeff Lucovsky [Sat, 11 Sep 2021 13:03:33 +0000 (09:03 -0400)] 
util/log: Include device name with thread count

3 years agoconfig/netmap: Check for latest API version
Jeff Lucovsky [Sat, 21 Aug 2021 12:57:18 +0000 (08:57 -0400)] 
config/netmap: Check for latest API version

This commit checks for the latest Netmap API version.

3 years agorange: prevents memory leak of file from HTTP2
Philippe Antoine [Mon, 8 Nov 2021 12:33:27 +0000 (13:33 +0100)] 
range: prevents memory leak of file from HTTP2

If a HTTP2 transaction gets freed before the end of the range
request, we need to have the files container which is in
the state, to transfer owernship of this file to the files
container.

Ticket: 4811

3 years agoconf: avoid quadratic complexity
Philippe Antoine [Mon, 8 Nov 2021 13:18:30 +0000 (14:18 +0100)] 
conf: avoid quadratic complexity

Ticket: 4812

When adding many sequence nodes

3 years agorust/nfs: convert parser to nom7 functions (NFS v2 records)
Pierre Chifflier [Tue, 9 Nov 2021 19:17:27 +0000 (20:17 +0100)] 
rust/nfs: convert parser to nom7 functions (NFS v2 records)

3 years agorust/nfs: add a maximum number of operations per compound
Pierre Chifflier [Mon, 8 Nov 2021 22:11:24 +0000 (23:11 +0100)] 
rust/nfs: add a maximum number of operations per compound

The `count` combinator preallocates a number of bytes. Since the value
is untrusted, this can result in an Out Of Memory allocation.
Use a maximum value, large enough to cover all current implementations.

3 years agorust/nfs: convert parser to nom7 functions (NFS v3 and v4 records)
Pierre Chifflier [Mon, 8 Nov 2021 15:38:17 +0000 (16:38 +0100)] 
rust/nfs: convert parser to nom7 functions (NFS v3 and v4 records)

3 years agodetect-fragoffset: convert unittests to FAIL/PASS APIs
Modupe Falodun [Wed, 10 Nov 2021 01:05:05 +0000 (02:05 +0100)] 
detect-fragoffset: convert unittests to FAIL/PASS APIs

Bug: #4040

3 years agoci: add fedora 35 to builds
Corey Thomas [Wed, 10 Nov 2021 13:21:38 +0000 (08:21 -0500)] 
ci: add fedora 35 to builds

3 years agosmtp: log transaction even if no email present
Jason Ish [Wed, 10 Nov 2021 22:38:35 +0000 (16:38 -0600)] 
smtp: log transaction even if no email present

The SMTP transaction logger was not writing the log if the email
portion of the logger failed, such as in the case of STARTTLS
where this is no email decoded.

Ticket #4817

3 years agodetect/proto: convert unittests to FAIL/PASS APIs
Sam Muhammed [Fri, 12 Nov 2021 12:17:50 +0000 (14:17 +0200)] 
detect/proto: convert unittests to FAIL/PASS APIs

Task #4027

3 years agodetect-icode: convert unittests to FAIL/PASS APIs
Modupe Falodun [Sun, 21 Nov 2021 02:34:41 +0000 (03:34 +0100)] 
detect-icode: convert unittests to FAIL/PASS APIs

Bug: #4045

3 years agodetect-id: convert unittests to FAIL/PASS APIs
Modupe Falodun [Sun, 21 Nov 2021 01:25:15 +0000 (02:25 +0100)] 
detect-id: convert unittests to FAIL/PASS APIs

Bug: #4046

3 years agodetect/siggroup: convert unittests to FAIL/PASS APIs
Sam Muhammed [Sat, 13 Nov 2021 17:35:43 +0000 (19:35 +0200)] 
detect/siggroup: convert unittests to FAIL/PASS APIs

Task #4028

3 years agolua: Fix SCRule functions for match scripts
Benjamin Wilkins [Wed, 20 Oct 2021 20:21:08 +0000 (16:21 -0400)] 
lua: Fix SCRule functions for match scripts

Save Signature structure to lua register so SCRule functions can work
in match scripts, where no PacketAlert is present

Resolves Feature #2450

3 years agomodbus: free eve thread context on deinit
Jason Ish [Wed, 17 Nov 2021 05:15:13 +0000 (23:15 -0600)] 
modbus: free eve thread context on deinit

Was triggering ASAN leak detection.

3 years agodhcp: fix url in comment
Jason Ish [Wed, 17 Nov 2021 01:34:11 +0000 (19:34 -0600)] 
dhcp: fix url in comment

rustdoc was complaining about the format of the URL in a comment
while trying to generate documentation. Convert the comment to a
non-rustdoc comment for now to satisfy rustdoc.

3 years agoapp-layer: remove IsTxEventAware: never used
Jason Ish [Tue, 16 Nov 2021 22:35:29 +0000 (16:35 -0600)] 
app-layer: remove IsTxEventAware: never used

The function AppLayerParserProtocolIsTxEventAware is not used so
remove.

3 years agordp: fix transaction id
Jason Ish [Tue, 16 Nov 2021 23:52:58 +0000 (17:52 -0600)] 
rdp: fix transaction id

By our convention the transaction ID is incremented then applied
to the new transaction. And the generic transaction iterator
requires this behaviour.

3 years agoapp-layer: remove tx detect state setter and getter
Jason Ish [Wed, 10 Nov 2021 15:51:15 +0000 (09:51 -0600)] 
app-layer: remove tx detect state setter and getter

Instead access detect state through AppLayerParserGetTxData.

3 years agoapp-layer: include DetectEngineState in AppLayerTxData
Jason Ish [Tue, 9 Nov 2021 23:14:20 +0000 (17:14 -0600)] 
app-layer: include DetectEngineState in AppLayerTxData

Every transaction has an existing mandatory field, tx_data. As
DetectEngineState is also mandatory, include it in tx_data.

This allows us to remove the boilerplate every app-layer has
for managing detect engine state.

3 years agordp: add tx iterator
Jason Ish [Wed, 10 Nov 2021 19:34:10 +0000 (13:34 -0600)] 
rdp: add tx iterator

3 years agokrb5: use tx iterator
Jason Ish [Wed, 10 Nov 2021 19:38:22 +0000 (13:38 -0600)] 
krb5: use tx iterator

3 years agontp: add tx iterator
Jason Ish [Wed, 10 Nov 2021 19:31:54 +0000 (13:31 -0600)] 
ntp: add tx iterator

3 years agosip: add tx iterator
Jason Ish [Wed, 10 Nov 2021 19:30:04 +0000 (13:30 -0600)] 
sip: add tx iterator

3 years agoike: add tx iterator
Jason Ish [Wed, 10 Nov 2021 19:25:23 +0000 (13:25 -0600)] 
ike: add tx iterator

For IKE the manual iterator functions were there, but never
registered. So this commit does add a tx iterator to ike.

3 years agosnmp: use generic tx iterator
Jason Ish [Wed, 10 Nov 2021 19:22:15 +0000 (13:22 -0600)] 
snmp: use generic tx iterator