]> git.ipfire.org Git - thirdparty/suricata.git/log
thirdparty/suricata.git
2 years agodetect: remove unused data struct 7954/head 7957/head
Victor Julien [Thu, 29 Sep 2022 11:09:52 +0000 (13:09 +0200)] 
detect: remove unused data struct

2 years agoeve/schema: flow/stream updates
Victor Julien [Fri, 23 Sep 2022 21:07:04 +0000 (23:07 +0200)] 
eve/schema: flow/stream updates

2 years agoflow/worker: process injected flows more gradually
Victor Julien [Mon, 26 Sep 2022 07:54:37 +0000 (09:54 +0200)] 
flow/worker: process injected flows more gradually

Worker threads are responsible for final processing of timed out flows.
These are selected by the Flow Manager and inserted into a per thread
queue. The Flow Worker then checks this queue after each packet. Due to
the burstiness of this process, the packet threads would sometimes process
a lot of these flows in the context of a single packet, leading to spike
in latency which might cause packet loss.

This patch changes the behavior to only process at max 2 flows per packet.
This way added processing cost is amortized over many packets.

2 years agoflow: count max number of injected flows in workers
Victor Julien [Sun, 25 Sep 2022 09:40:21 +0000 (11:40 +0200)] 
flow: count max number of injected flows in workers

2 years agostream: reduce pool locking overhead
Victor Julien [Fri, 23 Sep 2022 20:54:52 +0000 (22:54 +0200)] 
stream: reduce pool locking overhead

Add thread local cache to avoid locking overhead for ssns and segments.

A thread will return segments/ssns to a local cache first, and if that
is full, to a return queue where the actual return to the pool returns
a batch, to amortize locking overhead.

Adds segment and session pool/cache counters to see where how effective
the cache is.

2 years agostream: minor test cleanup
Victor Julien [Sat, 24 Sep 2022 19:08:30 +0000 (21:08 +0200)] 
stream: minor test cleanup

2 years agococci: fix python issues
Victor Julien [Wed, 21 Sep 2022 08:17:38 +0000 (10:17 +0200)] 
cocci: fix python issues

2 years agofiles: only call loggers is there is work to do
Victor Julien [Wed, 21 Sep 2022 07:34:08 +0000 (09:34 +0200)] 
files: only call loggers is there is work to do

2 years agofilestore: remove obsolete checks
Victor Julien [Wed, 21 Sep 2022 06:48:37 +0000 (08:48 +0200)] 
filestore: remove obsolete checks

2 years agofilestore: fix empty file not opening, but trying to close
Victor Julien [Wed, 21 Sep 2022 06:46:46 +0000 (08:46 +0200)] 
filestore: fix empty file not opening, but trying to close

2 years agoapp-layer: reduce app cleanup and output-tx calls
Victor Julien [Sat, 17 Sep 2022 09:25:22 +0000 (11:25 +0200)] 
app-layer: reduce app cleanup and output-tx calls

Track packets that updated the app-layer, and for those run
the transaction housekeeping and output-tx logging loops.

Do the same of end of flow packets.

This skips needless iterations over the transaction stores.

2 years agooutput/tx: minor cleanups/optimizations
Victor Julien [Sun, 18 Sep 2022 08:10:28 +0000 (10:10 +0200)] 
output/tx: minor cleanups/optimizations

2 years agosrc: includes cleanup
Victor Julien [Fri, 16 Sep 2022 09:08:21 +0000 (11:08 +0200)] 
src: includes cleanup

Work towards making `suricata-common.h` only introduce system headers
and other things that are independent of complex internal Suricata
data structures.

Update files to compile after this.

Remove special DPDK handling for strlcpy and strlcat, as this caused
many compilation failures w/o including DPDK headers for all files.

Remove packet macros from decode.h and move them into their own file,
turn them into functions and rename them to match our function naming
policy.

2 years agodetect: clean up detect-engine-state.h
Victor Julien [Thu, 15 Sep 2022 18:51:54 +0000 (20:51 +0200)] 
detect: clean up detect-engine-state.h

Remove prototypes that are not about purely the data structures.

2 years agodetect: remove wrapper func
Victor Julien [Thu, 15 Sep 2022 18:07:28 +0000 (20:07 +0200)] 
detect: remove wrapper func

2 years agodetect: move DetectTransaction to header its used in
Victor Julien [Thu, 15 Sep 2022 18:04:34 +0000 (20:04 +0200)] 
detect: move DetectTransaction to header its used in

2 years agodetect/files: optimize file.data by skipping non-file txs
Victor Julien [Thu, 15 Sep 2022 08:54:02 +0000 (10:54 +0200)] 
detect/files: optimize file.data by skipping non-file txs

As well as 'file' txs not in our direction.

Implement the same logic for file.name and file.magic prefilter engines.

2 years agofiles/tx: inspection, logging and loop optimizations
Victor Julien [Wed, 14 Sep 2022 13:38:04 +0000 (15:38 +0200)] 
files/tx: inspection, logging and loop optimizations

Introduce AppLayerTxData::file_tx as direction(s) indicator for transactions.
When set to 0, its not a file tx and it will not be considered for file
inspection, logging and housekeeping tasks.

Various tx loop optimizations in housekeeping and output.

Update the "file capable" app-layers to set the fields based on their
directional file support as well as on the traffic.

2 years agodetect/tx: add AppLayerTxData to PrefilterTx
Victor Julien [Thu, 15 Sep 2022 08:45:46 +0000 (10:45 +0200)] 
detect/tx: add AppLayerTxData to PrefilterTx

In preparation of some file inspection optimizations, for which we need the
tx data.

Update all users.

2 years agofiles: remove unused code
Victor Julien [Tue, 23 Aug 2022 15:51:26 +0000 (17:51 +0200)] 
files: remove unused code

2 years agofiles: don't set NOSTORE in 'store all' case
Victor Julien [Mon, 22 Aug 2022 17:16:06 +0000 (19:16 +0200)] 
files: don't set NOSTORE in 'store all' case

2 years agosmtp: remove bad tests
Victor Julien [Sat, 5 Feb 2022 08:31:34 +0000 (09:31 +0100)] 
smtp: remove bad tests

2 years agoapp-layer: move files into transactions
Victor Julien [Sat, 5 Feb 2022 08:20:07 +0000 (09:20 +0100)] 
app-layer: move files into transactions

Update APIs to store files in transactions instead of the per flow state.

Goal is to avoid the overhead of matching up files and transactions in
cases where there are many of both.

Update all protocol implementations to support this.

Update file logging logic to account for having files in transactions. Instead
of it acting separately on file containers, it is now tied into the
transaction logging.

Update the filestore keyword to consider a match if filestore output not
enabled.

2 years agoapp-layer: trunc parser per direction
Victor Julien [Sat, 5 Feb 2022 07:53:58 +0000 (08:53 +0100)] 
app-layer: trunc parser per direction

2 years agoapp-layer: parser flags to u16
Victor Julien [Fri, 19 Aug 2022 08:49:41 +0000 (10:49 +0200)] 
app-layer: parser flags to u16

2 years agoapp-layer: specify direction in tx cleanup
Victor Julien [Fri, 19 Aug 2022 09:08:04 +0000 (11:08 +0200)] 
app-layer: specify direction in tx cleanup

In preparation of per tx files storage.

2 years agoapp-layer: introduce common AppLayerStateData API
Victor Julien [Mon, 26 Apr 2021 12:36:32 +0000 (14:36 +0200)] 
app-layer: introduce common AppLayerStateData API

Add per state structure for storing flags and other variables.

2 years agofile: minor debug updates
Victor Julien [Fri, 10 Jun 2022 06:02:03 +0000 (08:02 +0200)] 
file: minor debug updates

2 years agofile: clean up file flags handling
Victor Julien [Fri, 10 Jun 2022 06:01:15 +0000 (08:01 +0200)] 
file: clean up file flags handling

2 years agofiles: debug log flags
Victor Julien [Thu, 10 Jun 2021 19:06:54 +0000 (21:06 +0200)] 
files: debug log flags

2 years agolua: store id with tx ptr
Victor Julien [Thu, 10 Jun 2021 17:55:38 +0000 (19:55 +0200)] 
lua: store id with tx ptr

2 years agouserguide: Add rule file globbing option details 7948/head
jason taylor [Wed, 21 Sep 2022 20:26:32 +0000 (20:26 +0000)] 
userguide: Add rule file globbing option details

Signed-off-by: jason taylor <jtfas90@gmail.com>
2 years agogithub-actions: bump codecov/codecov-action from 3.1.0 to 3.1.1
dependabot[bot] [Sat, 24 Sep 2022 05:47:57 +0000 (05:47 +0000)] 
github-actions: bump codecov/codecov-action from 3.1.0 to 3.1.1

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/81cd2dc8148241f03f5839d295e000b8f761e378...d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years agogithub-actions: bump ossf/scorecard-action from 2.0.3 to 2.0.4
dependabot[bot] [Wed, 28 Sep 2022 19:38:15 +0000 (19:38 +0000)] 
github-actions: bump ossf/scorecard-action from 2.0.3 to 2.0.4

Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.0.3 to 2.0.4.
- [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/865b4092859256271290c77adbd10a43f4779972...e363bfca00e752f91de7b7d2a77340e2e523cb18)

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

Signed-off-by: dependabot[bot] <support@github.com>
2 years agodecode-ipv4: adjust validation to RFC
Sascha Steinbiss [Thu, 22 Sep 2022 13:13:05 +0000 (15:13 +0200)] 
decode-ipv4: adjust validation to RFC

RFC1108 only specifies a minimum field length of 3, not
a fixed length of 11.

2 years agodecode-ipv4: implement extended security option
Sascha Steinbiss [Thu, 22 Sep 2022 13:10:47 +0000 (15:10 +0200)] 
decode-ipv4: implement extended security option

IP option 0x85 (extended security) is mentioned in the
documentation for the ipopts keyword but was not implemented.

2 years agoci: build with -Wimplicit-int-conversion
Philippe Antoine [Tue, 27 Sep 2022 14:01:28 +0000 (16:01 +0200)] 
ci: build with -Wimplicit-int-conversion

Seems to have got lost on the way in CFLAGS

2 years agossl: fix compiler warning
Philippe Antoine [Tue, 27 Sep 2022 13:47:06 +0000 (15:47 +0200)] 
ssl: fix compiler warning

implicit conversion loses integer precision: 'int' to 'uint16_t'
because C shifts << translates automatically to signed integers

2 years agorust: lock to time 0.3.13 to avoid MSRV bump to 1.59
Victor Julien [Fri, 26 Aug 2022 12:12:44 +0000 (14:12 +0200)] 
rust: lock to time 0.3.13 to avoid MSRV bump to 1.59

Indirect dependency through x509-parser.

2 years agorust: remove nom 5 dependency
Pierre Chifflier [Wed, 19 Jan 2022 14:56:50 +0000 (15:56 +0100)] 
rust: remove nom 5 dependency

2 years agorust/applayertemplate: convert to nom7
Pierre Chifflier [Wed, 19 Jan 2022 14:06:21 +0000 (15:06 +0100)] 
rust/applayertemplate: convert to nom7

2 years agorust/asn1: convert parsers to nom7
Pierre Chifflier [Wed, 19 Jan 2022 14:06:05 +0000 (15:06 +0100)] 
rust/asn1: convert parsers to nom7

2 years agorust/x509: finish transition to nom7
Pierre Chifflier [Wed, 19 Jan 2022 13:30:54 +0000 (14:30 +0100)] 
rust/x509: finish transition to nom7

2 years agorust/telnet: convert parsers to nom7
Pierre Chifflier [Wed, 19 Jan 2022 13:28:30 +0000 (14:28 +0100)] 
rust/telnet: convert parsers to nom7

2 years agorust/conf: convert parser to nom7
Pierre Chifflier [Wed, 19 Jan 2022 13:26:57 +0000 (14:26 +0100)] 
rust/conf: convert parser to nom7

2 years agorust/ssh: finish transition to nom7
Pierre Chifflier [Wed, 19 Jan 2022 13:21:46 +0000 (14:21 +0100)] 
rust/ssh: finish transition to nom7

2 years agorust/rdp: convert parsers to nom7
Pierre Chifflier [Wed, 19 Jan 2022 13:11:26 +0000 (14:11 +0100)] 
rust/rdp: convert parsers to nom7

2 years agorust/rdp: upgrade dependency on tls-parser
Pierre Chifflier [Wed, 12 Jan 2022 09:56:20 +0000 (10:56 +0100)] 
rust/rdp: upgrade dependency on tls-parser

2 years agorust: upgrade versions of BER/DER, Kerberos and SNMP parsers
Pierre Chifflier [Tue, 11 Jan 2022 14:50:55 +0000 (15:50 +0100)] 
rust: upgrade versions of BER/DER, Kerberos and SNMP parsers

2 years agorust: update x509-parser to 0.14.0
Jason Ish [Mon, 11 Apr 2022 17:22:06 +0000 (11:22 -0600)] 
rust: update x509-parser to 0.14.0

Resolves RustSec issues in time and chrono:
- https://rustsec.org/advisories/RUSTSEC-2020-0071
- https://rustsec.org/advisories/RUSTSEC-2020-0159

Ticket: #5259.

Ammended by Victor Julien to bump to 0.14 instead of 0.13.

2 years agorust/x509: update dependency on x509-parser
Pierre Chifflier [Mon, 1 Nov 2021 13:44:11 +0000 (14:44 +0100)] 
rust/x509: update dependency on x509-parser

2 years agostream: fix reachable assertion 7934/head
Victor Julien [Mon, 26 Sep 2022 15:14:39 +0000 (17:14 +0200)] 
stream: fix reachable assertion

Fix `Flow::thread_id` not always getting properly set up, leading to
a reachable assertion.

Bug #4582.

2 years agouserguide: add section about exception policies 7921/head
Juliana Fajardini [Thu, 15 Sep 2022 23:07:54 +0000 (20:07 -0300)] 
userguide: add section about exception policies

This describes briefly what the exception policies are, what is the
engine's behavior, what options are available and to which parts are
they implemented.

Task #5475
Task #5515

2 years agouserguide: minor rewording and typo fixes
Juliana Fajardini [Fri, 2 Sep 2022 17:27:15 +0000 (14:27 -0300)] 
userguide: minor rewording and typo fixes

Some of these were recently introduced, some were highlited after the
applayer sections got merged. Some paragraphs seem to have been changed
due to trying to respect character limits for lines. Also includes a
typo pointed out by one of our community members via Discord.

2 years agostream/tcp: typo fix
Juliana Fajardini [Fri, 16 Sep 2022 18:12:06 +0000 (15:12 -0300)] 
stream/tcp: typo fix

2 years agodetect: update ttl debug log messages
jason taylor [Wed, 21 Sep 2022 20:46:59 +0000 (20:46 +0000)] 
detect: update ttl debug log messages

Signed-off-by: jason taylor <jtfas90@gmail.com>
2 years agodetect/stream_size: Rename detect.rs to stream_size.rs
Jeff Lucovsky [Thu, 25 Aug 2022 14:44:50 +0000 (10:44 -0400)] 
detect/stream_size: Rename detect.rs to stream_size.rs

This commit renames detect.rs to stream_size.rs to reflect its content.

2 years agodetect/iprep: Move iprep logic into a separate module
Jeff Lucovsky [Thu, 25 Aug 2022 14:39:34 +0000 (10:39 -0400)] 
detect/iprep: Move iprep logic into a separate module

2 years agodetect/uri: Move uri logic into a separate module
Jeff Lucovsky [Thu, 25 Aug 2022 14:32:19 +0000 (10:32 -0400)] 
detect/uri: Move uri logic into a separate module

2 years agodetect/uint: Move uint logic into a separate module
Jeff Lucovsky [Thu, 25 Aug 2022 14:27:00 +0000 (10:27 -0400)] 
detect/uint: Move uint logic into a separate module

This commit moves the uint logic into its own module.

2 years agodoc/byte_math: Add byte_math differences with snort
Jeff Lucovsky [Tue, 2 Aug 2022 15:12:02 +0000 (11:12 -0400)] 
doc/byte_math: Add byte_math differences with snort

Issue: 5077

2 years agodoc: Fixup byte* entries to display tables properly
Jeff Lucovsky [Tue, 2 Aug 2022 15:11:27 +0000 (11:11 -0400)] 
doc: Fixup byte* entries to display tables properly

2 years agorust/detect: Create detect module for rule parsing
Jeff Lucovsky [Sun, 31 Jul 2022 14:45:38 +0000 (10:45 -0400)] 
rust/detect: Create detect module for rule parsing

This commit creates a module named "detect" for rule parsing logic. As
part of this commit, detect.rs is moved from its toplevel position into
the new module. Thus, use crate::detect::detect to refer to items within
detect.rs (instead of create::detect).

Ticket: 5077

2 years agodetect/bytemath: convert parser to Rust
Jeff Lucovsky [Wed, 8 Jun 2022 12:03:44 +0000 (08:03 -0400)] 
detect/bytemath: convert parser to Rust

Issue: 5077

This commit
- Converts the PCRE based parser to Rust.
- Adds unit tests to the new Rust modules
- Removes the PCRE parser from detect-bytemath.c
- Adjusts the C source modules to refer to the Rust definitions
- Includes the multiply operator (missing from the C parser)

2 years agolog: fix coverity warning
Philippe Antoine [Fri, 23 Sep 2022 06:50:43 +0000 (08:50 +0200)] 
log: fix coverity warning

CID 1515529

Checks ftell return value for negative/error

2 years agogithub-ci/codecov: add rust coverage support 7922/head
Victor Julien [Thu, 22 Sep 2022 15:24:38 +0000 (17:24 +0200)] 
github-ci/codecov: add rust coverage support

Based on Rust 1.63 and LLVM 14. Update the jobs to meet those requirements.

Includes the bundled libhtp coverage now, including libhtp tests.

Ticket: #4278.

2 years agotls: handle incomplete header sooner 7902/head
Victor Julien [Wed, 21 Sep 2022 17:56:45 +0000 (19:56 +0200)] 
tls: handle incomplete header sooner

Make sure to exit the parser early on incomplete header data.

Additionally, make sure to not create duplicated tls frames in this
case.

Add a debug validation check for the header parser parsing too much
data, which should never happen.

2 years agossl: add debug validation check for incomplete api
Victor Julien [Wed, 7 Sep 2022 18:51:18 +0000 (20:51 +0200)] 
ssl: add debug validation check for incomplete api

2 years agodebug: add bool string print helper macro
Victor Julien [Wed, 7 Sep 2022 06:38:07 +0000 (08:38 +0200)] 
debug: add bool string print helper macro

2 years agotls: improve record checks
Victor Julien [Wed, 7 Sep 2022 06:32:05 +0000 (08:32 +0200)] 
tls: improve record checks

Improve unknown record handling. Inspired by Wireshark 'unknown record'
handling, we take a best effort approach for records with unknown content
types in TLS versions 1.0, 1.1 and 1.2.

Improve record length check and set 'invalid_record_length' event instead
of 'invalid_tls_header'.

2 years agotls: improve versions extension logic
Victor Julien [Wed, 7 Sep 2022 05:31:38 +0000 (07:31 +0200)] 
tls: improve versions extension logic

Skip over unusable versions like GREASE.

2 years agotls: make version and size checks stricter
Victor Julien [Tue, 6 Sep 2022 12:03:46 +0000 (14:03 +0200)] 
tls: make version and size checks stricter

This way bad records won't buffer lots of stream data.

2 years agoeve/schema: add tls client logging
Victor Julien [Tue, 23 Aug 2022 10:01:18 +0000 (12:01 +0200)] 
eve/schema: add tls client logging

2 years agotls: store cert data in heap buffer
Victor Julien [Mon, 29 Aug 2022 07:25:26 +0000 (09:25 +0200)] 
tls: store cert data in heap buffer

Cert chain is a list of pointers into this buffer, so can't use a
stream slice approach.

2 years agoeve/tls: implement client cert logging
Victor Julien [Tue, 23 Aug 2022 09:35:41 +0000 (11:35 +0200)] 
eve/tls: implement client cert logging

Enable client logging in extended mode.

Add "client", "client_certificate" and "client_chain", where the latter two
depend on "client".

2 years agotls: parse client certificates
Victor Julien [Tue, 23 Aug 2022 09:32:24 +0000 (11:32 +0200)] 
tls: parse client certificates

Parse client cerificates and store them in the state similar to how
this is done for server certificates.

Update "progress" handling to not consider the TLS handshake complete
if the server indicated a client cert was needed.

2 years agotls: prepare for client cert parsing
Victor Julien [Tue, 23 Aug 2022 09:31:08 +0000 (11:31 +0200)] 
tls: prepare for client cert parsing

2 years agoeve/tls: prepare for client cert logging
Victor Julien [Tue, 23 Aug 2022 09:24:41 +0000 (11:24 +0200)] 
eve/tls: prepare for client cert logging

Code cleanups that work on per direction "connp" instead of hard coding
to the server side.

2 years agotls: make cert handling more generic
Victor Julien [Tue, 23 Aug 2022 05:19:38 +0000 (07:19 +0200)] 
tls: make cert handling more generic

In preparation for client cert handling.

2 years agotls: avoid tls.invalid_handshake_message FP
Victor Julien [Mon, 22 Aug 2022 08:49:34 +0000 (10:49 +0200)] 
tls: avoid tls.invalid_handshake_message FP

Don't set TLS_DECODER_EVENT_INVALID_HANDSHAKE_MESSAGE event on encrypted
handshake messages.

2 years agotls: don't set 2 events for a single exception
Victor Julien [Thu, 11 Aug 2022 10:18:28 +0000 (12:18 +0200)] 
tls: don't set 2 events for a single exception

Keep the more specific ones.

2 years agotls: remove incomplete tests
Victor Julien [Thu, 11 Aug 2022 13:25:11 +0000 (15:25 +0200)] 
tls: remove incomplete tests

These tests are incompatible with the incomplete API usage and should
have been pcap based tests in the first place.

2 years agotls: set event if record size exceeds limit
Victor Julien [Mon, 8 Aug 2022 10:02:22 +0000 (12:02 +0200)] 
tls: set event if record size exceeds limit

2 years agotls: support server hello done message
Victor Julien [Wed, 10 Aug 2022 15:44:44 +0000 (17:44 +0200)] 
tls: support server hello done message

2 years agotls: support handshake fragmentation
Victor Julien [Fri, 5 Aug 2022 20:27:22 +0000 (22:27 +0200)] 
tls: support handshake fragmentation

Implement TLS record defrag for handshake messages.

Ticket: #5183.

2 years agotls: remove certificate buffering code
Victor Julien [Fri, 5 Aug 2022 12:39:57 +0000 (14:39 +0200)] 
tls: remove certificate buffering code

TCP Buffering is now done in the app-layer using the incomplete API, on
the SSL/TLS record level. TLS level fragmentation will be implemented
separately.

2 years agotls: parse handshake protocol records in single pass
Victor Julien [Mon, 8 Aug 2022 10:23:37 +0000 (12:23 +0200)] 
tls: parse handshake protocol records in single pass

2 years agosslv2: use version from client hello
Victor Julien [Wed, 7 Sep 2022 05:37:46 +0000 (07:37 +0200)] 
sslv2: use version from client hello

Remove streaming code that is now unused.

Incomplete handling makes this record parsing work on full data.

2 years agossl: implement 'incomplete' handling for SSLv2
Victor Julien [Thu, 18 Aug 2022 08:51:35 +0000 (10:51 +0200)] 
ssl: implement 'incomplete' handling for SSLv2

2 years agotls: streaming mode for application records
Victor Julien [Wed, 7 Sep 2022 07:43:19 +0000 (09:43 +0200)] 
tls: streaming mode for application records

To avoid overhead of stream buffering for records we don't do
much with anyway, pass through application records instead of
buffering the entire record in the stream engine.

2 years agotls: use incomplete API to get full TLS records
Victor Julien [Fri, 5 Aug 2022 10:03:37 +0000 (12:03 +0200)] 
tls: use incomplete API to get full TLS records

The TLS record header is parsed in streaming mode still, but once the
record size is known we tell the app-layer API to give us the full
record.

Ticket: #5481

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