Commit Graph

17965 Commits (b543e28402971f74dfd338d4598ee28bba340578)
 

Author SHA1 Message Date
Eric Leblond b6839ebcf8 misc: add rust analyzer and sphinx to shell.nix
This allows to have the LSP server present and permits to build the
documentation.
3 months ago
Jason Ish b93a27722c rust: fix mismatched_lifetime_syntaxes warning
Fix new warning present in Rust 1.89.

warning: hiding a lifetime that's elided elsewhere is confusing
   --> src/ldap/types.rs:191:30
    = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
    = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default
help: use `'_` for type paths
3 months ago
Shivani Bhardwaj 982c9222dd detect/port: add BUG_ON on impossible condition
to assist Coverity in assessing the state of x correctly.
3 months ago
Shivani Bhardwaj e54dd8d814 detect/port: clean up already initialized vars 3 months ago
Shivani Bhardwaj 917c6f3da7 engine/analyzer: write rule failure report to correct file
The failure report was always just written to rules_fast_pattern.txt. In
case that setting is disabled or there's nothing fast-pattern related,
the report should be written to the usual rules_analysis.txt.

Bug 7821
4 months ago
Shivani Bhardwaj eb39dba5dd engine/analyzer: check if file pointer exists before writing
de_ctx->ea->fp_engine_analysis_fp is only initialized if
engine-analysis.rules-fast-pattern is enabled in the configuration. If
this config param is missing, this leads to segfault.

Bug 7822
4 months ago
Juliana Fajardini 03bc95c108 detect/engine: simplify stats counters registration 4 months ago
Juliana Fajardini a8453d73cd detect: remove unused non-pf stats counters
Remove unused rule prefilter-related stats counters that aren't in use.

94644ac960 (detect: move non-pf rules into special prefilter engines)
removed the logic that made use of and incremented the stats counters:
- det_ctx->counter_fnonmpm_list
- det_ctx->counter_nonmpm_list

Some code was left, registering them, and mentioning them in the
json schema.

Ticket #7834
4 months ago
dependabot[bot] a024ede9ba github-actions: bump github/codeql-action from 3.29.2 to 3.29.5
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.2 to 3.29.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Commits](https://github.com/github/codeql-action/compare/v3.29.2...v3.29.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
4 months ago
Philippe Antoine 2e3dfd318b file: remove unused flag
FLOWFILE_NO_SIZE_* are unused, whose removal shows that
SIG_GROUP_HEAD_HAVEFILESIZE gets unused, whose removal shows that
SignatureIsFilesizeInspecting gets unused
4 months ago
Lukas Sismis 897cdb8571 doc/dpdK: update RX/TX descriptor note for Connect-X 4
Ticket: 7639
4 months ago
Adam Kiripolsky fe2d64e758 app-layer: fix ippair memcap counters
Fixed counter for ippair.memcap by using the correct function,
IPPairGetMemcap.
Until now IPPairGetMemuse was used both for memuse and memcap.

Ticket: 7827
4 months ago
Jason Ish eaef74af05 lua: document the dnp3 lib
Ticket: #7631
4 months ago
Jason Ish 3b7b908fe2 doc/upgrade: mention that lua rules are enabled by default 4 months ago
Jason Ish 7a65ca10e2 doc/lua-detection: fix example script; remove most buffers
- Reference rule hooks instead

Ticket: #7728
4 months ago
Jason Ish f56bd4db75 doc/lua-output: fix example script for new apis
Ticket: #7728
4 months ago
Jason Ish 7535b5aa1d doc/lua-functions: update lua-function documentation
- cleanup usage and documentation around needs
- mentiond that rule hooks are used instead of "needs" keywords with
  link with rule hooks (which is still in the firewall-design doc)
4 months ago
Jason Ish decf795e94 doc/install: remove reference to --enable-lua
This configure command no longer exists.
4 months ago
Jason Ish 4791f37ca2 doc/lua-detection: update note to mention rules are enabled by default
In 8.0, Lua rules are enabled by default.
4 months ago
Jason Ish ffa1766742 github-ci: finish removing cppclean
Completes commit 2d308c000d.
4 months ago
Jason Ish 3c98ea85d6 github-ci: add almalinux 10 build
Based on the current AlmaLinux 9 build, with plugin tests, etc.
Remove cppclean as its not installed and was previously disabled with
commit 2d308c000d.
4 months ago
Lukas Sismis e4a406d375 hyperscan: prevent LTO opmitizing out hash calculation
Since cached_hash was updated through reference (hash), it seems
LTO did not notice this and optimized the whole code block, returning
zero.
This in turn caused all caches to have the same name and to overwrite.
On subsequent runs, only the last cache was loaded for all SGHs
causing wrong MPM assignment.

Ticket: 7824
4 months ago
Jason Ish bb846de074 github-ci: add flto build
Ubuntu and Fedora packing system build with -flto=auto by default, so
update one test to use -flto=auto. Also build with -O2 as that
combination can cause issues such as
https://redmine.openinfosecfoundation.org/issues/7824.

Also adds vectorscan to the build.
4 months ago
Jason Ish 81e7316616 lua/bytevarlib: return luaL_error to suppress warning
Even though luaL_error never returns, use a return to make it
clear. Also prevents a compiler warning about idx being used
uninitialized.
4 months ago
Jason Ish 0e80aca3c3 detect-engine-address: initialize pointer in unit tests
To prevent the compiler warning about "c" being used uninitialized
with LTO.
4 months ago
Jason Ish a1c5e93d45 util-byte: fix usage of util-byte integer parsers
Functions like ByteExtractStringUint8 return 0 or less on
failure. Many usages of this function treat 0 as successful as its our
common pattern.

Ticket: #7836
4 months ago
Alexandre Iooss 57e0ff0ee0 doc/lua: fix typo in stream toserver and toclient 4 months ago
Philippe Antoine fe9da8acd6 http2: do not log empty objects for request or response
Ticket: 7741
4 months ago
Philippe Antoine c20dddb046 output: fix NULL deref if no app-layer is logged
Ticket: 7815
4 months ago
Philippe Antoine 9a01c1be8e output: fix condition for community id with same ip
Ticket: 5689
4 months ago
Philippe Antoine 271854a3ea counters: hard fail on allocation failure during init
Ticket: 7813
4 months ago
Philippe Antoine 9545eab4c8 conf/output: friendly error message on bad configuration
Ticket: 7611

Instead of segfault

output.types expects a sequence of one-key mappings, instead
of directly a mapping
4 months ago
Jeff Lucovsky 1030e4fa92 doc/suricatasc: Mentioned get-flow-stats-by-id cmd
Add get-flow-stats-by-id to the list of commands supported by suricatasc

Issue: 7081
4 months ago
Philippe Antoine 669b651368 build: include first rust/gen
Ticket: 7804

Allows especially to prefer our lua (rust crate) includes over
the system one
4 months ago
Philippe Antoine 7be505e887 doh: do not log dns events when there is no DNS
Ticket: 7740

When we have a pure HTTP2 transaction (such as settings), we want
to log a http event
4 months ago
Philippe Antoine 11c549211e snmp: fix the possibility to disable the parser
Ticket: 7820

Do not register anything, not even ALPROTO_SNMP "snmp" string
if parser is disabled
4 months ago
Philippe Antoine 6bbba953df ci: use debian 12 for xdp
As bullseye is EOL so it is being removed from the mirrors

https://lists.debian.org/debian-backports/2024/07/msg00003.html

[Edit by JI: Add xdp to distcheck build as well.]
4 months ago
Jason Ish 2e69e0d5c1 github-ci: remove debian:10 build, it is EOL 4 months ago
Jeff Lucovsky 07b7f36748 doc/reload: Expand rule-reload discussion
Clarify the resources involved in a rule reload.

Issue: 5078
4 months ago
Eric Leblond a28d544550 doc: add some missing url and desc
Keywords registration should provide a desc and a link to the
documentation. This patch adds desc and/or url for on most keywords
missing that.

This allows better output for list-keywords command line which
is then use in Suricata Language Server.
4 months ago
Jeff Lucovsky c0d54d838e gen/typo: Misc. typo fixes 4 months ago
Jeff Lucovsky 97b03b4076 doc/netflow: Discuss netflow
Add discussion for netflow configuration, event type and fields
contained in netflow records.

Issue: 5139
4 months ago
Shivani Bhardwaj e4b3b75b23 version: start development towards 8.0.1 4 months ago
Shivani Bhardwaj 9956286fb8 release: 8.0.0; update changelog 5 months ago
Philippe Antoine fa8d3a4ccb http2: do not set file flags for global txs
Global txs means here txs with stream id 0, used for connection control
messages.
5 months ago
Philippe Antoine 349c21af2c http2: mark old txs as updated
As is done in the other case a few lines below
5 months ago
Philippe Antoine 1d6d331752 http2: forbid data on stream 0
Ticket: 7658

Suricata will not handle well if we open a file for this tx,
do not close it, but set the transaction state to completed.

RFC 9113 section 6.1 states:

If a DATA frame is received whose Stream Identifier field is 0x00,
the recipient MUST respond with a connection error (Section 5.4.1)
 of type PROTOCOL_ERROR.
5 months ago
Jason Ish 116d1763d9 lib: opt-in signal handlers
Instead of enabling signal handlers by default, require the user of
the library to opt-in. This is done with the call to
SCEnableDefaultSignalHandlers, which sets a flag to add the default
signal handlers.

This seems like the least invasive way to do this at this time, but it
will require some re-thinking for 9.0, especially if migrate globals
to engine instances, signal handling will need to be re-thought.

Ticket: #6814
5 months ago
dependabot[bot] ed4cf9a803 github-actions: bump github/codeql-action from 3.28.18 to 3.29.2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.18 to 3.29.2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Commits](https://github.com/github/codeql-action/compare/v3.28.18...v3.29.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
5 months ago
Lukas Sismis 239de05b9d dpdk: auto threads assign one too many threads
Configuration option `threads: auto` in DPDK's interface node
overassigns available threads to the interface.
Commit 4dfd44d3 changed the signedness of the remaining threads counter,
which caused surpass of the counter initialization.
The if-clause is switched to first initialize and then use the counter.

Ticket: 7798
5 months ago