Commit Graph

17965 Commits (563066a6ddc9cc2c071c7de10e3c08801db2db6d)
 

Author SHA1 Message Date
Philippe Antoine 77d5c7c324 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
(cherry picked from commit 9a4a29e218)
9 months ago
Andreas Dolp 3e071d73c6 doc: fix typo duplicate 'of'
Thanks to catenacyber

(cherry picked from commit 37d748d441)
9 months ago
Andreas Dolp 58c46937ee doc: fix typo /var/run/suricata in file permissions docs.
(cherry picked from commit 375b5dd306)
9 months ago
Andreas Dolp c92eb0131a doc: fix typo and missing newline in rules/ssh_keywords.
(cherry picked from commit cc590b54c7)
9 months ago
Andreas Dolp 62d2a69f8a doc: fix doc syntax error in rate_filter example.
(cherry picked from commit 228abb7da0)
9 months ago
Adam Kiripolsky e3433c75fc dpdk: fix assignment of pkt_mempools to ldev
Removed loop around assignment of pkt_mempools
to ldev_instance->dpdk_vars as it is not needed anymore.

Ticket: 7879
(cherry picked from commit 5a4d280461)
9 months ago
Philippe Antoine c8897f4407 scripts: setup app layer rustfmt mod.rs last
Otherwise rustfmt complains that parser.rs does not exist yet

(cherry picked from commit f7f8fbc116)
9 months ago
Victor Julien c12680de1b 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.
(cherry picked from commit ce9c7a024e)
9 months ago
Victor Julien f9cddc004c output: fix long logline test
Fixes: 023a2fe9ab ("unittests: fix format-truncation warning")
(cherry picked from commit b7650a45fa)
9 months ago
Victor Julien 76d6c75634 unittests: disable LogCustomFormatTest01 for MinGW
Test was previously not run so it was missed that it fails.

(cherry picked from commit c8cb029de9)
9 months ago
Victor Julien 62793c573f unittests: don't leak memory with --list-unittests
(cherry picked from commit 57d1f20dfa)
9 months ago
Philippe Antoine 89cbaa7153 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.

(cherry picked from commit c99e159341)
9 months ago
Fupeng Zhao 693ca03379 decoder/vxlan: fix VXLAN port detection per RFC 7348
Simplify DecodeVXLANEnabledForPort() to only check destination port
to avoids false positives when identifying VXLAN traffic.

Per RFC 7348 §5, VXLAN identification is based solely on the outer UDP
destination port (4789), regardless of inner packet direction. The
outer UDP source port is used for load balancing via inner packet
hash and should not be considered for VXLAN detection. This ensures
correct VXLAN identification for all encapsulated traffic patterns.

Checking both source and destination ports could incorrectly classify
non-VXLAN UDP traffic as VXLAN when the source port happens to be 4789,
leading to false positives in VXLAN detection and potential decode errors.

(cherry picked from commit 7a04a032b9)
9 months ago
Juliana Fajardini 9a66ac0696 doc/install: fix minor typo 10 months ago
Juliana Fajardini c045a61d53 doc: remove outdated GITGUIDE 10 months ago
Philippe Antoine eef5794e5a mime: retain some stateful data for quoted-printable
In case a sequence like =3D is split over 2 calls to SCSmtpMimeParseLine

Ticket: 7950
(cherry picked from commit 56e08c9134)
10 months ago
Jeff Lucovsky 4e120c0a2d ci/mt: Include MT tests in CI workflows
Add the MT live tests to the CI workflow.

(cherry picked from commit 846eb44a9d)
10 months ago
Jeff Lucovsky 3420968d93 mt/ci: Add MT live test
Add MT live test capability:
- multi-tenant.sh: harness that sets up and steps through MT steps
- suricata-mt.yaml: Adds MT capability to Suricata
- tenant-1.yaml: Per-tenant configuration file

(cherry picked from commit 51c9609c7c)
10 months ago
Victor Julien ef91b8544c github-actions: add validate cherry-pick line check 10 months ago
Cheng Longfei e13fe6a90d lua: fix null dereference in tx HTTP accessor functions
Fix crashes in Lua when calling tx:response_line(), tx:request_line(),
tx:request_uri_raw(), or tx:request_host() on incomplete or malformed
HTTP transactions.

These functions return bstr pointers which may be NULL. Add NULL
checks before calling bstr_ptr() and bstr_len() to avoid segfaults.

Ticket: #7829
(cherry picked from commit 9fb33bbaf6)
10 months ago
Philippe Antoine dae9264120 doc: really enforce more the completeness of json schema
Completes commit f1f32a39ee

End better describe exception_policy
10 months ago
dependabot[bot] cf4a86185d github-actions: bump codecov/codecov-action from 5.5.0 to 5.5.1
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5.5.0 to 5.5.1.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](fdcc847654...5a1091511a)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-version: 5.5.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
10 months ago
dependabot[bot] 5aa30fccc8 github-actions: bump actions/github-script from 7.0.1 to 8.0.0
Bumps [actions/github-script](https://github.com/actions/github-script) from 7.0.1 to 8.0.0.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](60a0d83039...ed597411d8)

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

Signed-off-by: dependabot[bot] <support@github.com>
10 months ago
dependabot[bot] f18c8883cf github-actions: bump github/codeql-action from 3.30.0 to 3.30.3
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.30.0 to 3.30.3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Commits](https://github.com/github/codeql-action/compare/v3.30.0...v3.30.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
10 months ago
Shivani Bhardwaj 0d65d35c92 version: start development towards 8.0.2 10 months ago
Victor Julien 46203de0e9 doc: adjust for master to main rename 10 months ago
Victor Julien b58c8461c3 clang-format: adjust for master to main rename 10 months ago
Victor Julien 63767252be github-action: adjust for master to main rename 10 months ago
Jason Ish 2444feed0d release: 8.0.1; update changelog 10 months ago
Jason Ish 708874053f detect/mpm: prevent format string truncation warnings
- Declare the profiling name variable once we know the actual size allowed
for the name instead of before. Prevents an snprintf truncation warning.

- Account for the null byte when calculating how much space is left to
avoid an snprintf format string truncation warning.
10 months ago
Victor Julien 2b6df6381a detect/mpm: improve profiling name for frame/pkt buffers 10 months ago
Victor Julien 6655283d2d detect/mpm: improve profiling name creation
The (p)name is used in profiling and will now always have the full id.

Ticket: #7861.
10 months ago
Victor Julien 38a2cba5c3 misc: harden string shortener
Ticket: #7861.
10 months ago
Philippe Antoine d590fdfe42 detect/tls: fix null deref with subjectaltname
Ticket: 7881
10 months ago
Jeff Lucovsky 9f32550e18 detect/entropy: Ensure entropy matcher has flow
Make sure that the flow is available to the entropy matcher so it can
handle content that's not anchored to a sticky buffer.

Issue: 7838
10 months ago
Victor Julien e62eb00459 doc/userguide: add ips chapter; add concept
Move setup guides into the new chapter as well.

Explain `stream.inline` logic.

Ticket: #5513.
Ticket: #6284.
10 months ago
Philippe Antoine 9146fc8957 doc: upgrade note about keyword tls.cert_subject
Following commit 5379b52af2
rules that use multiple times the keyword tls.cert_subject
will result in

Warning: detect: duplicate instance for tls.cert_subject

These rules likely meant to use a multi-buffer which is not the
case for tls.cert_subject (even if it was documented so).

Ticket: 7890

This is put in a new section of upgrade notes for
upgrading to 8.0.1
10 months ago
Juliana Fajardini 27e165f760 doc/rules/index: keep rule types doc near the end
As this chapter is more meta than about rule keywords, keep it by the
end of the index, to have some semantic separation from the other
sections.
10 months ago
Juliana Fajardini d5810a42e1 userguide: document how suricata processes rules
Added a page that explains how rules are prioritized by Suri, as well
as what main different types of inspection happen and what elements are
involved when ordering rules.

Task #5449
10 months ago
Victor Julien 39dfcaf1b3 unix-socket: address scan-build warning
CC       unix-manager.o
unix-manager.c:258:13: warning: Use of memory after it is freed [unix.Malloc]
  258 |         if (item->fd == fd) {
      |             ^~~~~~~~
1 warning generated.
10 months ago
Victor Julien f963c408bd unix-socket: fix memory leak on client disconnect
If a client loses the connection during a reload it initiated there is
a small memory leak.

Bug: #7891.
10 months ago
Philippe Antoine 266809a0f2 ci: check json schema sets always additionalProperties
Even if it is set to true.
Avoids forgetting adding fields and thinking it is tested
10 months ago
Philippe Antoine 2028a3f9f8 doc: complete json schema with integer keywords 10 months ago
Philippe Antoine f1f32a39ee doc: enforce more the completenes of json schema
see jq 'paths( objects | (.type == "object" and (has("additionalProperties") | not) )) | join(".")' etc/schema.json

fix and complete bittorrent on the way
10 months ago
Philippe Antoine 421fb8ac31 doc/ldap: complete json schema 10 months ago
Shivani Bhardwaj b21f737aee doc: add doc on internals of inspection of raw data
Explain briefly the internals of inspection of raw data in the following order:
- Stream Engine
- Stream reassembly
- Role of Detection Engine and Applayer Parsers
- High level communication between Stream and Detection Engine
- Relevant suricata.yaml settings

alongwith some diagrams.

Ticket 4351
10 months ago
Shivani Bhardwaj 9ed5ac7669 doc: make firewall table names consistent 11 months ago
Shivani Bhardwaj 7fec1883cd doc: add more info to firewall design
Add information about:
- available tables, default policies and rule ordering
- Packet layer and applayer tables and hooks
- engine analysis output
- commandline options available
- how to load firewall rules

Also, reorganize sections and content to assist the definitions.
11 months ago
Shivani Bhardwaj 5820b52b0a detect: remove redundant fw rule path log 11 months ago
Victor Julien f333a528f3 stream: workaround scan-build warnings
stream-tcp.c:1938:16: warning: Access to field 'next' results in a dereference of a null pointer (loaded from variable 'tail') [core.NullDereference]
 1938 |     tail->next = old_head;
      |     ~~~~       ^
1 warning generated.

stream-tcp.c:1982:5: warning: Potential leak of memory pointed to by 'q' [unix.Malloc]
 1982 |     ssn->queue_len++;
      |     ^~~
1 warning generated.
11 months ago