]> git.ipfire.org Git - thirdparty/suricata.git/log
thirdparty/suricata.git
2 years agogithub-ci: disable cppclean as it is too noisy 7884/head
Victor Julien [Tue, 20 Sep 2022 13:16:56 +0000 (15:16 +0200)] 
github-ci: disable cppclean as it is too noisy

We can reenable it after the larger cleanup efforts are complete.

2 years agoipfw: remove setting of SO_BROADCAST on the divert(4) socket
Gleb Smirnoff [Wed, 31 Aug 2022 03:12:21 +0000 (20:12 -0700)] 
ipfw: remove setting of SO_BROADCAST on the divert(4) socket

My review of the FreeBSD kernel code reveals that this setting
a) is ignored by the kernel b) is not required.  The sending
side of divert(4) never checks so->so_options, but always gives
IP_ALLOWBROADCAST to ip_output().

2 years agogithub-actions: bump ossf/scorecard-action from 1.1.2 to 2.0.3
dependabot[bot] [Mon, 12 Sep 2022 19:35:52 +0000 (19:35 +0000)] 
github-actions: bump ossf/scorecard-action from 1.1.2 to 2.0.3

Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 1.1.2 to 2.0.3.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](https://github.com/ossf/scorecard-action/compare/ce330fde6b1a5c9c75b417e7efc510b822a35564...865b4092859256271290c77adbd10a43f4779972)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years agodpdk/i40e: fix warning with number of queues for RSS configuration
Andrei Shchapaniak [Wed, 31 Aug 2022 11:23:07 +0000 (07:23 -0400)] 
dpdk/i40e: fix warning with number of queues for RSS configuration

2 years agodetect: adds flow.age keyword
Philippe Antoine [Fri, 9 Sep 2022 10:30:34 +0000 (12:30 +0200)] 
detect: adds flow.age keyword

Ticket: #5536

2 years agoflow/icmpv4: fix vlan.use-for-tracking
Philippe Antoine [Thu, 5 May 2022 07:46:01 +0000 (09:46 +0200)] 
flow/icmpv4: fix vlan.use-for-tracking

For ICMPv4 error messages the vlan ids were always considered,
even if the 'vlan.use-for-tracking' option was disabled.

Ticket: #5330

2 years agoebpf: update deprecated API calls
Sascha Steinbiss [Thu, 15 Sep 2022 13:57:13 +0000 (13:57 +0000)] 
ebpf: update deprecated API calls

This fixes build errors when libbpf 1.0 is used. It removes previously
deprecated API functions that were still in use in Suricata's eBPF
code.

2 years agopgsql: config limit maximum number of live transactions
Philippe Antoine [Fri, 2 Sep 2022 07:34:27 +0000 (09:34 +0200)] 
pgsql: config limit maximum number of live transactions

As is done for other protocols

Ticket: #5527

2 years agomqtt: remove quadratic time complexity
Philippe Antoine [Thu, 16 Jun 2022 13:14:27 +0000 (15:14 +0200)] 
mqtt: remove quadratic time complexity

When having many transactions in a single parsing call...

Fix has overhead of having one more field in the mqtt state.

Completes commit a8079dc9787d77cf705aa47000b499a325be0716

Ticket: #5399

2 years agodetect/tls: Improve tls.fingerprint rule handling
Jeff Lucovsky [Sun, 11 Sep 2022 14:00:53 +0000 (10:00 -0400)] 
detect/tls: Improve tls.fingerprint rule handling

Issue: 4581

This commit improves the runtime performance of rules with
tls.fingerprint by using the inspection logic from tls.cert_fingerprint.

2 years agodetect/uri: Remove unnecessary include
Jeff Lucovsky [Sun, 11 Sep 2022 13:50:20 +0000 (09:50 -0400)] 
detect/uri: Remove unnecessary include

This commit removes an unnecessary #include for detect-uricontent.h

2 years agodetect/build: minor code cleanup
Victor Julien [Mon, 13 Jun 2022 05:44:41 +0000 (07:44 +0200)] 
detect/build: minor code cleanup

2 years agodetect/profiling: track bytes scanned by prefilter engines
Victor Julien [Thu, 8 Sep 2022 14:47:21 +0000 (16:47 +0200)] 
detect/profiling: track bytes scanned by prefilter engines

2 years agodetect/tls: add tls.cert_chain_len keyword
Victor Julien [Tue, 30 Aug 2022 09:13:16 +0000 (11:13 +0200)] 
detect/tls: add tls.cert_chain_len keyword

2 years agoeve/tls: warn on unsupported 'custom' options
Victor Julien [Tue, 23 Aug 2022 09:23:21 +0000 (11:23 +0200)] 
eve/tls: warn on unsupported 'custom' options

2 years agotls: make SSLSetEvent a macro to help debugging
Victor Julien [Thu, 11 Aug 2022 08:09:18 +0000 (10:09 +0200)] 
tls: make SSLSetEvent a macro to help debugging

2 years agoetc/schema: clang (re)format
Victor Julien [Tue, 30 Aug 2022 10:15:31 +0000 (12:15 +0200)] 
etc/schema: clang (re)format

2 years agogithub-ci: bump cbindgen to 0.24.3
Victor Julien [Mon, 19 Sep 2022 18:55:28 +0000 (20:55 +0200)] 
github-ci: bump cbindgen to 0.24.3

This addresses issues around the AppLayerTxData type.

2 years agoflow-manager: reduce locks at startup
Victor Julien [Mon, 19 Sep 2022 18:05:31 +0000 (20:05 +0200)] 
flow-manager: reduce locks at startup

Effectively busy looping on a mutex to wait for time to be ready.

2 years agocommon: move u8_tolower to common header
Victor Julien [Fri, 16 Sep 2022 09:10:08 +0000 (11:10 +0200)] 
common: move u8_tolower to common header

2 years agohtp: remove user setup from request line callback
Victor Julien [Thu, 15 Sep 2022 15:25:49 +0000 (17:25 +0200)] 
htp: remove user setup from request line callback

This used to be the first callback that was called, but its not anymore.

Codecov confirmed that this is no longer used and therefore not useful.

2 years agoipfw: remove unused func prototype
Victor Julien [Sat, 17 Sep 2022 04:43:05 +0000 (06:43 +0200)] 
ipfw: remove unused func prototype

2 years agoapp-layer: fix compiler warning
Victor Julien [Fri, 16 Sep 2022 17:50:31 +0000 (19:50 +0200)] 
app-layer: fix compiler warning

2 years agodebug: remove empty header
Victor Julien [Tue, 24 May 2022 09:32:23 +0000 (11:32 +0200)] 
debug: remove empty header

2 years agoreputation: add ipv6 cidr test
Victor Julien [Tue, 24 May 2022 08:18:20 +0000 (10:18 +0200)] 
reputation: add ipv6 cidr test

2 years agoreputation: fix multiline test
Victor Julien [Tue, 24 May 2022 08:18:02 +0000 (10:18 +0200)] 
reputation: fix multiline test

2 years agolandlock: handle filestore case 7853/head
Eric Leblond [Thu, 4 Aug 2022 20:33:52 +0000 (22:33 +0200)] 
landlock: handle filestore case

If landlock ABI is inferior to 2 (before Linux 5.19) then the
renaming of files is impossible if the protection is enabled. This
patch disables landlock if ABI < 2 and file-store is enabled.

As file store is initialized in output the call to landlock had to
done after the output initialization.

2 years agodoc: document landlock feature
Eric Leblond [Wed, 3 Aug 2022 21:36:51 +0000 (23:36 +0200)] 
doc: document landlock feature

2 years agolandlock: basic implementation
Eric Leblond [Wed, 20 Jul 2022 09:05:57 +0000 (11:05 +0200)] 
landlock: basic implementation

This patch is adding support for Landlock, a Linux
Security Module available since Linux 5.13.

The concept is to prevent any file operation on directories where
Suricata is not supposed to access.

Landlock support is built by default if the header is present. The
feature is disabled by default and need to be activated in the YAML
to be active.

Landlock documentation: https://docs.kernel.org/userspace-api/landlock.html

Feature: #5479

2 years agodoc/http2: suricata.yaml max-streams parameter 7839/head
Philippe Antoine [Thu, 1 Sep 2022 11:47:16 +0000 (13:47 +0200)] 
doc/http2: suricata.yaml max-streams parameter

Ticket: #4949

2 years agoexceptions: add reject support to exception policy
Juliana Fajardini [Tue, 6 Sep 2022 19:16:45 +0000 (16:16 -0300)] 
exceptions: add reject support to exception policy

This enables the usage of 'reject' as an exception policy. As for both
IPS and IDS modes the intended result of sending a reject packet is to
reject the related flow, this will effectively mean setting the reject
action to the packet that triggered the exception condition, and then
dropping the associated flow.

Task #5503

2 years agodecode/tcp: allow 4 byte TFO with 2 byte cookie
Victor Julien [Mon, 5 Sep 2022 17:28:27 +0000 (19:28 +0200)] 
decode/tcp: allow 4 byte TFO with 2 byte cookie

2 years agodhcp: adds renewal-time keyword
Philippe Antoine [Thu, 25 Aug 2022 15:21:15 +0000 (17:21 +0200)] 
dhcp: adds renewal-time keyword

Ticket: #5507

2 years agodhcp: fix license in detect-dhcp-leasetime.c
Philippe Antoine [Mon, 22 Aug 2022 13:11:34 +0000 (15:11 +0200)] 
dhcp: fix license in detect-dhcp-leasetime.c

from search and replace overkill

2 years agodhcp: adds rebinding-time keyword
Philippe Antoine [Mon, 22 Aug 2022 13:10:59 +0000 (15:10 +0200)] 
dhcp: adds rebinding-time keyword

Ticket: #5506

2 years agonfs4: fix write record handling
Philippe Antoine [Fri, 17 Jun 2022 09:32:17 +0000 (11:32 +0200)] 
nfs4: fix write record handling

Ticket: #5280

2 years agodetect: function header return value clarification
Josh Soref [Tue, 9 Aug 2022 12:56:49 +0000 (08:56 -0400)] 
detect: function header return value clarification

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2 years agodcerpc: convert transaction list to vecdeque for UDP
Philippe Antoine [Wed, 24 Aug 2022 08:24:51 +0000 (10:24 +0200)] 
dcerpc: convert transaction list to vecdeque for UDP

As was done for TCP in dfe76bb90 and d745d28d4

Ticket: #5518

2 years agoipfw: use PF_DIVERT on modern FreeBSD
Gleb Smirnoff [Wed, 31 Aug 2022 03:15:31 +0000 (20:15 -0700)] 
ipfw: use PF_DIVERT on modern FreeBSD

2 years agopacketpool: fix uaf in debug validation check 7793/head
Victor Julien [Tue, 30 Aug 2022 11:08:05 +0000 (13:08 +0200)] 
packetpool: fix uaf in debug validation check

Location of the check meant access to freed packet was possible.

Move check and simplify it to just look at the packet at hand.

2 years agoflow: finish to remove obsolete counters
Philippe Antoine [Thu, 28 Apr 2022 09:37:36 +0000 (11:37 +0200)] 
flow: finish to remove obsolete counters

As was begun in b3599507f4eb891841417575587d690ea13fe6c0

Ticket: #5317

2 years agouserguide: briefly introduce exception policy opts 7791/head
Juliana Fajardini [Fri, 26 Aug 2022 16:13:09 +0000 (13:13 -0300)] 
userguide: briefly introduce exception policy opts

Added them in the configuration section so folks can be more aware of
them, while a more complete documentation isn't around.

Related to
Task #5475

2 years agouserguide: update defrag settings options
Juliana Fajardini [Fri, 26 Aug 2022 20:52:46 +0000 (17:52 -0300)] 
userguide: update defrag settings options

We were still mentioning that there were only three options.

2 years agouserguide: merge sections about AppLayer Parsers
Juliana Fajardini [Fri, 26 Aug 2022 20:19:33 +0000 (17:19 -0300)] 
userguide: merge sections about AppLayer Parsers

We had two sections under the suricata.yaml configuration section
describing settings for application layer parsers. This merges them into
one and also fixes a few subsection title levels.

Task #5364

2 years agostream: add exception policy for midstream flows
Juliana Fajardini [Wed, 17 Aug 2022 14:39:33 +0000 (11:39 -0300)] 
stream: add exception policy for midstream flows

This allows to set a midstream-policy that can:
- fail closed (stream.midstream-policy=drop-flow)
- fail open (stream.midstream-policy=pass-flow)
- bypass stream (stream.midstream-policy=bypass)
- do nothing (default behavior)

Usage and behavior:

If stream.midstream-policy is set then if Suricata identifies a midstream flow
it will apply the corresponding action associated with the policy.

No setting means Suricata will not apply such policies, either inspecting the
flow (if stream.midstream=true) or ignoring it stream.midstream=false.

Task #5468

2 years agoexceptions: add callbacks for drop-flow policy
Juliana Fajardini [Mon, 29 Aug 2022 23:32:31 +0000 (20:32 -0300)] 
exceptions: add callbacks for drop-flow policy

Make sure that when the policy is to drop the flow, we set no inspection
for payload and packet and disable applayer inspection as well.

Task #5468

2 years agosuricata.yaml: add exception policy config options
Juliana Fajardini [Mon, 22 Aug 2022 23:05:50 +0000 (20:05 -0300)] 
suricata.yaml: add exception policy config options

Related to
Task #5468

2 years agodetect: fix duplicate detect state issue 7787/head
Victor Julien [Sat, 27 Aug 2022 05:50:45 +0000 (07:50 +0200)] 
detect: fix duplicate detect state issue

For protocols with multi buffer inspection there could be multiple times
the same sid would be queued into the candidates queue. This triggered
a debug validation check.

W/o debug validation this would lead to duplicate work and possibly multiple
alerts where a single one would be appropriate.

Bug: 5419.

2 years agodetect/frames: fix too strict debug check
Victor Julien [Fri, 26 Aug 2022 18:45:33 +0000 (20:45 +0200)] 
detect/frames: fix too strict debug check

Frame::len is -1 if it is still unknown. Handle that in the debug
check.

2 years agostream/ids: make sure we don't slide past last_ack
Victor Julien [Tue, 16 Aug 2022 09:35:01 +0000 (11:35 +0200)] 
stream/ids: make sure we don't slide past last_ack

Bug: #5401.

2 years agostream: minor code cleanup
Victor Julien [Mon, 15 Aug 2022 12:37:22 +0000 (14:37 +0200)] 
stream: minor code cleanup

2 years agotls/sni: remove unused fn declaration
Shivani Bhardwaj [Mon, 8 Aug 2022 04:21:02 +0000 (09:51 +0530)] 
tls/sni: remove unused fn declaration

2 years agodoc: add description for tls.random
Shivani Bhardwaj [Wed, 27 Jul 2022 05:49:48 +0000 (11:19 +0530)] 
doc: add description for tls.random

2 years agotls: add tls.random* keywords
Shivani Bhardwaj [Tue, 26 Jul 2022 10:42:31 +0000 (16:12 +0530)] 
tls: add tls.random* keywords

Add tls.random keyword that matches on the 32 bytes of the TLS
random field for client as well as server.
Add tls.random_time keyword that matches on the first 4 bytes of the TLS
random field for client as well as server.
Add tls.random_bytes keyword that matches on the last 28 bytes of the TLS
random field for client as well as server.

All these are sticky buffers.

Feature 5190

2 years agodetect: support file.data for HTTP1 to server
Philippe Antoine [Wed, 24 Aug 2022 20:22:53 +0000 (22:22 +0200)] 
detect: support file.data for HTTP1 to server

That is file sent with POST or PUT

Ticket: #4144

2 years agoflow-manager: reduce burstiness in adaptive timing 7774/head
Victor Julien [Tue, 23 Aug 2022 16:27:30 +0000 (18:27 +0200)] 
flow-manager: reduce burstiness in adaptive timing

Previous adaptive model would have a large time range when scanning the
hash when not so busy. In the default case it would take up to 4 minutes
for a full hash scan. In case of sudden increase in business, where the
hash would fill up rapidily during a few seconds, the flow manager would
be forced to suddenly consider a much larger slice of the hash leading
to a burst of work. This burst would increase pressure on the rest of the
system leading to packet loss as the worker threads would be overloaded
with flow housekeeping tasks.

This patch reduces the max scan time to 10 seconds, and ramps up quickly
to increase the slice of the hash scanned.

2 years agoexceptions: error out when invalid policy is used 7773/head
Juliana Fajardini [Wed, 24 Aug 2022 20:36:47 +0000 (17:36 -0300)] 
exceptions: error out when invalid policy is used

Before, if an invalid value was passed as exception policy, Suricata
would log a warning and set the exception policy to "ignore". This is a
very different result, than, say, dropping or bypassing a midstream flow.

Task #5504

2 years agodetect: transforms check for 0-sized buffer
Philippe Antoine [Thu, 25 Aug 2022 15:05:41 +0000 (17:05 +0200)] 
detect: transforms check for 0-sized buffer

So as to avoid undefined behavior with a 0-sized variable length
array

Ticket: #5521

2 years agorust/smb: log uuid of interface in dcerpc 7767/head
Eric Leblond [Tue, 28 Jun 2022 13:52:04 +0000 (15:52 +0200)] 
rust/smb: log uuid of interface in dcerpc

When doing a DCERPC request, we can use the context id to log the
interface that is used. Doing that we can see in one single event
what is the DCERPC interface and opnum that are used. This allows
to have all the information needed to resolve the request to a
function call.

Feature #5413.

2 years agorust/smb/dcerpc: parse context id
Eric Leblond [Tue, 28 Jun 2022 13:50:50 +0000 (15:50 +0200)] 
rust/smb/dcerpc: parse context id

As context id is used to know to which variant of the endpoint the
request is done, it is interesting to parse it.

Feature #5413.

2 years agofuzz: disable enip detection based on source port
Philippe Antoine [Wed, 24 Aug 2022 07:51:52 +0000 (09:51 +0200)] 
fuzz: disable enip detection based on source port

So as to avoid fuzzing detecting protocol polyglots with enip

2 years agofuzz: remove check about max transactions
Philippe Antoine [Thu, 16 Jun 2022 08:58:42 +0000 (10:58 +0200)] 
fuzz: remove check about max transactions

Suricata can indeed pipeline many HTTP1 transactions

2 years agoprofiling: fix implicit-int-float-conversion warnings
Victor Julien [Thu, 25 Aug 2022 10:23:21 +0000 (12:23 +0200)] 
profiling: fix implicit-int-float-conversion warnings

2 years agopacketpool: ifdef debug check
Victor Julien [Thu, 25 Aug 2022 10:39:10 +0000 (12:39 +0200)] 
packetpool: ifdef debug check

2 years agodecode: remove unused macros, replace w/ functions
Juliana Fajardini [Tue, 23 Aug 2022 13:35:18 +0000 (10:35 -0300)] 
decode: remove unused macros, replace w/ functions

With the recent changes, these macros weren't being used anymore.

Related to
Bug #5458

2 years agostream/tcp: remove repeated header declaration
Juliana Fajardini [Mon, 8 Aug 2022 14:12:33 +0000 (11:12 -0300)] 
stream/tcp: remove repeated header declaration

StreamTcpRegisterTests was being declared twice.

2 years agodetect/alert: add unittests to check packet action
Juliana Fajardini [Mon, 1 Aug 2022 23:04:22 +0000 (20:04 -0300)] 
detect/alert: add unittests to check packet action

Add unittests to check that packet flags are correctly updated after
detection finds drop or reject rules that match.

Related to
Bug #5458

2 years agodecode: validate if dropped packet has drop reason
Juliana Fajardini [Mon, 8 Aug 2022 14:04:59 +0000 (11:04 -0300)] 
decode: validate if dropped packet has drop reason

Related to
Bug #5458

2 years agodetect/alert: ensure reject action is applied
Juliana Fajardini [Thu, 28 Jul 2022 23:05:47 +0000 (20:05 -0300)] 
detect/alert: ensure reject action is applied

Bug 5458 states that the reject action is no longer working. While SV
tests that use the reject action still pass, it indeed seems that a
regression has happened with commit aa93984, because while the
function that applies rule actions to the flow (RuleActionToFlow) does
check for the reject action, the newly added function PacketApply
SignatureActions only checks for ACTION_DROP or ACTION_PASS when
deciding to call RuleActionToFlow.

Bug #5458

2 years agodecode: make PacketDrop use action as parameter
Juliana Fajardini [Thu, 28 Jul 2022 15:04:45 +0000 (12:04 -0300)] 
decode: make PacketDrop use action as parameter

A Packet may be dropped due to several different reasons. This change
adds action as a parameter, so we can update the packet action when we
drop it, instead of setting it to drop.

Related to
Bug #5458

2 years agoluajit: fix unittests build
Eric Leblond [Wed, 24 Aug 2022 19:15:57 +0000 (21:15 +0200)] 
luajit: fix unittests build

When building with the following options:

 ./configure CC=clang --enable-luajit --enable-geoip --enable-unittests

There is a build failure:

runmode-unittests.c:234:9: error: implicit declaration of function 'LuajitSetupStatesPool' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    if (LuajitSetupStatesPool() != 0) {

2 years agouserguide: update dsize documentation/examples
jason taylor [Wed, 24 Aug 2022 12:22:02 +0000 (12:22 +0000)] 
userguide: update dsize documentation/examples

Signed-off-by: jason taylor <jtfas90@gmail.com>
2 years agogithub-actions: bump actions/cache from 3.0.7 to 3.0.8
dependabot[bot] [Mon, 22 Aug 2022 19:51:17 +0000 (19:51 +0000)] 
github-actions: bump actions/cache from 3.0.7 to 3.0.8

Bumps [actions/cache](https://github.com/actions/cache) from 3.0.7 to 3.0.8.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/a7c34adf76222e77931dedbf4a45b2e4648ced19...fd5de65bc895cf536527842281bea11763fefd77)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years agoprotocol-change: sets event in case of failure
Philippe Antoine [Mon, 25 Apr 2022 06:23:53 +0000 (08:23 +0200)] 
protocol-change: sets event in case of failure

Protocol change can fail if one protocol change is already
occuring.

Ticket: #5509

2 years agosmb: do not use tree id to match create request and response 7744/head
Philippe Antoine [Thu, 2 Sep 2021 09:40:45 +0000 (11:40 +0200)] 
smb: do not use tree id to match create request and response

As an SMB2 async response does not have a tree id, even if
the request has it.

Per spec, MessageId should be enough to identifiy a message request
and response uniquely across all messages that are sent on the same
SMB2 Protocol transport connection.
So, the tree id is redundant anyways.

Ticket: #5508

2 years agogithub: update Rust versions 7730/head
Victor Julien [Thu, 18 Aug 2022 13:05:46 +0000 (15:05 +0200)] 
github: update Rust versions

2 years agogithub: bump ubuntu-18.04 runners to 22.04
Victor Julien [Thu, 18 Aug 2022 12:27:54 +0000 (14:27 +0200)] 
github: bump ubuntu-18.04 runners to 22.04

2 years agodhcp: adds leasetime keyword
Philippe Antoine [Mon, 4 Jul 2022 12:25:33 +0000 (14:25 +0200)] 
dhcp: adds leasetime keyword

As it is logged

Ticket: #5435

2 years agoapp-layer: don't wrap around on port 65535
Jason Ish [Tue, 9 Aug 2022 18:21:31 +0000 (12:21 -0600)] 
app-layer: don't wrap around on port 65535

A port value of 65535 caused the port value to wrap-around to 0
resulting in an infinite loop.

Fixes: 53fc70a9a73c ("protodetect: fix int warnings")
2 years agogithub-actions: bump actions/cache from 3.0.6 to 3.0.7
dependabot[bot] [Thu, 11 Aug 2022 19:35:50 +0000 (19:35 +0000)] 
github-actions: bump actions/cache from 3.0.6 to 3.0.7

Bumps [actions/cache](https://github.com/actions/cache) from 3.0.6 to 3.0.7.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3.0.6...a7c34adf76222e77931dedbf4a45b2e4648ced19)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years agorust: set MSRV to 1.58.1
Victor Julien [Wed, 17 Aug 2022 07:37:50 +0000 (09:37 +0200)] 
rust: set MSRV to 1.58.1

Ticket: #4163.

2 years agodetect/parse: test sig parsing for more actions
Juliana Fajardini [Mon, 15 Aug 2022 18:57:58 +0000 (15:57 -0300)] 
detect/parse: test sig parsing for more actions

Our unittests were only covering sig parsing for alert actions. As in
environments without LibNet the reject action will not work, we must
ensure that our parser properly fails in such cases, instead of silently
accepting an unsupported action.

Added tests for the reject and drop action.

Task #5496

2 years agodoc/conf: fix sphinx language setting 7720/head
Shivani Bhardwaj [Fri, 12 Aug 2022 09:46:14 +0000 (15:16 +0530)] 
doc/conf: fix sphinx language setting

sphinx-build 5.1.1 and above throws a warning which is treated as an
error while building.

Invalid configuration value found: 'language = None'. Update your configuration to a valid language code. Falling back to 'en' (English).

2 years agohttp2: remove to_vec for comparisons 7713/head
Philippe Antoine [Sun, 24 Jul 2022 19:54:24 +0000 (21:54 +0200)] 
http2: remove to_vec for comparisons

Ticket: #5454

2 years agohttp2: fix clippy warning about &Vec<u8>
Philippe Antoine [Wed, 3 Aug 2022 06:29:40 +0000 (08:29 +0200)] 
http2: fix clippy warning about &Vec<u8>

Using &[u8] instead in function prototype

2 years agoeve/schema: add smtp url bool fields
Shivani Bhardwaj [Wed, 29 Jun 2022 11:22:10 +0000 (16:52 +0530)] 
eve/schema: add smtp url bool fields

2 years agosmtp/mime: fix url extraction when no config is set
Eric Leblond [Sat, 18 Jun 2022 13:33:43 +0000 (15:33 +0200)] 
smtp/mime: fix url extraction when no config is set

2 years agoeve/email: log existing url type
Eric Leblond [Sun, 19 Dec 2021 23:36:52 +0000 (00:36 +0100)] 
eve/email: log existing url type

MIME parsing was setting flag on URL to indicate their
estimated type. This patch attach the information to
the email object so the user can extract interesting
email directly:

```
  "email": {
    "status": "PARSE_DONE",
    "from": "Eric Leblond <regit@regit.org>",
    "to": [
      "eric@regit.org"
    ],
    "has_ipv6_url": false,
    "has_ipv4_url": false,
    "has_exe_url": true,
    "url": [
      "http://www.toto.com",
      "http://perdu.com.",
      "https://hacke.me/pown.exe"
    ]
  }
```

2 years agoutil/mime: add some extensions to exe list
Eric Leblond [Mon, 20 Dec 2021 00:02:40 +0000 (01:02 +0100)] 
util/mime: add some extensions to exe list

2 years agodoc: Document SCByteVarGet lua function
Benjamin Wilkins [Wed, 3 Nov 2021 17:20:06 +0000 (13:20 -0400)] 
doc: Document SCByteVarGet lua function

Add documentation for accessing results from byte_extract and byte_math
in lua match functions

Issue: 2871

2 years agolua: Expose byte extract to lua match scripts
Benjamin Wilkins [Tue, 26 Oct 2021 19:20:41 +0000 (15:20 -0400)] 
lua: Expose byte extract to lua match scripts

Allow lua match scripts to access variables defined in rule by
byte_extract or byte_math

Issue: 2871

2 years agoike: log ikev1 tx fields instead of state ones
Philippe Antoine [Sun, 24 Jul 2022 20:18:29 +0000 (22:18 +0200)] 
ike: log ikev1 tx fields instead of state ones

As state fields can grow abitrarily, and this can lead to DOS
by quadratic complexity (CPU time and disk space)

Adds a direction field to retain all the information in the
transaction.

Also checks array vendor_ids had at least one element before
logging it.

Ticket: #5455

2 years agoike: rustfmt
Philippe Antoine [Sun, 31 Jul 2022 13:50:26 +0000 (15:50 +0200)] 
ike: rustfmt

2 years agogithub-ci: add AlmaLinux 9 build
Jason Ish [Mon, 8 Aug 2022 19:17:01 +0000 (13:17 -0600)] 
github-ci: add AlmaLinux 9 build

2 years agogithub-ci: test execution of suricatasc and suricata-update
Jason Ish [Sun, 7 Aug 2022 16:24:56 +0000 (10:24 -0600)] 
github-ci: test execution of suricatasc and suricata-update

2 years agopython: install without distutils
Jason Ish [Tue, 3 May 2022 18:34:57 +0000 (12:34 -0600)] 
python: install without distutils

Instead of using distutils/setuptools for installing the Python code,
just install it into our own Python directory.

Distutils is being removed from Python, and setuptools doesn't work well
when trying to install into your own location. For our usage its just
simpler to install with make.

In addition to removing the configure check for distutils, also remove
the check for pyyaml. This lets the user install pyyaml after Suricata
is installed, and Suricata-Update does handle this case gracefully.

Issue: #5313

3 years agodetect/tls: fix descriptions 7703/head
Eric Leblond [Thu, 4 Aug 2022 14:21:27 +0000 (16:21 +0200)] 
detect/tls: fix descriptions

Most keywords were presented as content modifiers when they
were in fact sticky buffers.

3 years agonetmap: fix includes
Victor Julien [Sat, 6 Aug 2022 08:06:58 +0000 (10:06 +0200)] 
netmap: fix includes

3 years agogithub-actions: bump actions/cache from 3.0.5 to 3.0.6
dependabot[bot] [Fri, 5 Aug 2022 20:05:18 +0000 (20:05 +0000)] 
github-actions: bump actions/cache from 3.0.5 to 3.0.6

Bumps [actions/cache](https://github.com/actions/cache) from 3.0.5 to 3.0.6.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/0865c47f36e68161719c5b124609996bb5c40129...f4278025ab0f432ce369118909e46deec636f50c)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years agobundle.sh: comment line fixup
Jason Ish [Tue, 3 May 2022 19:36:11 +0000 (13:36 -0600)] 
bundle.sh: comment line fixup

Accept lines that start with a hash, but not immediately followed by a
space as a comment as well.