Commit Graph

14503 Commits (a3c8105ac4e3956b208911ece38f2e6a3f724381)
 

Author SHA1 Message Date
Jeff Lucovsky b21a4ded6e config/pf-ring: Recognize and set add'l cluster types
This commit extends the pf-ring config parser to recognize the
additional cluster types:
- cluster_inner_flow
- cluster_inner_flow_2_tuple
- cluster_inner_flow_4_tuple
- cluster_inner_flow_5_tuple

Issue: 5975
1 year ago
Jeff Lucovsky 0ac3bee423 pf-ring: Add add'l cluster types
This commit adds preprocessor values for additional pf-ring
cluster-types:
- CLUSTER_INNER_FLOW
- CLUSTER_INNER_FLOW_2_TUPLE
- CLUSTER_INNER_FLOW_4_TUPLE
- CLUSTER_INNER_FLOW_5_TUPLE

Issue: 5975
1 year ago
Jeff Lucovsky 62f4049705 config/pfring: Document add'l pf-ring cluster types
This commit adds additional cluster-types for use with the pf-ring
packet source.

Issue: 5975
1 year ago
Jeff Lucovsky b1918168f9 doc/pfring: Document additional cluster types
This commit adds brief discussion for additional cluster types for use
with the pf-ring packet source.

Newly added:
- cluster_inner_flow
- cluster_inner_flow_2_tuple
- cluster_inner_flow_4_tuple
- cluster_inner_flow_5_tuple

Issue: 5975
1 year ago
Juliana Fajardini 1665f71a68 flow: make exc policy work w/ simulated flowmemcap
Exception policy wouldn't be applied if we were in the context of a
simulated flow memcap hit.

Bug #5998
1 year ago
Jason Ish b4f0d3c741 rust: update der-parser to 8.2.0
Minimal modifications required on the Suricata side, mainly for fields
becoming private and needing an accessor instead.

Note: As the kerberos parser still depends on der-parser 6.0, we still
have to depend on that so it is depended on, but renamed to
der-parser6. There is not an udpated kerberos-parser yet that uses
der-parser 8.2.0.

Ticket: #5991
1 year ago
Philippe Antoine 59734d16a1 detect: use http.connection to client
Ticket: #5746
1 year ago
Jason Ish 3d9fc3bf1d rust: update snmp-parser to 0.9.0
Updating snmp-parser required directly depending on the asn1-rs crate
for the Oid type, as snmp-parser does not re-export this type anymore.

Ticket: #5992
1 year ago
Jason Ish 0d6628c64e rust: update cargo.lock
Update Cargo.lock, most importantly the Nom 5.1.3 update which will
prevent future breakage by Rustc.
1 year ago
Victor Julien 0b15b73c9c stream: minor const cleanup 1 year ago
Victor Julien 5903ca624e stream: simplify raw stream progress catch up
Don't use TCP window, but use last ACK instead.
1 year ago
Victor Julien 62b998cc06 stream: clear SYN queue on state change
Bug: #5907.
1 year ago
Victor Julien cb66a1e636 github-ci: add padding check to scan-build 1 year ago
Victor Julien 47fe88b79b ftp: rearrange command struct to be more compact
./app-layer-ftp.h:92:16: warning: Excessive padding in 'struct FtpCommand_' (11 padding bytes, where 3 is optimal). Optimal fields order: command_name, command, command_length, consider reordering the fields or adding explicit padding members [optin.performance.Padding]
typedef struct FtpCommand_ {
        ~~~~~~~^~~~~~~~~~~~~
1 year ago
Victor Julien afd57dc845 detect: remove unused thread ctx members 1 year ago
Victor Julien 4f1d61169c detect: make DetectEngineCtx more compact 1 year ago
Victor Julien 0ff28a482b detect: remove unused group counters 1 year ago
Victor Julien 9f0bea5410 detect: remove DetectEngineCtx members
Members were set but not checked.
1 year ago
Victor Julien 9ce967da53 detect: remove unused field 1 year ago
Victor Julien 3480d57103 threading: reduce padding in affinity 1 year ago
Victor Julien d0d6ca4c6e github-ci: add more scan-build checks
Explicitly disable:
security.insecureAPI.DeprecatedOrUnsafeBufferHandling
optin.performance.Padding
1 year ago
Victor Julien 9586aed43b scan-build: fix potential 0 size allocation warnings 1 year ago
Victor Julien 0265c13550 src: fix extern max_pending_packets type 1 year ago
Victor Julien fb237e8de3 github-ci: add dpdk, nfqueue, nflog to scan-build 1 year ago
Victor Julien c1714294cb streaming: improve error handling 1 year ago
Victor Julien 59df740e85 output: work around scan-build fp
runmodes.c:541:13: warning: Use of memory after it is freed [unix.Malloc]
        if (output->output_ctx != NULL && output->output_ctx->DeInit != NULL)
            ^~~~~~~~~~~~~~~~~~
1 warning generated.
2 years ago
Victor Julien 0af599f5fa log/pcap: work around scan-build fp
log-pcap.c:1008:24: warning: Use of memory after it is freed [unix.Malloc]
            if (remove(pf->filename) != 0) {
                       ^~~~~~~~~~~~
1 warning generated.
2 years ago
Victor Julien fc000a6d81 af/xdp: fix memory leaks on thread init failure
source-af-xdp.c:675:21: warning: Potential leak of memory pointed to by 'ptv' [unix.Malloc]
        SCReturnInt(TM_ECODE_FAILED);
                    ^~~~~~~~~~~~~~~
./util-debug.h:275:48: note: expanded from macro 'SCReturnInt'
 #define SCReturnInt(x)                  return x
                                                ^
1 warning generated.
2 years ago
Victor Julien ea67a2edd2 dpdk: fix scan-build warnings
runmode-dpdk.c:204:18: warning: Result of 'calloc' is converted to a pointer of type 'char *', which is incompatible with sizeof operand type 'ptrdiff_t' [unix.MallocSizeof]
    args->argv = SCCalloc(capacity, sizeof(ptrdiff_t)); // alloc array of pointers
                 ^~~~~~~~           ~~~~~~~~~~~~~~~~~
./util-mem.h:36:18: note: expanded from macro 'SCCalloc'
 #define SCCalloc calloc
                  ^~~~~~
runmode-dpdk.c:278:16: warning: Result of 'malloc' is converted to a pointer of type 'char *', which is incompatible with sizeof operand type 'char **' [unix.MallocSizeof]
    eal_argv = SCMalloc(args.argc * sizeof(args.argv));
               ^~~~~~~~             ~~~~~~~~~~~~~~~~~
./util-mem.h:35:18: note: expanded from macro 'SCMalloc'
 #define SCMalloc malloc
                  ^~~~~~
2 warnings generated.
2 years ago
Victor Julien e717c2e0ec github-ci: remove debian 9 as it is EOL 2 years ago
Jason Ish 915f487a1c github-ci: update Fedora 36 cov build to Fedora 38
As Fedora 36 will be EOL in a month.
2 years ago
Jason Ish bcbceb13f8 github-ci: update non-root build to Fedora 37
As Fedora 36 will be EOL in a month.
2 years ago
Jason Ish b0bc95d7c1 github-ci: add Fedora 38 builds 2 years ago
Jason Ish 3974142b41 github-ci: use cbindgen from packages on almalinux:9
AlmaLinux 9 has cbindgen available from the package repositories.
2 years ago
Jason Ish fa651606a0 github-ci: add Fedora 37 builders 2 years ago
Jason Ish 4105ac436e github-ci: add Fedora 36 gcc builder
The existing Fedora 36 builder used clang. Add a gcc builder as it can
show different errors.
2 years ago
Jason Ish 04fb0189a7 github-ci: replace Fedora no-jansson build with AlmaLinux
Use AlmaLinux 9 for the no-jansson test instead of Fedora as it will
need to be updated much less.
2 years ago
Jason Ish dd72a64c53 github-ci: remove Fedora 35 build: EOL 2 years ago
Jason Ish e32d01d01b github-ci: enable asan for Ubuntu debug-validation test 2 years ago
Jason Ish 497a6e7ab7 github-ci: fedora non-root: remove external script usage
In the end, its not needed and makes it easier to copy and paste to a
new test.
2 years ago
Jason Ish ec253e54cc github-ci: use bundle.sh script for libhtp, suricata-update
Update the GitHub CI workflow to use the bundle.sh script to pull in
Suricata-Update and libhtp. This means one less place where defaults
are hardcoded and can get out of sync.

This also simplifies the variable names that can be embedded in a pull
request message to use the same variable names that bundle.sh
expects. Of note, this removes the _PR variant, instead a branch name
of "pr/N" can be used to specify a PR.
2 years ago
Jason Ish 76c71a9120 bundle.sh: allow a PR # to be specified
Allow pull requests (and merge requests) to be specified by using a
branch name like "pr/111" or "mr/222". This allows CI to use this
script as well, instead of multiple variations of the same thing.

Additonally allow the destination directory to be overridden with the
DESTDIR environment variable.
2 years ago
Victor Julien d8152b6f7e packet/queue: debug validation for pkt src 2 years ago
Victor Julien 0334eaf7fb eve/dnp3: remove noisy debug code 2 years ago
Jason Ish d2fb958e28 rust: fix clippy lint for assert
Fix done automatically by clippy --fix
2 years ago
Victor Julien 96c331c5d0 fuzz/predef_aware: set pkt_src 2 years ago
Victor Julien efeaa6e2c7 github: add scan-build workflow
Add scan-build workflow that fails on any warning.

Exclude libhtp as there is still one open issue there.
2 years ago
Victor Julien fa5acc1743 radix: add debug validation to assist scan-build
util-radix-tree.c:595:34: warning: Access to field 'stream' results in a dereference of a null pointer (loaded from field 'prefix') [core.NullDereference]
        if ((temp = (stream[i] ^ bottom_node->prefix->stream[i])) == 0) {
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
util-radix-tree.c:717:30: warning: Access to field 'stream' results in a dereference of a null pointer (loaded from field 'prefix') [core.NullDereference]
        if (SC_RADIX_BITTEST(bottom_node->prefix->stream[differ_bit >> 3],
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
./util-radix-tree.h:27:34: note: expanded from macro 'SC_RADIX_BITTEST'
 #define SC_RADIX_BITTEST(x, y) ((x) & (y))
                                 ^
2 warnings generated.
2 years ago
Victor Julien 5914e0518c detect: fix potential null pointer deref
Could only happen if htp user data alloc would fail, but handle
it anyway.

Bug: #4952.
2 years ago
Victor Julien 9224b3435b mime: address scan-build warnings
util-decode-mime.c:189:31: warning: Use of memory after it is freed [unix.Malloc]
            lastSibling->next = entity->child;
            ~~~~~~~~~~~~~~~~~ ^
util-decode-mime.c:827:24: warning: Potential leak of memory pointed to by 'val' [unix.Malloc]
        state->hname = NULL;
                       ^~~~
/usr/lib/llvm-16/lib/clang/16/include/stddef.h:89:24: note: expanded from macro 'NULL'
 #  define NULL ((void*)0)
                       ^
2 warnings generated.

Improve error handling and add assert to avoid these warnings.

Bug: #3147.
2 years ago