]> git.ipfire.org Git - thirdparty/suricata.git/log
thirdparty/suricata.git
3 years agodetect-rfb-secresult: convert unittest to FAIL/PASS APIs 6582/head
Modupe Falodun [Tue, 2 Nov 2021 21:18:51 +0000 (22:18 +0100)] 
detect-rfb-secresult: convert unittest to FAIL/PASS APIs

Bug: #4055

3 years agodetect-sameip: convert unittests to FAIL/PASS APIs
Modupe Falodun [Mon, 1 Nov 2021 20:19:47 +0000 (21:19 +0100)] 
detect-sameip: convert unittests to FAIL/PASS APIs

Bug: #4057

3 years agodetect/event: convert unittests to FAIL/PASS APIs
Sam Muhammed [Mon, 1 Nov 2021 12:18:55 +0000 (14:18 +0200)] 
detect/event: convert unittests to FAIL/PASS APIs

Task #4025

3 years agopacketpool: reset PacketRelease on return to pool 6581/head
Victor Julien [Fri, 5 Nov 2021 19:05:43 +0000 (20:05 +0100)] 
packetpool: reset PacketRelease on return to pool

Reset PacketRelease callback to make sure its not set to a capture
specific callback.

As an example:

  0x000055e00af09d35 in AFPReleaseDataFromRing (p=0x7f1d884cb830) at source-af-packet.c:653
  0x000055e00af09dd0 in AFPReleasePacket (p=0x7f1d884cb830) at source-af-packet.c:678
  0x000055e00ab53d7e in TmqhOutputPacketpool (t=0x55e00fb79250, p=0x7f1d884cb830) at tmqh-packetpool.c:465
  0x000055e00af08dec in TmThreadsSlotProcessPkt (tv=0x55e00fb79250, s=0x55e012134790, p=0x7f1d884cb830) at tm-threads.h:201
  0x000055e00af08e70 in TmThreadsCaptureInjectPacket (tv=0x55e00fb79250, p=0x7f1d884cb830) at tm-threads.h:221
  0x000055e00af08f2e in TmThreadsCaptureHandleTimeout (tv=0x55e00fb79250, p=0x0) at tm-threads.h:245
  0x000055e00af0ba76 in ReceiveAFPLoop (tv=0x55e00fb79250, data=0x7f1d884ccb60, slot=0x55e01198e4b0) at source-af-packet.c:1321
  0x000055e00ab55257 in TmThreadsSlotPktAcqLoop (td=0x55e00fb79250) at tm-threads.c:312
  0x00007f1dca9d5609 in start_thread (arg=<optimized out>) at pthread_create.c:477
  0x00007f1dca7c6293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Here the packet was a pseudo packet to handle a timeout condition. But
the ReleasePacket callback was still set to AFPReleasePacket from a
previous use of the Packet.

Bug: #4807.

3 years agodetect/payload: convert unittests to FAIL/PASS APIs
Sam Muhammed [Wed, 3 Nov 2021 13:10:52 +0000 (15:10 +0200)] 
detect/payload: convert unittests to FAIL/PASS APIs

Task #4026

3 years agodetect-gid: convert unittests to FAIL/PASS APIs
Modupe Falodun [Thu, 4 Nov 2021 20:35:06 +0000 (21:35 +0100)] 
detect-gid: convert unittests to FAIL/PASS APIs

Bug: #4041

3 years agoutil/unittests: delete PASS_IF macro
Juliana Fajardini [Tue, 2 Nov 2021 18:22:51 +0000 (18:22 +0000)] 
util/unittests: delete PASS_IF macro

The logic flow we want to achieve with unittests, where first we have
all FAIL statements and then just one PASS statement could become more
convoluted with the existence of the PASS_IF macro. Besides, what could
be written as a FAIL_IF might in some cases be written in not so clear
ways with the PASS_IF option available.

Also: fix inverted check values in documentation, update copyright year

Optimization: #4795

3 years agodetect/dsize: convert unittests to FAIL/PASS API
Juliana Fajardini [Tue, 2 Nov 2021 18:27:42 +0000 (18:27 +0000)] 
detect/dsize: convert unittests to FAIL/PASS API

Also: change them to comply with the deletion of PASS_IF macro &
condense checks for invalid dsizes in one test, have all checks on same
valid dsize happen in a single test.

Task: #4021

3 years agounittests (assorted): remove PASS_IF macro
Juliana Fajardini [Thu, 28 Oct 2021 19:39:45 +0000 (20:39 +0100)] 
unittests (assorted): remove PASS_IF macro

Also small documentation clean up and test adjusments where that
was needed.

affected: counters, decode-vntag, detect-mark

Related to #4795

3 years agodevguide: add page about rust unittests
Juliana Fajardini [Wed, 3 Nov 2021 11:20:36 +0000 (11:20 +0000)] 
devguide: add page about rust unittests

Part of the task to offer better guidance on how and when to write
unit tests or suricata-verify tests
Also updated linking and index files, as well as testing page to refer
to the unit tests pages

Doc: #4590

3 years agodevguide: repurpose unittests page to unittests-c
Juliana Fajardini [Wed, 3 Nov 2021 10:59:20 +0000 (10:59 +0000)] 
devguide: repurpose unittests page to unittests-c

Part of ongoing task to add more guidance on how to create unittests
and suricata-verify tests for suri. There will also be a unittests-rust
page.

Doc: #4590

3 years agodevguide: add page about testing
Juliana Fajardini [Wed, 29 Sep 2021 13:40:14 +0000 (14:40 +0100)] 
devguide: add page about testing

This page offers guidance about when to use unittests or s-v tests,
and how to create input for those. Also lists other common ways to test
Suri, such as fuzzing and the CI checks.

Doc: #4590

3 years agorust/tftp: convert parser to nom7 functions
Pierre Chifflier [Mon, 1 Nov 2021 13:34:34 +0000 (14:34 +0100)] 
rust/tftp: convert parser to nom7 functions

3 years agorust/dns: convert parser to nom7 functions
Pierre Chifflier [Sat, 30 Oct 2021 14:38:51 +0000 (16:38 +0200)] 
rust/dns: convert parser to nom7 functions

3 years agorust/ssh: convert parser to nom7 functions
Pierre Chifflier [Sat, 30 Oct 2021 14:32:38 +0000 (16:32 +0200)] 
rust/ssh: convert parser to nom7 functions

3 years agorust/mqtt: convert parser to nom7 functions
Pierre Chifflier [Sat, 30 Oct 2021 14:30:04 +0000 (16:30 +0200)] 
rust/mqtt: convert parser to nom7 functions

3 years agorust/sip: convert parser to nom7 functions
Pierre Chifflier [Thu, 2 Sep 2021 08:00:09 +0000 (10:00 +0200)] 
rust/sip: convert parser to nom7 functions

3 years agorust/ftp: convert parser to nom7 functions
Pierre Chifflier [Wed, 1 Sep 2021 15:49:27 +0000 (17:49 +0200)] 
rust/ftp: convert parser to nom7 functions

3 years agorust/dhcp: convert parser to nom7 functions
Pierre Chifflier [Wed, 1 Sep 2021 15:09:42 +0000 (17:09 +0200)] 
rust/dhcp: convert parser to nom7 functions

3 years agorust: add nom7 dependency
Pierre Chifflier [Wed, 1 Sep 2021 14:38:51 +0000 (16:38 +0200)] 
rust: add nom7 dependency

3 years agorust: remove unnecessary nested match 6552/head
Modupe Falodun [Sun, 31 Oct 2021 16:59:53 +0000 (17:59 +0100)] 
rust: remove unnecessary nested match

Bug: #4605

3 years agorust: fix inherent to string
Modupe Falodun [Sun, 31 Oct 2021 16:31:52 +0000 (17:31 +0100)] 
rust: fix inherent to string

Bug: OISF#4618

3 years agorust(lint): use is_null() instead of ptr::null_mut()
Sam Muhammed [Tue, 19 Oct 2021 02:02:42 +0000 (04:02 +0200)] 
rust(lint): use is_null() instead of ptr::null_mut()

Bug: #4594

3 years agorust(lint): use is_null() instead of ptr::null()
Sam Muhammed [Sun, 17 Oct 2021 23:26:41 +0000 (01:26 +0200)] 
rust(lint): use is_null() instead of ptr::null()

Bug: #4594

3 years agorust(lint): use let for binding single value
Sam Muhammed [Sun, 24 Oct 2021 03:36:11 +0000 (05:36 +0200)] 
rust(lint): use let for binding single value

`match` is better used with binding to multiple variables,
for binding to a single value, `let` statement is recommended.

Bug: #4616

3 years agodetect-engine: convert unittests to FAIL/PASS APIs
Sam Muhammed [Thu, 28 Oct 2021 02:42:38 +0000 (04:42 +0200)] 
detect-engine: convert unittests to FAIL/PASS APIs

3 years agoflow: immediately evict tcp reused flows 6539/head
Victor Julien [Tue, 26 Oct 2021 09:09:51 +0000 (11:09 +0200)] 
flow: immediately evict tcp reused flows

Since we already know we're going to no longer use it, might as well
evict it right away.

3 years agoflow/bypass: clear memory on bypass
Victor Julien [Mon, 25 Oct 2021 17:15:23 +0000 (19:15 +0200)] 
flow/bypass: clear memory on bypass

Previously the flow would hold on to the app-layer and segment data
until the end of the flow, even though it would never be accessed again.

This patch clears app-layer and stream data, but not stream ssn as its
used in flow logging.

Bug: #4778.

3 years agoflow/bypass: add util func to check if flow is bypassed
Victor Julien [Mon, 25 Oct 2021 18:25:39 +0000 (20:25 +0200)] 
flow/bypass: add util func to check if flow is bypassed

To hide the ifdefs for capture offload.

3 years agoflow/worker: run housekeeping for bypassed packets
Victor Julien [Mon, 25 Oct 2021 17:14:49 +0000 (19:14 +0200)] 
flow/worker: run housekeeping for bypassed packets

Run flow eviction and flow inject queues for bypassed packets as well,
to avoid a scenario where these won't get run at all if too much of the
traffic is bypassed.

Bug: #4779.

3 years agoflow/manager: remove obsolete code
Victor Julien [Mon, 25 Oct 2021 20:12:01 +0000 (22:12 +0200)] 
flow/manager: remove obsolete code

3 years agoflow/bypass: use_cnt desync'd on bypassed flows
Victor Julien [Wed, 20 Oct 2021 11:20:32 +0000 (13:20 +0200)] 
flow/bypass: use_cnt desync'd on bypassed flows

Locally bypassed flows had unsafe updates to `Flow::use_cnt` leading to a race
issue. For a packet it would do the flow lookup, attach the flow to the packet,
increment the `use_cnt`. Then it would detect that the flow is in the bypass
state, and unlock it while holding a reference (so alos not decrementing the
`use_cnt`). When the packet was then returned to the packet pool, the flow would
be disconnected from the packet, which would decrement `use_cnt` without holding
the flow lock.

This patch addresses this issue by disconnecting the flow from the packet
immediately when the bypassed state is detected. This moves the `use_cnt`
decrement to within the lock.

Bug: #4766.

3 years agopcrexform: use substring and not whole match 6518/head
Philippe Antoine [Thu, 21 Oct 2021 13:28:17 +0000 (15:28 +0200)] 
pcrexform: use substring and not whole match

3 years agotftp: StringToAppProto case 6506/head
Philippe Antoine [Wed, 20 Oct 2021 08:56:44 +0000 (10:56 +0200)] 
tftp: StringToAppProto case

So, fuzz_applayerparserparse_tftp will fuzz tftp

3 years agorange: checks that end is after start for HTTP2 6492/head
Philippe Antoine [Tue, 19 Oct 2021 10:38:49 +0000 (12:38 +0200)] 
range: checks that end is after start for HTTP2

As was done only for HTTP1 in previous commit

The verification part stays separated from the parsing part,
as we want to keep on logging invalid ranges values.

3 years agoqueue.h: suppress scan-build warnings 6478/head
Jason Ish [Tue, 12 Oct 2021 14:41:42 +0000 (08:41 -0600)] 
queue.h: suppress scan-build warnings

If running under scan-build, use our own implementations of all
the macros which include some code to satisfy scan-build
warnings.

3 years agorange: move back files ownership in one case
Philippe Antoine [Thu, 14 Oct 2021 19:31:13 +0000 (21:31 +0200)] 
range: move back files ownership in one case

In the case, we receive a range request with expected
overlap then new bytes, but the response does not get to the
new bytes, we are still skipping, but the HttpRangeContainerBlock
had the ownership of the files, and need to give it back

3 years agorange: checks that end is after start
Philippe Antoine [Wed, 13 Oct 2021 19:07:27 +0000 (21:07 +0200)] 
range: checks that end is after start

Otherwise, we end up allocating too much memory

3 years agoloopback: decodes IPv6 from all OSes
Philippe Antoine [Tue, 12 Oct 2021 07:04:59 +0000 (09:04 +0200)] 
loopback: decodes IPv6 from all OSes

As does wireshark

3 years agoike: do not keep server transforms in state 6469/head
Philippe Antoine [Mon, 21 Jun 2021 08:50:12 +0000 (10:50 +0200)] 
ike: do not keep server transforms in state

Fixes #4534

Now, only the tx with the transforms will match
with ike.chosen_sa_attribute

3 years agomodbus: tx iterator
Philippe Antoine [Thu, 7 Oct 2021 12:31:29 +0000 (14:31 +0200)] 
modbus: tx iterator

When there are a lot of open transactions, as is possible with
modbus, the default tx_iterator will loop for the whole
transacations vector to find each transaction, that means
quadratic complexity.

Reusing the tx_iterator from the template, and keeping as a state
the last index where to start looking avoids this quadratic
complexity.

3 years agoutil: avoid calling snprintf in PrintStringsToBuffer
Philippe Antoine [Thu, 7 Oct 2021 12:30:56 +0000 (14:30 +0200)] 
util: avoid calling snprintf in PrintStringsToBuffer

As we print only one character

3 years agohttp2: enable by default, even if not in config 6468/head
Philippe Antoine [Sun, 10 Oct 2021 20:17:48 +0000 (22:17 +0200)] 
http2: enable by default, even if not in config

3 years agohttp2: enable by default 6464/head
Philippe Antoine [Thu, 30 Sep 2021 13:32:42 +0000 (15:32 +0200)] 
http2: enable by default

3 years agohttp2: null check during upgrade
Philippe Antoine [Mon, 23 Aug 2021 13:03:51 +0000 (15:03 +0200)] 
http2: null check during upgrade

3 years agoapp-layer: disable by default if not in configuration
Philippe Antoine [Wed, 6 Oct 2021 18:57:09 +0000 (20:57 +0200)] 
app-layer: disable by default if not in configuration

DNP3, ENIP, HTTP2 and Modbus are supposed to be disabled
by default. That means the default configuration does it,
but that also means that, if they are not in suricata.yaml,
the protocol should stay disabled.

3 years agoqueue.h: wrap the system sys/queue.h 6455/head
Jason Ish [Wed, 6 Oct 2021 16:53:46 +0000 (10:53 -0600)] 
queue.h: wrap the system sys/queue.h

Instead of using local implementations for the queue.h macro,
wrap the system provided queue.h and then adding missing
features as needed.

The idea is that Suricata when integrated with another library
that includes sys/queue.h can look at the same source of truth
for these macros.

But not all operating systems include a queue.h with the same
features, and some don't include it at all, like Windows. So
on Windows this will be a full implementation of all the queue.h
features Suricata needs.

3 years agoalert: fixes leak in ThresholdHandlePacketRule 6449/head
Philippe Antoine [Tue, 5 Oct 2021 19:14:18 +0000 (21:14 +0200)] 
alert: fixes leak in ThresholdHandlePacketRule

ThresholdHandlePacketRule may take ownership of an allocated
DetectThresholdEntry, and places it in a position of the
array th_entry. But it never got released

3 years agofuzz: target must use the rules it parsed
Philippe Antoine [Tue, 5 Oct 2021 18:47:30 +0000 (20:47 +0200)] 
fuzz: target must use the rules it parsed

DetectEngineReloadThreads does not work for the fuzz targets
as there is no_of_detect_tvs = 0 as we did not register
real threads and slots.

So, we force the flow worker module to use the newly detect engine
conetxt with all it needs

3 years agogithub-ci: pin macos build to 10.15 6445/head
Jason Ish [Tue, 5 Oct 2021 16:44:03 +0000 (10:44 -0600)] 
github-ci: pin macos build to 10.15

There is currently a build failure with macos-latest (recently updated)
to 11 in the libhtp test suite code. Not sure if there are other
build issues in libhtp or Suricata at this time.

3 years agogithub-ci: use sccache for gcc in commits workflow 6444/head
Jason Ish [Tue, 5 Oct 2021 15:47:11 +0000 (09:47 -0600)] 
github-ci: use sccache for gcc in commits workflow

Previously was only used for Rust.

3 years agoflow: free spare pool more aggressively 6438/head
Victor Julien [Mon, 4 Oct 2021 14:01:47 +0000 (16:01 +0200)] 
flow: free spare pool more aggressively

The flows exceeding the spare pools config setting would be freed
per at max 100 flows a second. After a high speed test this would
lead to excessive memory use for a long time.

This patch updates the logic to free 10% of the excess flows per
run, freeing multiple blocks of flows as needed.

Bug: #4731.

3 years agothreading: force break loop on flow inject
Victor Julien [Mon, 4 Oct 2021 07:24:51 +0000 (09:24 +0200)] 
threading: force break loop on flow inject

Track availability of break loop callback to avoid overhead.

3 years agoflow: process evicted flows on low/no traffic
Victor Julien [Fri, 1 Oct 2021 11:20:02 +0000 (13:20 +0200)] 
flow: process evicted flows on low/no traffic

In a scenario where there was suddenly no more traffic flowing, flows
in a threads `flow_queue` would not be processed. The easiest way to
see this would be in a traffic replay scenario. After the replay is done
no more packets come in and these evicted flows got stuck.

In workers mode, the capture part handles timeout this was updated to
take the `ThreadVars::flow_queue` into account.

The autofp mode the logic that puts a flow into a threads `flow_queue`
would already wake a thread up, but the `flow_queue` was then ignored.
This has been updated to take the `flow_queue` into account.

In both cases a "capture timeout" packet is pushed through the pipeline
to "flush" the queues.

Bug: #4722.

3 years agothreading: minor cleanups
Victor Julien [Sun, 3 Oct 2021 12:54:17 +0000 (14:54 +0200)] 
threading: minor cleanups

3 years agounittests/template: Register template unittests 6436/head
Jeff Lucovsky [Thu, 29 Apr 2021 12:55:45 +0000 (08:55 -0400)] 
unittests/template: Register template unittests

3 years agounittests/enip: Register ENIP unittests
Jeff Lucovsky [Thu, 29 Apr 2021 12:49:50 +0000 (08:49 -0400)] 
unittests/enip: Register ENIP unittests

3 years agopcre: fixes a memory leak on alloc error 6434/head
Philippe Antoine [Fri, 1 Oct 2021 13:55:19 +0000 (15:55 +0200)] 
pcre: fixes a memory leak on alloc error

3 years agohttp2: do not try to upgrade if http2 is disabled in config 6433/head
Philippe Antoine [Wed, 15 Sep 2021 14:22:00 +0000 (16:22 +0200)] 
http2: do not try to upgrade if http2 is disabled in config

3 years agohttp2: flatten code style
Philippe Antoine [Wed, 15 Sep 2021 14:20:56 +0000 (16:20 +0200)] 
http2: flatten code style

3 years agoprotodetect: handle all gaps, even when depth is reached
Philippe Antoine [Mon, 23 Aug 2021 14:31:42 +0000 (16:31 +0200)] 
protodetect: handle all gaps, even when depth is reached

3 years agoreadthedocs: add configuration file
Jason Ish [Thu, 30 Sep 2021 14:02:03 +0000 (08:02 -0600)] 
readthedocs: add configuration file

3 years agopcre: local match data for pcrexform
Philippe Antoine [Thu, 30 Sep 2021 13:23:15 +0000 (15:23 +0200)] 
pcre: local match data for pcrexform

3 years agopcre: use thread-storage for matches
Philippe Antoine [Thu, 30 Sep 2021 13:13:13 +0000 (15:13 +0200)] 
pcre: use thread-storage for matches

3 years agopcre: using de_ctx in unit tests for free function
Philippe Antoine [Thu, 30 Sep 2021 14:25:45 +0000 (16:25 +0200)] 
pcre: using de_ctx in unit tests for free function

3 years agopcre: creates a match structure per match run
Philippe Antoine [Thu, 30 Sep 2021 07:23:46 +0000 (09:23 +0200)] 
pcre: creates a match structure per match run

So that DetectPcrePayloadMatch is thread safe
and does not rewrite a shared parse_regex.match structure

3 years agohttp: range: remove assert that can happen
Philippe Antoine [Wed, 29 Sep 2021 15:22:57 +0000 (17:22 +0200)] 
http: range: remove assert that can happen

3 years agohttp2: range: check return value when opening
Philippe Antoine [Wed, 29 Sep 2021 15:06:55 +0000 (17:06 +0200)] 
http2: range: check return value when opening

HttpRangeContainerOpenFile can return NULL
so, http2_range_open can set file_range to NULL
And we should check this before calling http2_range_close

3 years agohttp: delete obsolete range log
Philippe Antoine [Wed, 29 Sep 2021 14:33:32 +0000 (16:33 +0200)] 
http: delete obsolete range log

Commit d776d72711800168cda5d62a7cc4669abda379be
has been transfering ownership of file container

So, we cannot log it

3 years agofuzz: adds one target with predefined rules 6424/head
Philippe Antoine [Wed, 29 Sep 2021 13:44:52 +0000 (15:44 +0200)] 
fuzz: adds one target with predefined rules

3 years agolgtm: adds build instructions to get lgtm to work
Philippe Antoine [Fri, 4 Jun 2021 08:21:40 +0000 (10:21 +0200)] 
lgtm: adds build instructions to get lgtm to work

LGTM is a statis analysis tool

3 years agoaf-packet: use configured cluster-id when checking for fanout
Jason Ish [Fri, 16 Oct 2020 15:43:29 +0000 (09:43 -0600)] 
af-packet: use configured cluster-id when checking for fanout

When testing for fanout support a cluster-id of 1 was always being
used instead of the configured cluster-id. This limited fanout
support to only one Suricata instance.

Instead of hardcoding an ID of 1, use the configured cluster-id.

Also make cluster_id a uint16_t instead of an int in AFPThreadVars.

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

3 years agoipv6: simpler generic overlap condition
Philippe Antoine [Fri, 10 Sep 2021 12:16:57 +0000 (14:16 +0200)] 
ipv6: simpler generic overlap condition

This also changes the behavior, as the condition is checked in
every case cf ipv6-malformed-fragments-8

3 years agouserguide: update wiresharkwiki in public datasets
Juliana Fajardini [Thu, 23 Sep 2021 14:33:36 +0000 (15:33 +0100)] 
userguide: update wiresharkwiki in public datasets

3 years agodoc/devguide: add few more explanations & details
Juliana Fajardini [Thu, 23 Sep 2021 11:55:48 +0000 (12:55 +0100)] 
doc/devguide: add few more explanations & details

3 years agodevguide/app-layer: rename /img dir to /diagrams
Juliana Fajardini [Tue, 31 Aug 2021 14:37:09 +0000 (15:37 +0100)] 
devguide/app-layer: rename /img dir to /diagrams

Semantically speaking it makes more sense, because it stores `msc`
files for dynamic image generation.
Updated files that refered to `img` accordingly, too.

3 years agodevguide/transactions: add TSL_STATE enum snippet
Juliana Fajardini [Tue, 31 Aug 2021 14:22:22 +0000 (15:22 +0100)] 
devguide/transactions: add TSL_STATE enum snippet

3 years agodevguide/transactions: update & refine diagrams
Juliana Fajardini [Tue, 31 Aug 2021 10:04:53 +0000 (11:04 +0100)] 
devguide/transactions: update & refine diagrams

- DNS sequence diagram was incorrect (transactions should be
unidirectional). After changing it, it made sense to rename the file.
Adjusted spacing, too. Updated transactions.rst accordingly.
- TLS sequence diagram was refined to illustrate how Suricata actually
implements the protocol.

3 years agodevguide/transactions: fix wordings
Juliana Fajardini [Thu, 26 Aug 2021 12:30:18 +0000 (13:30 +0100)] 
devguide/transactions: fix wordings

3 years agodevguide/code-style: fix typo in banned functions
Juliana Fajardini [Thu, 26 Aug 2021 11:37:33 +0000 (12:37 +0100)] 
devguide/code-style: fix typo in banned functions

3 years agoworkflows: add mscgen to Ubuntu 18.04 Cocci builds
Juliana Fajardini [Fri, 25 Jun 2021 14:09:09 +0000 (15:09 +0100)] 
workflows: add mscgen to Ubuntu 18.04 Cocci builds

3 years agodoc/devguide: add Transactions documentation page
Juliana Fajardini [Wed, 10 Mar 2021 11:14:32 +0000 (11:14 +0000)] 
doc/devguide: add Transactions documentation page

A guide on what is a transaction for Suricata engine, focusing on
developers.
- What's the purpose of a transaction;
- transaction states and API callbacks;
- Examples and sequence diagrams.
- doc/devguide: add transactions.rst
- doc/devguide/extending/app-layer/index.rst: add transactions.rst

3 years agofuzz: updates README
Philippe Antoine [Fri, 24 Sep 2021 06:22:09 +0000 (08:22 +0200)] 
fuzz: updates README

Uses main oss-fuzz repository

More complete flags proposition for direct compilation

3 years agostyle: remove latest warnings
Philippe Antoine [Fri, 24 Sep 2021 13:42:50 +0000 (15:42 +0200)] 
style: remove latest warnings

about unused variables

3 years agoflowint: same analysis warnings as flowbits
Philippe Antoine [Fri, 24 Sep 2021 13:42:41 +0000 (15:42 +0200)] 
flowint: same analysis warnings as flowbits

3 years agopcre2: remove PCRE1 from CI 6417/head
Philippe Antoine [Tue, 28 Sep 2021 10:09:41 +0000 (12:09 +0200)] 
pcre2: remove PCRE1 from CI

3 years agopcre2: remove PCRE1 as dependency 6414/head
Philippe Antoine [Tue, 28 Sep 2021 10:10:10 +0000 (12:10 +0200)] 
pcre2: remove PCRE1 as dependency

3 years agopcre2: follow code naming style
Philippe Antoine [Mon, 20 Sep 2021 20:02:50 +0000 (22:02 +0200)] 
pcre2: follow code naming style

3 years agopcre2: only one DetectParseRegex structure
Philippe Antoine [Mon, 20 Sep 2021 20:00:00 +0000 (22:00 +0200)] 
pcre2: only one DetectParseRegex structure

3 years agopcre2: move header include to suricata-common only
Philippe Antoine [Mon, 20 Sep 2021 19:07:40 +0000 (21:07 +0200)] 
pcre2: move header include to suricata-common only

3 years agopcre2: document the behavioral changes
Philippe Antoine [Tue, 25 May 2021 11:41:02 +0000 (13:41 +0200)] 
pcre2: document the behavioral changes

3 years agopcre2: check for PCRE2_ERROR_UNSET
Philippe Antoine [Mon, 12 Apr 2021 13:41:27 +0000 (15:41 +0200)] 
pcre2: check for PCRE2_ERROR_UNSET

Needs maybe to be generalized

3 years agopcre2: migrate keywords parsing
Philippe Antoine [Sun, 11 Apr 2021 08:37:00 +0000 (10:37 +0200)] 
pcre2: migrate keywords parsing

3 years agopcre: use pcre2 to parse detect pcre itself
Philippe Antoine [Wed, 7 Apr 2021 08:58:17 +0000 (10:58 +0200)] 
pcre: use pcre2 to parse detect pcre itself

3 years agopcre: migrate detect-pcre to pcre2
Philippe Antoine [Mon, 5 Apr 2021 15:41:12 +0000 (17:41 +0200)] 
pcre: migrate detect-pcre to pcre2

pcre2 substrings need special free...

3 years agopcre2: migrate utility uses of pcre
Philippe Antoine [Tue, 13 Apr 2021 12:08:09 +0000 (14:08 +0200)] 
pcre2: migrate utility uses of pcre

3 years agopcre2: migrate transform pcrexform
Philippe Antoine [Tue, 13 Apr 2021 12:02:28 +0000 (14:02 +0200)] 
pcre2: migrate transform pcrexform

3 years agopcre2: introduce as a new depdendency
Philippe Antoine [Tue, 13 Apr 2021 12:01:49 +0000 (14:01 +0200)] 
pcre2: introduce as a new depdendency

3 years agohttp2: follow range requests 6409/head
Philippe Antoine [Tue, 7 Sep 2021 12:54:57 +0000 (14:54 +0200)] 
http2: follow range requests

Move the content-range parsing code to rust

3 years agorange: post process out of order blocks
Philippe Antoine [Tue, 7 Sep 2021 12:52:36 +0000 (14:52 +0200)] 
range: post process out of order blocks

A block is determined out of order on opening.
But on closing, the gap before it may have been filled.
So, we must post-process it, ie iterate over the red and black
tree so see what blocks we can get.