Commit Graph

18194 Commits (a84addb771846f6d4d55ec535a4591f58369e49c)
 

Author SHA1 Message Date
Victor Julien 73c1c489f7 unittests: don't leak memory in checks
Result of bstr_util_strdup_to_c needs to be freed
9 months ago
Victor Julien 28ae95e8da unittests: fix memory leaks; convert to FAIL/PASS 9 months ago
Victor Julien 87b683ff6d unittests: fix dcerpc.stub_data test testing the wrong issue
Tested missing sid instead of proto mismatch.
9 months 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.
9 months ago
Victor Julien 150bee3a46 unittests/helper: free flow memory more thoroughly 9 months ago
Victor Julien 9474c552d2 unittests/helper: free thread stats 9 months ago
Victor Julien b72d44f206 unittests/helper: set mpm-algo properly in tests 9 months ago
Victor Julien 1c30fcfe47 detect/address: make list clean function non-static
To be used to fix a leaky test.
9 months 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.
9 months 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
9 months 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
9 months ago
Philippe Antoine 7f0087f19a rust/detect: fix correct pointer type in SCDetectU32ArrayFree 9 months ago
Philippe Antoine 969739d067 detect: http2.errorcode is now a generic integer
Ticket: 7889
9 months ago
Philippe Antoine 401b2fcae6 detect: http2.frametype is now a generic integer
Ticket: 7889
9 months 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
9 months 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
9 months 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.
9 months 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
9 months 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.
9 months ago
Juliana Fajardini ff96c52541 doc/install: fix minor typo 9 months ago
Juliana Fajardini a3bd4ec324 doc: remove outdated GITGUIDE 9 months 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.
9 months ago
Lukas Sismis 7ca95eeec0 github-ci: build-test DPDK v23.11.x and v24.11.x
Ticket: 6382
9 months ago
Lukas Sismis ee0b08692c github-ci: stop testing obsolete DPDK versions, bump up the rest 9 months 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.
9 months ago
Jason Ish 5e2dc9ace3 ike: don't log empty server objects 10 months ago
Jason Ish 2848061d0d scripts/evedoc.py: handle union types in schema
Update EVE documentation script to handle union types like:

    "type": ["string", "number"]
10 months ago
Jason Ish ced0c2c466 doc: upgrade notes for changes to ike output 10 months 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
10 months ago
Jason Ish b543e28402 ike/detect: info log message should be debug 10 months 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
10 months 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
10 months ago
Philippe Antoine a393147415 rust: restrict visibility of reexported suricata_sys structs 10 months ago
Philippe Antoine fa322e3dc2 rust: remove unneeded cbindgen exclusions 10 months ago
Philippe Antoine 958344787f rust: bindgen FileAppendData
Ticket: 7667
10 months ago
Philippe Antoine 811d28cc6b rust: bindgen util-spm-bs.h
for SCBasicSearchNocaseIndex

Ticket: 7667
10 months ago
dependabot[bot] 3efab2bb7e github-actions: bump github/codeql-action from 3.30.3 to 3.30.5
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.30.3 to 3.30.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Commits](https://github.com/github/codeql-action/compare/v3.30.3...v3.30.5)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.30.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
10 months ago
dependabot[bot] a714ba8522 github-actions: bump ossf/scorecard-action from 2.4.2 to 2.4.3
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.4.2 to 2.4.3.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](05b42c6244...4eaacf0543)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-version: 2.4.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
10 months ago
Juliana Fajardini b6283ad05f decode/ipv6: apply clang-format changes 10 months ago
Juliana Fajardini a247801743 decode/ipv6: minor clean-ups
Remove unused debug-like statements (commented out 'printf's).
10 months ago
Juliana Fajardini ee7f01c83f decode/ipv6: flag invalid pkt w/ wrong ip ver event
When the decoder finds a packet with wrong IP version for
IPv4|IPv6-in-IPv6 tunnels, it would set an event, but wouldn't flag the
packet invalid. This fixes that.

Bug #7964
10 months ago
Jeff Lucovsky 0e547b9519 rust/conf: Accept xiB unit suffixes
Update the memval to recognize
- kb and kib
- mb and mib
- gb and gib
as equivalent.
10 months ago
Philippe Antoine 56e08c9134 mime: retain some stateful data for quoted-printable
In case a sequence like =3D is split over 2 calls to SCSmtpMimeParseLine

Ticket: 7950
10 months ago
Jason Ish 5c921507af ci/codeql: rename codeql python test
To differentiate from other CodeQL workflows.
10 months ago
Jason Ish 14448ecb0f ci/codeql: enable for rust, enable unittests
Unit tests need to be enabled for the src/tests files to be scanned.

Also rename, to differentiate from the Python CodeQL workflow.
10 months ago
Juliana Fajardini 6f441ee435 decode/ipv4: minor clean-ups
Remove unused debug-like statements (commented out 'printf's).
10 months ago
Juliana Fajardini 426955782c schema: add descriptions to capture stats counters
Task #6434
10 months ago
Juliana Fajardini 3642594e14 schema: add descriptions to decoder stats counters
Continuation of
Task #7793
10 months ago
Juliana Fajardini 42d563f83e schema: fix typos s/ERPSAN/ERSPAN 10 months ago
Jeff Lucovsky 846eb44a9d ci/mt: Include MT tests in CI workflows
Add the MT live tests to the CI workflow.
10 months ago