Commit Graph

12369 Commits (a049a6c29cda6903bdb9f23618631df2cae97c10)
 

Author SHA1 Message Date
Philippe Antoine a049a6c29c 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 ago
Philippe Antoine 78cf9cfc5f http: range: remove assert that can happen 3 years ago
Philippe Antoine 8e8899c90c 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 ago
Philippe Antoine 65a6f61004 http: delete obsolete range log
Commit d776d72711
has been transfering ownership of file container

So, we cannot log it
3 years ago
Philippe Antoine 9b3c355c20 fuzz: adds one target with predefined rules 3 years ago
Philippe Antoine c06c4a663e lgtm: adds build instructions to get lgtm to work
LGTM is a statis analysis tool
3 years ago
Jason Ish df0ed6fda4 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 ago
Philippe Antoine 3a230c2208 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 ago
Juliana Fajardini fc958e9e89 userguide: update wiresharkwiki in public datasets 3 years ago
Juliana Fajardini dbeb8bfa1f doc/devguide: add few more explanations & details 3 years ago
Juliana Fajardini 2cd25e8105 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 ago
Juliana Fajardini f65b3908ed devguide/transactions: add TSL_STATE enum snippet 3 years ago
Juliana Fajardini d6c5dfacc7 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 ago
Juliana Fajardini 84311ab151 devguide/transactions: fix wordings 3 years ago
Juliana Fajardini 2f3cee2429 devguide/code-style: fix typo in banned functions 3 years ago
Juliana Fajardini 6c7f06b001 workflows: add mscgen to Ubuntu 18.04 Cocci builds 3 years ago
Juliana Fajardini a5b344e015 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 ago
Philippe Antoine 066a3d619e fuzz: updates README
Uses main oss-fuzz repository

More complete flags proposition for direct compilation
3 years ago
Philippe Antoine cb30772372 style: remove latest warnings
about unused variables
3 years ago
Philippe Antoine f6ba3699bb flowint: same analysis warnings as flowbits 3 years ago
Philippe Antoine 1dc98cad27 pcre2: remove PCRE1 from CI 3 years ago
Philippe Antoine bce3c46874 pcre2: remove PCRE1 as dependency 3 years ago
Philippe Antoine 56f664af6b pcre2: follow code naming style 3 years ago
Philippe Antoine e10d930660 pcre2: only one DetectParseRegex structure 3 years ago
Philippe Antoine 2a1690e110 pcre2: move header include to suricata-common only 3 years ago
Philippe Antoine fae7389ae2 pcre2: document the behavioral changes 3 years ago
Philippe Antoine 48dd0cf804 pcre2: check for PCRE2_ERROR_UNSET
Needs maybe to be generalized
3 years ago
Philippe Antoine 3de99a214c pcre2: migrate keywords parsing 3 years ago
Philippe Antoine 2dea9a1e37 pcre: use pcre2 to parse detect pcre itself 3 years ago
Philippe Antoine f0f3295ba0 pcre: migrate detect-pcre to pcre2
pcre2 substrings need special free...
3 years ago
Philippe Antoine 3633c48e6e pcre2: migrate utility uses of pcre 3 years ago
Philippe Antoine 95a07c8957 pcre2: migrate transform pcrexform 3 years ago
Philippe Antoine acb1ab08a2 pcre2: introduce as a new depdendency 3 years ago
Philippe Antoine 98f84d5a9b http2: follow range requests
Move the content-range parsing code to rust
3 years ago
Philippe Antoine bded2ec92e 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.
3 years ago
Philippe Antoine 3b9a4f9f19 range: no final zero in key
for future compatibility with rust
3 years ago
Philippe Antoine 56fae072b2 http2: better rust lifetimes
so that borrow check gets happy
3 years ago
Philippe Antoine a1f9e0c97a rust: rename to StreamingBufferConfig as in C 3 years ago
Philippe Antoine 7819f3262f http: more consistent return values for HTPFileOpenWithRange 3 years ago
Philippe Antoine bb7cc6f5e3 http: increase tracked files for ranges as well 3 years ago
Philippe Antoine d776d72711 http: range transfering ownership of file container
To make concurrency reasoning clearer
3 years ago
Philippe Antoine 3ed38d2d5d http: avoid one lock for range append data
Better structure design to ensure that one flow maximum
is owning and appending into the file, adding fileOwning field.

Adds also a gap field in a range buffer, so that we can
feed the gap on closing, when we are protected from concurrency
by a lock, (lock which got removed in the append path)

Fixes memcap when encountering a duplicate while inserting
in red and black tree

Adds many comments
3 years ago
Victor Julien 2ef857e533 thash: add debug validation check for use_cnt 3 years ago
Victor Julien 7a797631e0 http/range: cleanup and simplification
Simplify locking by using the THashData lock instead of a separate
range lock.

Avoid size_t in function arguments.

Clean up file handling functions.

Implement handling of alloc errors.

Rename yaml entry to byterange

Unify public api naming
3 years ago
Victor Julien 5ffc9622b3 http/range: optimize struct layout 3 years ago
Victor Julien fc5632664c http/range: fix memory leak on out of order ranges 3 years ago
Philippe Antoine e82416a415 http/range: reassemble files from different flows with range
adds a container, ie a thread safe hash table whose
key is the filename

keep a tree of unordered ranges, up to a memcap limit

adds HTPFileOpenWithRange to handle like HTPFileOpen
if there is a range : open 2 files, one for the whole reassembled,
and one only for the current range
3 years ago
Philippe Antoine 5cb996efcf util: export Djb2 hash string function 3 years ago
Philippe Antoine f0012f97b2 util: adds util function SCBufferCmp
Compares two buffers with their two sizes
3 years ago
Victor Julien 13a6eb3522 detect: suppress scan-build warning 3 years ago