Compilation of xdp_lb.c was failing in some case with the following
error:
/usr/include/x86_64-linux-gnu/gnu/stubs.h:7:11: fatal error: 'gnu/stubs-32.h' file not found
This patch add some define to be able to skip recursive inclusion of
header files leading to the problem.
(cherry picked from commit dfe5785bfa)
This commit updates the documentation of the SCFlow* function names
available to Lua scripts.
Formerly, they used the prefix "Sc"; now they use "SC".
(cherry picked from commit 25e9483168)
This commit adds additional Lua API interfaces to bring consistency to
functions such that the `SC` prefix is available consistently across
flow int and flow var functions.
(cherry picked from commit 431018d6f7)
Instead of calculating the MD5 at the end of every part, only
compute it when parsing is complete.
With libnss, the hash never updates after the first HASH_End, so
the md5 of only the first part of the body is logged, rather than
the md5 of all the parts.
Redmine issue:
https://redmine.openinfosecfoundation.org/issues/4245
All builds have been using the same cache id for ~/.cargo which
could lead us to conflict situations which is what I think we are
seeing with the commit-check job.
(cherry picked from commit 49ca070446)
Instead of building cbindgen in every build, build it once
during prep as a static musl binary to avoid library issues.
(cherry picked from commit 1f1a765132)
Removing the libhtp, suricata-update and suricata-verify directories
before uploading the artifact reduces the upload time from minutes
to seconds.
(cherry picked from commit f945acf733)
Without this, a simple typo between : and ; is able to hide actual bugs
in rules.
I discovered 2 bugs in ET open ruleset this way.
(cherry picked from commit 10ea60a237)
This commit improves handling of TCP fast open options
- Option length must be in [6, 18]
- Option length must be an even value
(cherry picked from commit f8fef0dd05)
When a flow is swapped it also swaps the stream trackers, so it does
not make sense to reverse them during pseudo packet creation.
(cherry picked from commit 49bd1f85b9)
Base64Encode function requires the maximum length of the output string
as its last parameter. Use the macro BASE64_BUFFER_SIZE to calculate it
correctly.
The size of encoded_data array and the maximum output length parameter
to Base64Encode function were incorrect leading to buffer overflow for
certain cases. The algorithm requires at least 5 bytes of space to even
convert a string of length 1.
Use BASE64_BUFFER_SIZE macro to correctly calculate this output length.
Set size of encoded_data array to the calculated output length.
Maximum length of a base64 encoded string can be 33% over the actual
length of the input string. The formula to best cover all the edge cases
is mathematically
(4 * (input_length + 2) / 3) + 1
Add a macro to calculate this for a given input length.
Removes the use of PCRE for performance
Forbids empty negations after a valid pattern
Forbids mixing negative and positive forms as it is irrelevant
Forbids useless repetition of a version
Even when the rules are only applied on traffic with the protocol
the structure for the protocol header can be set to NULL if there
was an error parsing the header