Commit Graph

18012 Commits (68cc96a463f88a955f75094281c5ec530a5382c5)
 

Author SHA1 Message Date
Victor Julien 68cc96a463 unittests: clean up memory in lua tests 1 year ago
Victor Julien 94397e177c unittests: convert log format test to FAIL/PASS api 1 year ago
Victor Julien 8dd86a0479 unittests: clean memory in tls validity tests 1 year ago
Victor Julien f23385b433 unittests: clean up memory for tcp.flags tests 1 year ago
Victor Julien cbaff02d66 unittests: clean up memory in ftp tests 1 year ago
Victor Julien ce4276bdd9 unittests: clean up memory in fragbits tests 1 year ago
Victor Julien b953c69938 unittests: clean memory flow rate tests 1 year ago
Victor Julien 7c0d94f35e unittests: clean memory in flowbits tests 1 year ago
Victor Julien e2d09fbd5e unittests: clean memory in flow storage tests
Before tests are started an init is already done, so don't overwrite an allocation.
1 year ago
Victor Julien 700e687118 unittests: clean up conf memory in body tests 1 year ago
Victor Julien c06cb8af19 unittests: clean up memory for stateful detect tests 1 year ago
Victor Julien 57d1f20dfa unittests: don't leak memory with --list-unittests 1 year ago
Victor Julien ec6536ba75 unittests: free memory for proto tests 1 year ago
Victor Julien 37ad70ab59 unittests: don't leak memory in affinity tests 1 year ago
Victor Julien 65ba8952b5 unittests: clean stats memory in http.stat_msg tests 1 year ago
Victor Julien 9f0aefed48 unittests: clear stats memory in htp tests 1 year ago
Victor Julien fb4a805c69 unittests: clean stats memory in http.stat_code tests 1 year ago
Victor Julien 1e938cab92 unittests: clean stats memory in http.cookie tests 1 year ago
Victor Julien 73c1c489f7 unittests: don't leak memory in checks
Result of bstr_util_strdup_to_c needs to be freed
1 year ago
Victor Julien 28ae95e8da unittests: fix memory leaks; convert to FAIL/PASS 1 year ago
Victor Julien 87b683ff6d unittests: fix dcerpc.stub_data test testing the wrong issue
Tested missing sid instead of proto mismatch.
1 year ago
Victor Julien 74f629d235 unittests/helper: free memory for IPv6 packets
IPv6 packets have multiple heap allocations in the helper code, so free them all.
1 year ago
Victor Julien 150bee3a46 unittests/helper: free flow memory more thoroughly 1 year ago
Victor Julien 9474c552d2 unittests/helper: free thread stats 1 year ago
Victor Julien b72d44f206 unittests/helper: set mpm-algo properly in tests 1 year ago
Victor Julien 1c30fcfe47 detect/address: make list clean function non-static
To be used to fix a leaky test.
1 year ago
Victor Julien ce9c7a024e detect/content: don't leak replace memory
Replace keyword updates a prior content with a heap allocation of the
pattern the content should be replaced with. Make sure this is freed as
well.

Bug: #7997.
1 year ago
Philippe Antoine 3babd68af4 pop3: count retr_data into consumed
for later AppLayerResult::incomplete

Fixes: acef961645 ("pop3: improve parsing")

https://issues.oss-fuzz.com/u/1/issues/451112373

Ticket: 7994
1 year ago
Philippe Antoine 9a4a29e218 http2: fix parsing of goaway frames
There was a last stream id before the error code
As per section 6.8 of RFC 7540

Ticket: 7991
1 year ago
Philippe Antoine 7f0087f19a rust/detect: fix correct pointer type in SCDetectU32ArrayFree 1 year ago
Philippe Antoine 969739d067 detect: http2.errorcode is now a generic integer
Ticket: 7889
1 year ago
Philippe Antoine 401b2fcae6 detect: http2.frametype is now a generic integer
Ticket: 7889
1 year ago
Philippe Antoine 454f73b445 rust: EnumString derive accepts a enum_string_style parameter
So that http2.frametype and http2.errorcode can use EnumString
without changing the format, as they used UPPERCASE instead of
the default EnumString snake_case
1 year ago
Philippe Antoine 0b63894c5d detect: remove ifdefed out code
engine-proto accepting numerical values should be done with
generic integer framework if wanted

Ticket: 7889
1 year ago
Jeff Lucovsky 16d124cfda doc/output: Highlight ethertype value change
Issue: 7855

Highlight the change to how ether_type values are displayed. Previously,
they were displayed in network order as a decimal value.

They are now displayed in host order as a decimal value.
1 year ago
Jeff Lucovsky 0af7793410 output: Display ethertype properly
Ethertype values are now converted from network format to host format
before display occurs. Displayed values are now in hex instead of
integers.

Without this change, ethertype values such as 0xfbb7 are
displayed in decimal as: 47099 (0xb7fb).

The actual value is 64439 (0xfbb7); all logged ether_type values
will be displayed in host order in decimal format. This example
will log the ether type as 64439

Issue: 7855
1 year ago
Victor Julien f0121d8bc2 stats: improve wait loops
Check bail condition before entering conditional wait.

CID 1554236: (#1 of 1): Indefinite wait (BAD_CHECK_OF_WAIT_COND)
dead_wait: A wait is performed without ensuring that the condition is not already satisfied while holding lock ThreadVars_.ctrl_mutex. This can cause unnecessary waiting if the notification happens before the lock is acquired.

CID 1554238: (#1 of 1): Indefinite wait (BAD_CHECK_OF_WAIT_COND)
dead_wait: A wait is performed without ensuring that the condition is not already satisfied while holding lock ThreadVars_.ctrl_mutex. This can cause unnecessary waiting if the notification happens before the lock is acquired.
1 year ago
Juliana Fajardini ff96c52541 doc/install: fix minor typo 1 year ago
Juliana Fajardini a3bd4ec324 doc: remove outdated GITGUIDE 1 year ago
Victor Julien acef961645 pop3: improve parsing
Improve multiline commands and SASL auth.

Work around missing support in crate for empty server challenge and SASL base64 data.

Ticket: #7709.
1 year ago
Lukas Sismis 7ca95eeec0 github-ci: build-test DPDK v23.11.x and v24.11.x
Ticket: 6382
1 year ago
Lukas Sismis ee0b08692c github-ci: stop testing obsolete DPDK versions, bump up the rest 1 year ago
Philippe Antoine c99e159341 detect/files: support protocols only over udp
Ticket: 7973

Files were supported on both TCP and UDP. But file detection keywords
such as file.data made signatures loading fail if the signature
was using an app-layer protocol that enabled on udp only, even
if the signatures could run smoothly.
1 year ago
Jason Ish 5e2dc9ace3 ike: don't log empty server objects 1 year ago
Jason Ish 2848061d0d scripts/evedoc.py: handle union types in schema
Update EVE documentation script to handle union types like:

    "type": ["string", "number"]
1 year ago
Jason Ish ced0c2c466 doc: upgrade notes for changes to ike output 1 year ago
Jason Ish 2d86412f46 ike: log attributes as objects
IKE attributes are an array of TLV style objects, this means there can
be duplicate types seen on the wire. However, Suricata logs these as a
mapping with the type as the key. This can result in the JSON
containing duplicate keys.

To address this, log the attributes as an array of objects, allow
duplicates to exist, for example:

  "client": {
    "proposals": [
      {
        "sa_life_duration": "Unknown",
        "sa_life_duration_raw": 86400,
      }
    }
  }

is now logged as:

  "client": {
    "proposals": [
      {"key": "sa_life_duration", "value": "Unknown", "raw": 86400}
    ]
  }

Also adds `"version": 2` to each IKE record to note the change of
format from previous versions.

Ticket: #7902
1 year ago
Jason Ish b543e28402 ike/detect: info log message should be debug 1 year ago
Lukas Sismis 27383f878d dpdk: supress a warning of the bond function
DPDK Bonding API has been changed in DPDK version 23.11 where
the old *slave* API was marked as deprecated and the new *member*
API was marked as experimental.
This was unfortunately executed by marking both API variants
at the same time. The deprecated version is removed from the follow
up versions while the experimental version will become stable
in the next DPDK releases. This is based on a policy in DPDK where
an API change needs to merged in main for 1 stable release before
removing the experimental flag.

In DPDK 24.11 this has been fixed and warning supression is not
added.

Ticket: 7009
1 year ago
Lukas Sismis 8f63094744 dpdk: fix the CPU exclude logic
The exclude function incorrectly performs a XOR operation. While it
works when the worker cores occupy all cores, it is not the correct
operation. For example, when a core is affined to only management
and not worker threads, the XOR operation affines it to the worker set.
(1 XOR 0 -> 1, where in fact the desired outcome is 0)

Ticket: 7975
1 year ago