Commit Graph

18657 Commits (7dd23392cc87182e9d83d69b7b3b4e1a6ae1f02d)
 

Author SHA1 Message Date
Jason Ish 7dd23392cc examples/lib/cplusplus: simplfy, make more like the simple example
To prep for the removal of the lib runmode, simplify this C++ example
to match our simple example. We don't yet have the C++ compatible
headers to allow for a C++ app to register its own custom runmode.
4 months ago
Jason Ish 445de77c71 examples/lib/custom: use own custom run mode
Debug validation revealed that library ThreadVars were being
created *after* the threads were sealed. And the only way to create
your ThreadVars that fits within the current application life-cycle is
to create them in your own custom run mode.

This is likely a better model for users who are bringing their own
packets and threads anyways, as they are essentially providing their
own capture method, and all capture methods provide their own run
mode. They're also using their own threads, which means adapting to
their own threading model.

This is suitable for a backport to 8.0. But for 9.0 we can go further
and remove the built-in library run mode, which will be done in a
follow-up commit.

Ticket: #8259
4 months ago
Jason Ish 02e4399059 github-ci: add debug validation to almalinux 10 build
After the distcheck, this build doesn't need unittests, so add
debug-validation, as this can trigger assertions in our lib examples
that are tested in this job

This triggers a debug-validation error in the custom library example.

Ticket: #8259
4 months ago
Victor Julien 56514f3be8 openbsd: pledge before allowing threads to continue
Avoids a race condition with pcap file directory mode.

Ticket: #8300.
4 months ago
Philippe Antoine 1e0f344ab7 doc: be more precise for decompress transforms
Ticket: 7846
4 months ago
Victor Julien 9cecd29fd4 detect/parse: convert test to fail/pass 4 months ago
Victor Julien 3068089762 github-ci: disable libmagic on macos
5.47 is currently breaking CI, so disable during investigation.

Related to ticket #8342.
4 months ago
Philippe Antoine 7e97dfd521 detect: replace stack alloc by member of DetectEngineThreadCtx
To avoid running a big (when many signatures) stack allocation
on each detection loop with postmatches

Ticket: 8001
4 months ago
Philippe Antoine b7a3a6b167 detect/pcre: add debug validations
Before stack allocation

Ticket: 8001
4 months ago
Philippe Antoine 4849d34325 detect/parse: debug validation before stack allocation
A rule size has a global bound

Ticket: 8001
4 months ago
Philippe Antoine db64462b1d detect/metadata: add debug validation
Before stack allocation

Ticket: 8001
4 months ago
Jason Ish 03f767a094 github-ci: re-enable rpm jobs 4 months ago
Victor Julien a4aa056884 detect/parse: convert test to fail/pass 4 months ago
Victor Julien 33ddbc3244 github-ci: use --skip-branches in coverage consistently
Completes 02f6340972.
4 months ago
Shivani Bhardwaj d241237c0f Revert "dcerpc: fix consumed bytes post gap handling"
This reverts commit fc9da1c7a1.

That commit incorrectly used consumed as index of the slice passed to
the Frame API.
Found by oss-fuzz.
4 months ago
Jeff Lucovsky 5a3a2d5fd1 doc/output: Document the IPv6 display behavior
Issue: 7399

Document the IPv6 display behavior and how to display IPv6 addresses in
their compressed form (per RFC-5952).
4 months ago
Jeff Lucovsky 809fb56612 output/log: IPv6 addr display per cfg
When configured, display the compressed form of the IPv6 address.

Issue: 7399
4 months ago
Jeff Lucovsky 4af77975e3 output/log: ipv6-compress member to file context
Issue: 7399

Add compress ipv6 setting to file context.
4 months ago
Jeff Lucovsky 20b8829867 output/eve: EVE output to use IPv6 compress cfg
Issue: 7399

Determine the EVE IPv6 address display and use that when generating
external display representation.
4 months ago
Jeff Lucovsky ed882ede68 output/ipv6: Utility function to compress IPv6 addrs
Issue: 7399

Utility function to compress IPv6 addresses per RFC-5952
4 months ago
Shivani Bhardwaj 0e345c93ca app-layer: check ipproto enabled setting first
If the key `app-layer.protocols.PROTO.enabled` is present, the protocol
is enabled for all carrier protocols. This is not ideal.
Only if the key `app-layer.protocols.PROTO.enabled` is missing, an
attempt is made to look for a setting specific to the ipproto passed
at the time of registration e.g.
`app-layer.protocols.PROTO.udp.enabled`.

By default, check for carrier proto specific setting. If it is not
found, then fall back to the generic setting.
Issue a warning in case an inconsistent combination of global and
ipproto specific setting is found.

Bug 8205
4 months ago
dependabot[bot] 8df4e10018 github-actions: bump actions/download-artifact from 7.0.0 to 8.0.0
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 7.0.0 to 8.0.0.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](37930b1c2a...70fc10c6e5)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: 8.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
4 months ago
dependabot[bot] 202d1e26c3 github-actions: bump github/codeql-action from 4.32.3 to 4.32.4
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.32.3 to 4.32.4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Commits](https://github.com/github/codeql-action/compare/v4.32.3...v4.32.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
4 months ago
dependabot[bot] cfde322f06 github-actions: bump actions/upload-artifact from 6.0.0 to 7.0.0
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6.0.0 to 7.0.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
4 months ago
Giuseppe Longo de46f4ba9d ldap: set invalid_data event
Currently in parse_request function LdapEvent::InvalidData is not set when a
request is not parsed correctly.

Ticket #8258
4 months ago
Victor Julien 2480f8c038 doc: fix dcerpc.opnum documentation
Docs were claiming greater than, less than, etc. support even though this was never supported.

Fixes: 51be8f0238 ("doc/dcerpc: add proto keywords")

Ticket: #8330.
4 months ago
Victor Julien b55be5a44f detect/transforms: update gunzip / zlib_deflate syntax
Use standard space separated syntax.
4 months ago
Victor Julien fe3cce895c doc/userguide: add igmp keyword docs 4 months ago
Victor Julien 7e6fd09e90 doc/userguide: add missing ipopts values 4 months ago
Victor Julien 086c27a07f decoder/igmp: add decoder events 4 months ago
Victor Julien 94c16d8915 eve/igmp: add schema support for alert records 4 months ago
Victor Julien 791e7c1924 detect/tcp.flags: minor code cleanup 4 months ago
Victor Julien e916fc3ba4 detect: add igmp.type keyword 4 months ago
Victor Julien 6a1389acff detect: add igmp.hdr keyword 4 months ago
Victor Julien d652b7ef62 decoder/igmp: detect RGMP (RFC 3488)
RGMP is a dialect of IGMP that uses the same protocol structure,
but with some different values for the fields.

Detect this and log it differently.
4 months ago
Victor Julien 18f699cb97 detect/ipopts: add qs and rtralt options
Reordering of table and switch to match switch in parser.
4 months ago
Victor Julien 190ed2e8ed detect/csum: add igmp-csum keyword to match checksum
Add rule to decoder-events.rules to match on bad checksums.
4 months ago
Victor Julien c54bc8bc8b detect/proto: add igmp support
So 'alert igmp ...' can work.
4 months ago
Victor Julien 1b7cc2b323 decoder/igmp: initial decoder support for IGMP
Basic v1, v2 and v3 header validation.

Ticket: #8262.
4 months ago
Juliana Fajardini 90823fa90e devguide: add policy on patches w unasigned ticket 4 months ago
Lukas Sismis d4434ef4e8 dpdk: add live run test suite
Add live tests to verify that mempool, mempool cache sizes, and
potentially other DPDK features are initialized correctly during the
startup.
Follows up on bugs found in mempool settings on real/bonded devices.

The tests are placed in the new folder qa/live/ after a comment
in https://github.com/OISF/suricata/pull/14896 which indicated other
live tests are going to be moved there as well.

Ticket: 8320
4 months ago
Lukas Sismis ecd15a6c7e dpdk: scale mempool size to the number of bond members
DPDK interface which were added to bond and had auto-calculated
mempool size didn't have enough space as the configured
descriptors and the derived mempool only considered one interface
per YAML node entry.

DPDK Bonding PMD allows for multiple interface to cooperate and
therefore, needs more space.

Ticket: 8125
4 months ago
Lukas Sismis ea853e92a3 dpdk: fix mempool sizing to always yield 2^n -1
Following DPDK's recommendation to size mempool to 2^n - 1,
the current implementation was flawed for certain combos,
e.g. mp_size 1023 and 1 queue, which resulted to 1022.
4 months ago
Lukas Sismis 109742932a dpdk: honor cache size setting
Previously, the interface initialization always recalculated
cache size according to the per-queue computed mempool size.

Ticket: 8123
4 months ago
Lukas Sismis d640719413 hs: include HS platform info in cache file hash
Hash Hyperscan installation info (version, CPU features, mode)
into the cache filename. A Hyperscan upgrade or platform change
would now produce a different filename, so stale caches from an
older installation are never opened.

Ticket: 8325
4 months ago
Lukas Sismis 2e7b12dda4 hs: validate cached database against current HS installation
After deserializing a cached Hyperscan database, verify that its
version, CPU features, and mode match the current Hyperscan
installation by comparing hs_database_info output against a
reference database. Reject loading incompatible caches.

Ticket: 8325
4 months ago
Lukas Sismis 0cdc77b707 hs: use binary mode for cache file I/O
HSSaveCache wrote serialized Hyperscan databases using text mode ("w")
while HSReadStream already read them with binary mode ("rb").
Matched file reading modes to the binary format and simplified
write-size check.

Ticket: 8325
4 months ago
Lukas Sismis d754b28717 hs: remove redundant file handle in HSLoadCache
HSLoadCache opened the cache file but never used the resulting handle
for reading. The actual read was done by HSReadStream which opened
the same file independently.

Removed the unused fopen/fclose pair and flattened the control flow.

Ticket: 8325
4 months ago
Victor Julien 569ba3d26f hs/cache: cleaner and more detailed output
Reduce logging level of a minor informational message.

Split tracking of pruning by age and by version and log those
separately, where the logging only appears if something has been
removed.

Ticket: 8322
4 months ago
Jason Ish 66473f6ad7 doc: add more public datasets
Add:
- UNSW-NB15
- CIC-IDS2017
- CSE-CIC-IDS2018
- CIC-DDoS2019

Update formatting for better display.
4 months ago