]> git.ipfire.org Git - thirdparty/suricata.git/log
thirdparty/suricata.git
2 days agorelease: 8.0.2; update changelog main-8.0.x suricata-8.0.2
Shivani Bhardwaj [Wed, 5 Nov 2025 14:31:22 +0000 (20:01 +0530)] 
release: 8.0.2; update changelog

2 days agooutput/alert: fix alert index access for verdict
Juliana Fajardini [Sat, 1 Nov 2025 04:38:12 +0000 (21:38 -0700)] 
output/alert: fix alert index access for verdict

The engine uses p.alerts.cnt as an index to access the packet alert that
has the `pass` action for the verdict.
For IDS/IPS mode, a `pass` will always be the last signature in the
alert queue. However, that position could be either `p.alerts.cnt` or
`p.alerts.cnt-1`, depending on whether the `pass` rule has the `alert`
keyword or not.
This patch fix corner-case scenarios of:
- accessing an index out of boundaries
- off-by-one access
Without changing how the engine increments the alerts.cnt, as this is
used in many places, and would be a more invasive change.
It checks the two different scenarios, plus the case when there is only
a single match as a silent `pass` rule.

Bug #8021
Bug #7630

2 days agooutput/http: log content-type like other headers
Philippe Antoine [Thu, 30 Oct 2025 10:43:27 +0000 (11:43 +0100)] 
output/http: log content-type like other headers

Ticket: 8056

Avoid stack allocation.
Do not handle null and ; especially

(cherry picked from commit b8411fcc8dfc16910c3080d4d8c03a9a64c3a1f7)

2 days agounix-socket: return after closing on too long
Philippe Antoine [Thu, 30 Oct 2025 21:08:28 +0000 (22:08 +0100)] 
unix-socket: return after closing on too long

Avoids later use after free

Ticket: 8063
(cherry picked from commit acc051ac943759fbb7ba68320844eda3e96c60a4)

2 days agoutil/swf: move allocation from stack to heap
Philippe Antoine [Thu, 30 Oct 2025 10:27:22 +0000 (11:27 +0100)] 
util/swf: move allocation from stack to heap

As it can overflow the stack

Ticket: 8055
(cherry picked from commit a84addb771846f6d4d55ec535a4591f58369e49c)

2 days agohtp: bound decompression
Philippe Antoine [Sun, 5 Oct 2025 19:13:21 +0000 (21:13 +0200)] 
htp: bound decompression

Ticket: 7980

Usage of Vec<u8> instead of Box<u8> gave the ability to callers
to grow the buffer (indefinitely)
This was regressed in 16fee333687d9fac72a1cf5d37ff08bfb780b3ed

Additionnaly, use rust WriteZero instead of WouldBlock as a more
fitting error when cursor is full, as that error kind is the
one tested by callers.

(cherry picked from commit f2b6540c52812518f81f3df382a49af55a325377)

2 days agosnmp: can be set to detection-only 14276/head
Li Heng [Fri, 31 Oct 2025 02:01:17 +0000 (10:01 +0800)] 
snmp: can be set to detection-only

Realloc alp_ctx.ctxs when a dynamic alproto is registered and
g_alproto_max increases. So dynamic alproto can be treated as
real/normal ones. And app-layer switch can be set to any value
of no/deteciton-only/yes.

Ticket: 8000
(cherry picked from commit c141c55bc63e24c58b1001177890b092edaca8fe)

2 days agopython/Makefile.am: fix file permissions of python/suricata/config/defaults.py
Andreas Dolp [Wed, 29 Oct 2025 20:43:04 +0000 (21:43 +0100)] 
python/Makefile.am: fix file permissions of python/suricata/config/defaults.py

The install command, by default, sets 0755 if -m is not specified, so the
file python/suricata/config/defaults.py will be marked as an executable,
though it isn't.

(cherry picked from commit fcbae97a1fe0e923f1d3ccbf60e4ef2a3eac854a)

2 days agoexception-policy: rename 'reject-both' to 'rejectboth'
Victor Julien [Sat, 1 Nov 2025 07:57:23 +0000 (08:57 +0100)] 
exception-policy: rename 'reject-both' to 'rejectboth'

To align it with the rule action.

(cherry picked from commit ec65fd430e931e99b01aea162f88d16efab2e533)

2 days agodoc/userguide: document reject-both expection policy
Victor Julien [Fri, 31 Oct 2025 15:20:17 +0000 (16:20 +0100)] 
doc/userguide: document reject-both expection policy

Ticket: #5974.
(cherry picked from commit 0c4a8fd18315ace0f94585cc2d96dfe9d4e1f2f7)

2 days agoexception-policy: add 'reject-both' option
Victor Julien [Fri, 17 Oct 2025 10:16:48 +0000 (12:16 +0200)] 
exception-policy: add 'reject-both' option

Allow rejecting both sides of a connection. Has the same support
as regular reject (which is essentially rejectsrc).

Ticket: #5974.
(cherry picked from commit acb769291a746f50d0d967aaec71049b76c50d5b)

3 days agooutput/jsonbuilder: helper function SCJbSetPrintAsciiString 14265/head
Philippe Antoine [Thu, 30 Oct 2025 10:18:15 +0000 (11:18 +0100)] 
output/jsonbuilder: helper function SCJbSetPrintAsciiString

To replace C PrintStringsToBuffer and avoid a stack alloc
+ copy

Ticket: 8004
(cherry picked from commit 7447651fa0956ff4ce55283a51b4a9494ec8cc6a)

4 days agolua: remove luajit pushlstring workaround 14257/head
Victor Julien [Fri, 31 Oct 2025 08:38:55 +0000 (09:38 +0100)] 
lua: remove luajit pushlstring workaround

81ee6f5aadeb ("lua: push correct length back through ScFlowvarGet, work around valgrind warning")
added a workaround for valgrind warnings in pushing a string buffer
into the lua state. This is no longer needed as tested with both
address sanitizer and valgrind.

(cherry picked from commit 52fd61dffdfa50c9a2d4ec24865a54da0b8f0a2a)

5 days agodoc/devguide: document eve callback 14242/head 14247/head
Jason Ish [Wed, 29 Oct 2025 23:47:44 +0000 (17:47 -0600)] 
doc/devguide: document eve callback

Document the callback for adding additional data to EVE.

Ticket: #4708
(cherry picked from commit cdd4ea0f1144d36cf9da4137b4c0faf030f71bb5)

5 days agodoc/devguide: document eve file types
Jason Ish [Thu, 23 Oct 2025 22:58:09 +0000 (16:58 -0600)] 
doc/devguide: document eve file types

Ticket: #4708
(cherry picked from commit 9fffc09ad70ce4b5fbd07e8427b1e71259b86f30)

5 days agooutput/eve: fix typos
Juliana Fajardini [Thu, 30 Oct 2025 15:34:44 +0000 (08:34 -0700)] 
output/eve: fix typos

To accompany documentation work done in

Task #4708

(cherry picked from commit 6b75b937ff8570037bcc6b3946903b2a72e458f9)

7 days agorequirements.txt: update to suricata-update 1.3.7 14227/head 14228/head 14234/head
Jason Ish [Fri, 31 Oct 2025 17:36:15 +0000 (11:36 -0600)] 
requirements.txt: update to suricata-update 1.3.7

8 days agoutil/var: add NULL check in VarNameStoreRegister 14213/head
Philippe Antoine [Wed, 29 Oct 2025 21:29:11 +0000 (22:29 +0100)] 
util/var: add NULL check in VarNameStoreRegister

And check return value in entropy keyword setup

(cherry picked from commit 854201703e51afd0945c5a9ec4d5b62303f9ca9d)

8 days agodetect: fix null deref with entropy keyword
Philippe Antoine [Sun, 28 Sep 2025 19:55:44 +0000 (21:55 +0200)] 
detect: fix null deref with entropy keyword

Ticket: 7959

Usage of entropy with base64_data led to NULL dereference

(cherry picked from commit 6d703af505ddf3c2a98eaff24cb1461dbf1ae1a2)

8 days agodetect/ip.src: Allow use with transforms
Jeff Lucovsky [Wed, 22 Oct 2025 14:38:08 +0000 (10:38 -0400)] 
detect/ip.src: Allow use with transforms

This commit registers ip.src/ip.dst properly so they can be used with
transforms.

Issue: 8015
(cherry picked from commit 7e0d6f4a1e2a6016ec43fd4b3d1e58d2021f9bbc)

8 days agoflow-timeout: Use yaml config value for CAPTURE_BYPASSED flow
Amir Boussejra [Tue, 28 Oct 2025 12:49:43 +0000 (13:49 +0100)] 
flow-timeout: Use yaml config value for CAPTURE_BYPASSED flow

Instead of non configurable constant FLOW_BYPASSED_TIMEOUT

Ticket: #8014
(cherry picked from commit 56c8db6cb6c00e7661d7bde1d6efd50782d24258)

11 days agoapplayer/tls: do not free SAN for decoding error 14145/head 14195/head
Shivani Bhardwaj [Sat, 11 Oct 2025 08:45:37 +0000 (14:15 +0530)] 
applayer/tls: do not free SAN for decoding error

SSL connp maintains all the state and certificate data that was
parsed/decoded successfully and it must retain that for later usage.
There should be just one place to free this object which is SSLStateFree
for both the directions. By freeing the connp data during parsing error,
there is room for memory errors.
This works so far because the field parsed after this cannot error out so
if there's an error parsing this, it anyway does not exist. However, this
is incorrect and leaves scope for mistakes.

Remove this extra free and treat SAN like all other TLS keywords.

Bug 7996

(cherry picked from commit b090fc61fd11a90113c0d8793b2ef97b6e273068)

2 weeks agogithub-ci: build-test DPDK v23.11.x and v24.11.x 14122/head
Lukas Sismis [Sun, 3 Nov 2024 19:04:25 +0000 (20:04 +0100)] 
github-ci: build-test DPDK v23.11.x and v24.11.x

Ticket: 7978
(cherry picked from commit 7ca95eeec059d751c6c42292441b6bd08413f0af)

2 weeks agogithub-ci: bump up tested DPDK versions
Lukas Sismis [Sun, 3 Nov 2024 19:09:55 +0000 (20:09 +0100)] 
github-ci: bump up tested DPDK versions

Ubuntu 20.04, distro suited at the time for 8.0.x, still contains
DPDK 19.11 in the pkg repository, so it keeps being build-tested as
opposed to the 9.0.x version.

(cherry picked from commit ee0b08692cf3ea1aae3bb694f7e738630e2979ac)

2 weeks agodpdk: supress a warning of the bond function
Lukas Sismis [Sun, 8 Sep 2024 20:46:01 +0000 (22:46 +0200)] 
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: 7990
(cherry picked from commit 27383f878d20c9cacc74d2382c9e957072b92759)

2 weeks agodpdk: fix the CPU exclude logic
Lukas Sismis [Sun, 7 Apr 2024 20:04:06 +0000 (22:04 +0200)] 
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: 7976
(cherry picked from commit 8f6309474431e6ecee5b62387d1ae4559e627f97)

2 weeks agodoc/userguide: add rule hooks to protocol doc
Victor Julien [Thu, 18 Sep 2025 10:48:38 +0000 (12:48 +0200)] 
doc/userguide: add rule hooks to protocol doc

Ticket #7662.

(cherry picked from commit be5c83ed53bcc2df1620df36d49365d3d49a1708)

2 weeks agodoc/userguide: add xbits tx scope support
Victor Julien [Tue, 23 Sep 2025 12:22:57 +0000 (14:22 +0200)] 
doc/userguide: add xbits tx scope support

Ticket #7680.

(cherry picked from commit 480e664b4caf34efe8cf9cc883756528bc069760)

2 weeks agodoc/output: Highlight ethertype value change 14107/head
Jeff Lucovsky [Sun, 5 Oct 2025 13:33:14 +0000 (09:33 -0400)] 
doc/output: Highlight ethertype value change

Issue: 8007

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.

(cherry picked from commit 16d124cfda2ce46bbba81beabfd4a6ea27daca43)

2 weeks agooutput: Display ethertype properly
Jeff Lucovsky [Fri, 3 Oct 2025 14:18:03 +0000 (10:18 -0400)] 
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
(cherry picked from commit 0af77934100df64c8d050cc162cd133344c19838)

2 weeks agopcap-log: fix bpf-filter not set for multi mode 14089/head
Victor Julien [Thu, 16 Oct 2025 11:08:19 +0000 (13:08 +0200)] 
pcap-log: fix bpf-filter not set for multi mode

Bug: #8002.
(cherry picked from commit 2f633be1a9771cac055688693e9367c444d4000e)

2 weeks agoci: remove cargo update test 14082/head
Jason Ish [Sun, 19 Oct 2025 01:00:51 +0000 (19:00 -0600)] 
ci: remove cargo update test

Being the stable branch, cargo update doesn't make much sense unless we
have a specific reason to update a crate. The audit check has been
left, which will alert us to crates that may need an update.

2 weeks agodoc/userguide: add a known issues page 14073/head 14074/head
Jason Ish [Thu, 16 Oct 2025 22:52:27 +0000 (16:52 -0600)] 
doc/userguide: add a known issues page

The idea of this page is to track known issues on a release branch
that we do not plan to fix.

3 weeks agoike: don't log duplicate attributes
Jason Ish [Thu, 16 Oct 2025 22:42:45 +0000 (16:42 -0600)] 
ike: don't log duplicate attributes

Track what attributes have been logged and skip over duplicate
attributes to avoid having duplicate fields in the JSON object, which
is invalid JSON.

This is lossy, subsequent attributes are lost.

Ticket: #7923

3 weeks agoike/detect: info log message should be debug
Jason Ish [Thu, 25 Sep 2025 17:02:08 +0000 (11:02 -0600)] 
ike/detect: info log message should be debug

(cherry picked from commit b543e28402971f74dfd338d4598ee28bba340578)

3 weeks agohttp2: add INTERNAL_ERROR for http2.error_code keyword 14039/head
Philippe Antoine [Wed, 15 Oct 2025 18:25:45 +0000 (20:25 +0200)] 
http2: add INTERNAL_ERROR for http2.error_code keyword

3 weeks agohttp2: fix parsing of goaway frames
Philippe Antoine [Thu, 9 Oct 2025 18:32:00 +0000 (20:32 +0200)] 
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 9a4a29e2189fbd8e5bf47d00b0bcdecaf2aa7d04)

3 weeks agodoc: fix typo duplicate 'of'
Andreas Dolp [Wed, 17 Sep 2025 19:18:18 +0000 (21:18 +0200)] 
doc: fix typo duplicate 'of'

Thanks to catenacyber

(cherry picked from commit 37d748d44182d387ccf0b6a66eae84a7b1e2844a)

3 weeks agodoc: fix typo /var/run/suricata in file permissions docs.
Andreas Dolp [Tue, 16 Sep 2025 18:22:57 +0000 (20:22 +0200)] 
doc: fix typo /var/run/suricata in file permissions docs.

(cherry picked from commit 375b5dd3067beb83b70e725c305a0dc08ee79efa)

3 weeks agodoc: fix typo and missing newline in rules/ssh_keywords.
Andreas Dolp [Sat, 17 Sep 2022 09:16:03 +0000 (11:16 +0200)] 
doc: fix typo and missing newline in rules/ssh_keywords.

(cherry picked from commit cc590b54c748174c07d88e0e3846601c28e934a5)

3 weeks agodoc: fix doc syntax error in rate_filter example.
Andreas Dolp [Tue, 2 Aug 2022 09:35:22 +0000 (11:35 +0200)] 
doc: fix doc syntax error in rate_filter example.

(cherry picked from commit 228abb7da094523a07952d18c6899b4cf95e7129)

3 weeks agodpdk: fix assignment of pkt_mempools to ldev
Adam Kiripolsky [Wed, 3 Sep 2025 12:12:45 +0000 (14:12 +0200)] 
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 5a4d280461ace9dc835ea277a822a41f43e50984)

3 weeks agoscripts: setup app layer rustfmt mod.rs last
Philippe Antoine [Fri, 26 Sep 2025 12:03:39 +0000 (14:03 +0200)] 
scripts: setup app layer rustfmt mod.rs last

Otherwise rustfmt complains that parser.rs does not exist yet

(cherry picked from commit f7f8fbc116d76d7ec7d8e80e2a46222f10118a51)

3 weeks agodetect/content: don't leak replace memory
Victor Julien [Sat, 11 Oct 2025 05:40:50 +0000 (07:40 +0200)] 
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 ce9c7a024efe74656e7b054a5fb93718901ae7f3)

3 weeks agooutput: fix long logline test
Victor Julien [Sat, 11 Oct 2025 18:06:24 +0000 (20:06 +0200)] 
output: fix long logline test

Fixes: 023a2fe9ab1f ("unittests: fix format-truncation warning")
(cherry picked from commit b7650a45fa935d9b204490eceac98a535663b8ff)

3 weeks agounittests: disable LogCustomFormatTest01 for MinGW
Victor Julien [Wed, 8 Oct 2025 12:12:55 +0000 (14:12 +0200)] 
unittests: disable LogCustomFormatTest01 for MinGW

Test was previously not run so it was missed that it fails.

(cherry picked from commit c8cb029de9fd9e03f81f83286d0f0afa25c9b7ec)

3 weeks agounittests: don't leak memory with --list-unittests
Victor Julien [Mon, 6 Oct 2025 09:45:36 +0000 (11:45 +0200)] 
unittests: don't leak memory with --list-unittests

(cherry picked from commit 57d1f20dfaa8144c6938cb7487f5ceaaf57181ef)

3 weeks agodetect/files: support protocols only over udp
Philippe Antoine [Mon, 22 Sep 2025 13:41:39 +0000 (15:41 +0200)] 
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 c99e15934104bee6a68258770736fb6e481cf5a6)

4 weeks agodecoder/vxlan: fix VXLAN port detection per RFC 7348 14001/head
Fupeng Zhao [Tue, 24 Jun 2025 06:27:26 +0000 (14:27 +0800)] 
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 7a04a032b9387c85321a24a4105700c288aee5e6)

4 weeks agodoc/install: fix minor typo 13981/head
Juliana Fajardini [Tue, 7 Oct 2025 14:18:22 +0000 (11:18 -0300)] 
doc/install: fix minor typo

4 weeks agodoc: remove outdated GITGUIDE
Juliana Fajardini [Tue, 7 Oct 2025 14:18:10 +0000 (11:18 -0300)] 
doc: remove outdated GITGUIDE

4 weeks agomime: retain some stateful data for quoted-printable 13976/head
Philippe Antoine [Mon, 29 Sep 2025 13:11:41 +0000 (15:11 +0200)] 
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 56e08c9134236ed851ccab3430219ca60354b455)

5 weeks agoci/mt: Include MT tests in CI workflows 13942/head 13962/head
Jeff Lucovsky [Tue, 30 Sep 2025 12:27:15 +0000 (08:27 -0400)] 
ci/mt: Include MT tests in CI workflows

Add the MT live tests to the CI workflow.

(cherry picked from commit 846eb44a9de96134202e12e6f0384161a0ac431f)

5 weeks agomt/ci: Add MT live test
Jeff Lucovsky [Sat, 27 Sep 2025 12:00:15 +0000 (08:00 -0400)] 
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 51c9609c7c7d56082b8f5939c2f4bf11cfb99613)

5 weeks agogithub-actions: add validate cherry-pick line check 13917/head
Victor Julien [Fri, 26 Sep 2025 18:41:22 +0000 (20:41 +0200)] 
github-actions: add validate cherry-pick line check

6 weeks agolua: fix null dereference in tx HTTP accessor functions 13912/head
Cheng Longfei [Wed, 30 Jul 2025 05:50:01 +0000 (13:50 +0800)] 
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 9fb33bbaf6902cf4f0498b52330e2bb85cba974c)

7 weeks agodoc: really enforce more the completeness of json schema 13863/head
Philippe Antoine [Sun, 14 Sep 2025 19:50:12 +0000 (21:50 +0200)] 
doc: really enforce more the completeness of json schema

Completes commit f1f32a39eebe16dbedf9189714772a5915e83f3f

End better describe exception_policy

7 weeks agogithub-actions: bump codecov/codecov-action from 5.5.0 to 5.5.1
dependabot[bot] [Wed, 17 Sep 2025 02:18:37 +0000 (02:18 +0000)] 
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](https://github.com/codecov/codecov-action/compare/fdcc8476540edceab3de004e990f80d881c6cc00...5a1091511ad55cbe89839c7260b706298ca349f7)

---
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>
7 weeks agogithub-actions: bump actions/github-script from 7.0.1 to 8.0.0
dependabot[bot] [Wed, 17 Sep 2025 02:18:37 +0000 (02:18 +0000)] 
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](https://github.com/actions/github-script/compare/60a0d83039c74a4aee543508d2ffcb1c3799cdea...ed597411d8f924073f98dfc5c65a23a2325f34cd)

---
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>
7 weeks agogithub-actions: bump github/codeql-action from 3.30.0 to 3.30.3
dependabot[bot] [Wed, 17 Sep 2025 01:29:11 +0000 (01:29 +0000)] 
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>
7 weeks agoversion: start development towards 8.0.2 13862/head
Shivani Bhardwaj [Wed, 17 Sep 2025 03:53:34 +0000 (09:23 +0530)] 
version: start development towards 8.0.2

7 weeks agodoc: adjust for master to main rename 13857/head 13860/head
Victor Julien [Tue, 16 Sep 2025 15:20:56 +0000 (17:20 +0200)] 
doc: adjust for master to main rename

7 weeks agoclang-format: adjust for master to main rename 13855/head
Victor Julien [Tue, 16 Sep 2025 13:09:50 +0000 (15:09 +0200)] 
clang-format: adjust for master to main rename

7 weeks agogithub-action: adjust for master to main rename
Victor Julien [Tue, 16 Sep 2025 13:07:51 +0000 (15:07 +0200)] 
github-action: adjust for master to main rename

7 weeks agorelease: 8.0.1; update changelog suricata-8.0.1
Jason Ish [Tue, 16 Sep 2025 00:55:42 +0000 (18:55 -0600)] 
release: 8.0.1; update changelog

7 weeks agodetect/mpm: prevent format string truncation warnings
Jason Ish [Mon, 15 Sep 2025 22:01:37 +0000 (16:01 -0600)] 
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.

7 weeks agodetect/mpm: improve profiling name for frame/pkt buffers
Victor Julien [Fri, 12 Sep 2025 12:41:05 +0000 (14:41 +0200)] 
detect/mpm: improve profiling name for frame/pkt buffers

7 weeks agodetect/mpm: improve profiling name creation
Victor Julien [Fri, 12 Sep 2025 12:21:36 +0000 (14:21 +0200)] 
detect/mpm: improve profiling name creation

The (p)name is used in profiling and will now always have the full id.

Ticket: #7861.

7 weeks agomisc: harden string shortener
Victor Julien [Fri, 12 Sep 2025 12:20:31 +0000 (14:20 +0200)] 
misc: harden string shortener

Ticket: #7861.

7 weeks agodetect/tls: fix null deref with subjectaltname
Philippe Antoine [Wed, 3 Sep 2025 20:07:27 +0000 (22:07 +0200)] 
detect/tls: fix null deref with subjectaltname

Ticket: 7881

7 weeks agodetect/entropy: Ensure entropy matcher has flow
Jeff Lucovsky [Tue, 12 Aug 2025 12:13:56 +0000 (08:13 -0400)] 
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

7 weeks agodoc/userguide: add ips chapter; add concept 13846/head
Victor Julien [Thu, 3 Jul 2025 13:31:51 +0000 (15:31 +0200)] 
doc/userguide: add ips chapter; add concept

Move setup guides into the new chapter as well.

Explain `stream.inline` logic.

Ticket: #5513.
Ticket: #6284.

7 weeks agodoc: upgrade note about keyword tls.cert_subject
Philippe Antoine [Tue, 9 Sep 2025 12:44:16 +0000 (14:44 +0200)] 
doc: upgrade note about keyword tls.cert_subject

Following commit 5379b52af2df9eb2911fc4655d5db5defcecb863
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

7 weeks agodoc/rules/index: keep rule types doc near the end 13843/head
Juliana Fajardini [Fri, 20 Jun 2025 02:33:39 +0000 (23:33 -0300)] 
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.

7 weeks agouserguide: document how suricata processes rules
Juliana Fajardini [Thu, 21 Jul 2022 20:44:59 +0000 (17:44 -0300)] 
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

7 weeks agounix-socket: address scan-build warning
Victor Julien [Wed, 10 Sep 2025 14:06:11 +0000 (16:06 +0200)] 
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.

7 weeks agounix-socket: fix memory leak on client disconnect
Victor Julien [Wed, 10 Sep 2025 11:35:51 +0000 (13:35 +0200)] 
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.

7 weeks agoci: check json schema sets always additionalProperties
Philippe Antoine [Mon, 8 Sep 2025 19:05:33 +0000 (21:05 +0200)] 
ci: check json schema sets always additionalProperties

Even if it is set to true.
Avoids forgetting adding fields and thinking it is tested

7 weeks agodoc: complete json schema with integer keywords
Philippe Antoine [Mon, 8 Sep 2025 17:07:16 +0000 (19:07 +0200)] 
doc: complete json schema with integer keywords

7 weeks agodoc: enforce more the completenes of json schema
Philippe Antoine [Mon, 8 Sep 2025 17:33:13 +0000 (19:33 +0200)] 
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

7 weeks agodoc/ldap: complete json schema
Philippe Antoine [Mon, 8 Sep 2025 10:16:44 +0000 (12:16 +0200)] 
doc/ldap: complete json schema

7 weeks agodoc: add doc on internals of inspection of raw data
Shivani Bhardwaj [Fri, 20 Jun 2025 09:57:27 +0000 (15:27 +0530)] 
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

8 weeks agodoc: make firewall table names consistent 13817/head
Shivani Bhardwaj [Fri, 5 Sep 2025 10:25:39 +0000 (15:55 +0530)] 
doc: make firewall table names consistent

8 weeks agodoc: add more info to firewall design
Shivani Bhardwaj [Fri, 5 Sep 2025 10:21:56 +0000 (15:51 +0530)] 
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.

8 weeks agodetect: remove redundant fw rule path log
Shivani Bhardwaj [Fri, 5 Sep 2025 10:17:46 +0000 (15:47 +0530)] 
detect: remove redundant fw rule path log

8 weeks agostream: workaround scan-build warnings
Victor Julien [Wed, 3 Sep 2025 16:38:11 +0000 (18:38 +0200)] 
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.

8 weeks agostream: add more liberal timestamp behavior in 3WHS
Victor Julien [Mon, 1 Sep 2025 12:51:56 +0000 (14:51 +0200)] 
stream: add more liberal timestamp behavior in 3WHS

RFC 7323 forbids a server to respond with a timestamp option in the
SYN/ACK when the SYN didn't have a timestamp option:

   A TCP MAY send the TSopt in an initial <SYN> segment (i.e., segment
   containing a SYN bit and no ACK bit), and MAY send a TSopt in
   <SYN,ACK> only if it received a TSopt in the initial <SYN> segment
   for the connection.

   Once TSopt has been successfully negotiated, that is both <SYN> and
   <SYN,ACK> contain TSopt, the TSopt MUST be sent in every non-<RST>
   segment for the duration of the connection, and SHOULD be sent in an
   <RST> segment (see Section 5.2 for details).

However, in the real world this pattern happens on benign traffic. This
would lead to missing logs and detection, and in IPS mode such sessions
would be blocked.

This patch allows this pattern when the `stream.liberal-timestamps` is
enabled (enabled by default).

Bug #4702.

8 weeks agostream: improve SYN and SYN/ACK retransmission handling
Victor Julien [Wed, 20 Aug 2025 10:43:27 +0000 (12:43 +0200)] 
stream: improve SYN and SYN/ACK retransmission handling

Take SEQ and ACK into account for more scenarios.

SYN on SYN_SENT

In this case the SYN packets with different SEQ and other properties are
queued up. Each packet updates the ssn to reflect the last packet to
come in. The old ssn data is added to a TcpStateQueue entry in
TcpSession::queue. If the max queue length is exceeded, the oldest entry
is evicted. The queue is actually a single linked list, where the list
head reflects the oldest entry.

SYN/ACK on SYN_SENT

In this case the first check is if the SYN/ACK matches the session. If
it doesn't, the queue is checked to see if there SYN's stored. If one is
found that matches, it is used and the session is updated to reflect
that.

SYN/ACK on SYN_RECV

SYN/ACK resent on the SYN_RECV state. In this case the ssn is updated
from the current packet. The old settings are stored in a TcpStateQueue
entry in the TcpSession::queue.

ACK on SYN_RECV

Checks any stored SYN/ACKs before checking the session. If a queued
SYN/ACK was sound, the session is updated to match it.

Ticket: #3844.
Ticket: #7657.

8 weeks agostream: avoid ineffective state bump in TFO
Victor Julien [Fri, 22 Aug 2025 14:30:29 +0000 (16:30 +0200)] 
stream: avoid ineffective state bump in TFO

Do not set session state to established, as it is unconditionally
overwritten to syn_recv afterwards.

8 weeks agostream: minor improvement to timestamp debug messages
Victor Julien [Mon, 1 Sep 2025 12:51:49 +0000 (14:51 +0200)] 
stream: minor improvement to timestamp debug messages

Add pcap_cnt for easier debugging.

8 weeks agoci: do not run undefined for clusterfuzzlite
Philippe Antoine [Thu, 4 Sep 2025 08:45:14 +0000 (10:45 +0200)] 
ci: do not run undefined for clusterfuzzlite

as it takes too long to build

8 weeks agoci: log data at various clusterfuzzlite steps
Philippe Antoine [Thu, 4 Sep 2025 07:57:24 +0000 (09:57 +0200)] 
ci: log data at various clusterfuzzlite steps

to investigate slowness of build

8 weeks agoci: clusterfuzzlite does not need to clone libhtp
Philippe Antoine [Thu, 4 Sep 2025 07:44:38 +0000 (09:44 +0200)] 
ci: clusterfuzzlite does not need to clone libhtp

as suricata is using libhtp-rs now

8 weeks agoci: remove unnecessary packages from clusterfuzzlite
Philippe Antoine [Thu, 4 Sep 2025 07:43:38 +0000 (09:43 +0200)] 
ci: remove unnecessary packages from clusterfuzzlite

as they were only used on oss-fuzz to build the corpus, and here
we reuse oss-fuzz public corpus

8 weeks agodoc/fileinfo: Document fileinfo context/usage
Jeff Lucovsky [Fri, 25 Jul 2025 14:04:37 +0000 (10:04 -0400)] 
doc/fileinfo: Document fileinfo context/usage

Issue: 6498

8 weeks agodoc: Add upgrade note for ppp changes
Thomas Winter [Mon, 1 Sep 2025 00:45:56 +0000 (12:45 +1200)] 
doc: Add upgrade note for ppp changes

8 weeks agodecode/pppoe: CDPCP as a known protocol
Thomas Winter [Wed, 23 Jul 2025 23:58:31 +0000 (11:58 +1200)] 
decode/pppoe: CDPCP as a known protocol

Cisco Discovery Protocol Control Protocol may be sent over pppoe.
We should allow it to help network functions.

8 weeks agodecode/pppoe: Don't mark expected PPP protos as unsupported
Thomas Winter [Wed, 9 Apr 2025 03:17:08 +0000 (15:17 +1200)] 
decode/pppoe: Don't mark expected PPP protos as unsupported

After upgrading from 7.0.6 to 7.0.8, regular ppp packets are getting
dropped when ppp rules in decoder-events.rules were set as drop.
This was caused by commit a8f35806 ("detect: fix decoder only events").
Previously these rules would not be alerted or dropped.

It turns out several PPP protocols in a switch statement were falling
into the PPP_UNSUP_PROTO case. This has always been the case, I assume
the intention was that they don't get further inspected for size and
other decode errors hence unsupported.
But really some of the protocols are fundamentally required for a PPP
connection to take place.

Change some types that we know should be allowed to pass this.

Ticket: 7651

8 weeks agodecode/pppoe: Run clang-format
Thomas Winter [Mon, 21 Jul 2025 23:38:39 +0000 (11:38 +1200)] 
decode/pppoe: Run clang-format

These files have existing problems which prevent patches from
passing the format check on them.

2 months agogithub-ci: pass CARGO and RUSTC to S-V 13797/head
Jason Ish [Wed, 3 Sep 2025 15:14:43 +0000 (09:14 -0600)] 
github-ci: pass CARGO and RUSTC to S-V

S-V needs cargo to build the EVE validator.