If CONCURRENCY_LEVEL was set, the script would log a concurrency level
even if the parallel command was not available. Not log if parallel is
not available and set concurrency to 1.
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.
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.
These tests are covered by Github actions and removing
them may speed up the Travis builds to get results sooner.
Its still worth keeping some of these builds as they test
more compile time options than the Github Actions currently
do.
WHen adding something like
/* coccinelle: AppLayerParserStateIssetFlag():4,2:APP_LAYER_PARSER_ */
the coccinelle check will consider that AppLayerParserStateIssetFlag
is taking 4 parameters and that the second one is a flag that needs
to be checked against APP_LAYER_PARSER_.
Coccinelle test was doing a false positive on the function
AppLayerParserStateSetFlag and AppLayerParserStateIssetFlag.
To address that, this patch adds a new coccinelle markup:
/* coccinelle: AppLayerParserStateSetFlag():2,2:APP_LAYER_PARSER_ */
It indicates that AppLayerParserStateSetFlag is a setter and getter
and that the checks should be disabled inside the function.
Currently this markup is only used for that but following patch will
add some checks on option value.
bzero(3): The bzero() function is deprecated (marked as LEGACY in
POSIX.1-2001); use memset(3) in new programs. POSIX.1-2008 removes
the specification of bzero().
Use memset instead.
Replace index by strchr and rindex by strrchr.
index(3) states "POSIX.1-2008 removes the specifications of index() and
rindex(), recommending strchr(3) and strrchr(3) instead."
Add index/rindex to banned function check so they don't get reintroduced.
Bug #1443.
Issue on Ubuntu 19.04.
==18655== Conditional jump or move depends on uninitialised value(s)
==18655== at 0x5454603: hs_alloc_scratch (in /usr/lib/x86_64-linux-gnu/libhs.so.5.1.0)
==18655== by 0x3D5C9A: SCHSPreparePatterns (util-mpm-hs.c:707)
==18655== by 0x215FEC: DetectMpmPrepareBuiltinMpms (detect-engine-mpm.c:364)
==18655== by 0x20813A: SigGroupBuild (detect-engine-build.c:1932)
==18655== by 0x21287B: SigLoadSignatures (detect-engine-loader.c:366)
==18655== by 0x35A702: LoadSignatures (suricata.c:2419)
==18655== by 0x35B0DD: PostConfLoadedDetectSetup (suricata.c:2574)
==18655== by 0x35C827: main (suricata.c:2986)
https://github.com/intel/hyperscan/issues/148
For example, when I put the contents of a git worktree into
a Docker image for a test build .git will not be a directory
causing the run_check.sh script to fail.
Add a test that check an inversion during keyword setup where
we add a sigmatch to a signature and then do error handling on it.
This was causing a double free of some elements and ultimately a
segfault.
Proposed-by: Victor Julien <victor@inliniac.net>