Commit Graph

17775 Commits (080995f551861d064e3edd4ad9e2bec034c9a544)
 

Author SHA1 Message Date
Boris Tonofa 080995f551 detect-file-hash: drop redundant rule_file NULL check
de_ctx->rule_file is never NULL inside DetectFileHashParse(); add a comment
stating this fact and remove the superfluous NULL guard.

No functional change – the patch only clarifies the code and trims a few
lines of dead code.

Bug 7769
3 months ago
Juliana Fajardini 49629f7cb6 schema/decoder: add descriptions for stats counters
Task #7793
3 months ago
Juliana Fajardini 342c649186 schema/arp: fix invalid pkt event output
Task #7857
3 months ago
Adam Kiripolsky 775fc7795e dpdk: fix parsing of DPDK EAL argument options
Fix parsing of DPDK EAL argument options taken from suricata.yaml.

Ticket: 7856
3 months ago
Juliana Fajardini ec1da6fd3a doc/exceptions: fix wrong section markdown
Sections had wrong levels due to wrong markdown.
3 months ago
Jeff Lucovsky 21707ab26c doc/from_base64: Emphasize keyword only values
Emphasize that specifying the keyword only will result in the defaults
for each option to be used.

Issue: 7853
3 months ago
Jeff Lucovsky 03d676531a detect/from_base64: Support keyword w/no opts
Issue: 7853

Support the use of `from_base64` with no optional values. In this case,
the default values for:
- mode RFC4648
- offset: 0
- bytes: buffer size
will be used.
3 months ago
Jeff Lucovsky e57eeb24b5 misc: fix typos
Fix typos in src/detect-engine.c

Issue: 7819
3 months ago
Jeff Lucovsky 06e89736b3 detect/mt: Prevent deadlock when adding tenants
This commit modifies the call path for registering MT tenants to avoid
deadlocks on the master->lock

When performing tenant operations, e.g., using suricatasc to send a
register-tenant command, a deadlock occurs when

- DetectEngineMTApply: acquires master->lock
- Calls DetectEngineReloadThreads
- Within DetectEngineReloadThreads, calls DetectEngineMultiTenantEnabled
- Which first acquires master->lock

Commit 2bea5af introduced changes to the master->lock usage leading to
the deadlock situation.

Issue: 7819
3 months ago
Victor Julien f910e3045f github-ci: add Debian 13 job with xdp and vectorscan 3 months ago
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
3 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
3 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