-
Notifications
You must be signed in to change notification settings - Fork 1.8k
next/1383/20260610/v1 #15601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
next/1383/20260610/v1 #15601
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
a3ab00e
detect/dataset: add match subdomain option
antoineaboufayssal b09b048
doc/userguide: add dataset match subdomain documentation
antoineaboufayssal 4144d9c
rust: format snmp files
catenacyber e390755
rust: check llmnr format
catenacyber 955827b
util/path: handle missing d_type definitions on Solaris
l1gi cf65f76
build/solaris: use __sun and Solaris byteorder helpers
l1gi 823322c
util/time: avoid tm_gmtoff on Solaris
l1gi 1faa292
util/syslog: guard LOG_FTP for Solaris
l1gi f34acfd
util/cpu: enable SPARC misalignment emulation at startup
l1gi 2ce2ebc
suricata: guard RLIMIT_NPROC usage
l1gi 21d35f6
decoder/sctp: extend decoder
glongo bbd0ecb
detect/sctp: add sctp.hdr sticky buffer
glongo 88f17d7
detect/sctp: add sctp.chunk_type keyword
glongo 855f49b
detect/sctp: add sctp.chunk_cnt keyword
glongo 2116c3c
detect/sctp: add sctp.vtag keyword
glongo ede1bce
output/json: add sctp metadata to alerts
glongo 1413b08
decode/sctp: set p->payload to data chunk
glongo dc44447
detect/sctp: add sctp.chunk_data sticky buffer
glongo d892eb8
doc/sctp: add sctp keywords
glongo 6150d61
github-actions: bump github/codeql-action from 4.36.1 to 4.36.2
dependabot[bot] 39688a6
github-actions: bump codecov/codecov-action from 6.0.1 to 7.0.0
dependabot[bot] b2cd08b
util/log-redis: guard SCCalloc result for redis stream format
21bcbe1
detect/alert: guard SCStrdup result before use
01f64ea
detect/flowbits: check SCRealloc result before overwriting pointer
04a1de1
detect/reference: guard SCStrdup calls in DetectReferenceParse
2c16fb7
util/mpm-hs: fix null check parentheses; simplify SCHSConfigInit
7124fde
tests/fuzz: guard SCCalloc result in fuzz_decodebase64
344e89e
qa/cocci: fix broken regex alternation in malloc-error-check
3828de2
decode: propagate PacketAlertCreate failure instead of crashing
4d4c622
detect/parse: assert HashListTableLookup results in duplicate sig check
1715157
detect: guard rate filter callback registration, return bool on failure
3b5bdc4
examples: check rate filter callback registration result
0345b91
rust: exclude DETECT_BYTEMATH_ENDIAN_DEFAULT from bindings
inashivb 3b9dc5a
output-json: avoid freeing caller-owned JSON builder
urvalkheni d64954a
detect: don't register unrelated inspect engines
victorjulien 569d27e
detect: propagate inspect engine setup failures
victorjulien 2a2cb40
detect: misc debug log additions
victorjulien b02fa53
detect: add helper for getting hook name
victorjulien d154484
detect/firewall: support hook LTE mode for built-in hooks
victorjulien File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,150 @@ | ||
| .. role:: example-rule-emphasis | ||
|
|
||
| SCTP Keywords | ||
| ============= | ||
|
|
||
| Suricata supports sticky buffers and keywords for matching on SCTP | ||
| packet headers, chunks, and metadata. | ||
|
|
||
| Sticky buffers are expected to be followed by one or more | ||
| :doc:`payload-keywords`. | ||
|
|
||
| sctp.hdr | ||
| -------- | ||
|
|
||
| Sticky buffer to match on the raw SCTP header and all chunks. | ||
|
|
||
| Example rule: | ||
|
|
||
| .. container:: example-rule | ||
|
|
||
| alert sctp any any -> any any (msg:"SCTP header match"; :example-rule-emphasis:`sctp.hdr; content:"|01|"; offset:8; depth:1;` sid:1; rev:1;) | ||
|
|
||
| ``sctp.hdr`` is a 'sticky buffer'. | ||
|
|
||
| ``sctp.hdr`` can be used as ``fast_pattern``. | ||
|
|
||
| sctp.chunk_data | ||
| --------------- | ||
|
|
||
| Sticky buffer to match on any SCTP DATA chunk user payload. | ||
|
|
||
| When a packet contains DATA chunks, the packet payload (``p->payload``) | ||
| is set to the user data of the first DATA chunk. A bare ``content`` | ||
| match (without a sticky buffer) therefore inspects the first DATA | ||
| chunk's payload. Use ``sctp.chunk_data`` to inspect all DATA chunks | ||
| independently. | ||
|
|
||
| Example rule: | ||
|
|
||
| .. container:: example-rule | ||
|
|
||
| alert sctp any any -> any any (msg:"SCTP DATA payload match"; :example-rule-emphasis:`sctp.chunk_data; content:"test";` sid:2; rev:1;) | ||
|
|
||
| ``sctp.chunk_data`` is a 'sticky buffer'. | ||
|
|
||
| ``sctp.chunk_data`` can be used as ``fast_pattern``. | ||
|
|
||
| sctp.vtag | ||
| --------- | ||
|
|
||
| Match on the SCTP verification tag field in the common header. | ||
|
|
||
| sctp.vtag uses an :ref:`unsigned 32-bit integer <rules-integer-keywords>`. | ||
|
|
||
| Syntax:: | ||
|
|
||
| sctp.vtag:[op]<number> | ||
|
|
||
| The verification tag can be matched exactly, or compared using the _op_ setting:: | ||
|
|
||
| sctp.vtag:12345 # exactly 12345 | ||
| sctp.vtag:>0 # greater than 0 | ||
| sctp.vtag:100-200 # range 100 to 200 | ||
|
|
||
| Example rule: | ||
|
|
||
| .. container:: example-rule | ||
|
|
||
| alert sctp any any -> any any (msg:"SCTP vtag match"; :example-rule-emphasis:`sctp.vtag:0;` sid:3; rev:1;) | ||
|
|
||
| sctp.chunk_type | ||
| --------------- | ||
|
|
||
| Match on the type of any SCTP chunk in the packet. | ||
|
|
||
| sctp.chunk_type uses an :ref:`unsigned 8-bit integer <rules-integer-keywords>`. | ||
|
|
||
| Syntax:: | ||
|
|
||
| sctp.chunk_type:[!]<value> | ||
| sctp.chunk_type:[op]<number> | ||
|
|
||
| Values can be specified by name or by numeric value. The following | ||
| named chunk types are supported: | ||
|
|
||
| ================= ===== | ||
| Name Value | ||
| ================= ===== | ||
| data 0 | ||
| init 1 | ||
| init_ack 2 | ||
| sack 3 | ||
| heartbeat 4 | ||
| hb_ack 5 | ||
| abort 6 | ||
| shutdown 7 | ||
| shutdown_ack 8 | ||
| error 9 | ||
| cookie_echo 10 | ||
| cookie_ack 11 | ||
| ecne 12 | ||
| cwr 13 | ||
| shutdown_complete 14 | ||
| forward_tsn 192 | ||
| ================= ===== | ||
|
|
||
| Named values are case-insensitive and can be negated with ``!``:: | ||
|
|
||
| sctp.chunk_type:init # INIT chunk | ||
| sctp.chunk_type:init_ack # INIT ACK chunk | ||
| sctp.chunk_type:!data # any chunk that is not DATA | ||
|
|
||
| Numeric values support comparison operators and ranges:: | ||
|
|
||
| sctp.chunk_type:1 # INIT chunk (type 1) | ||
| sctp.chunk_type:0-4 # range 0 to 4 | ||
|
|
||
| Example rules: | ||
|
|
||
| .. container:: example-rule | ||
|
|
||
| alert sctp any any -> any any (msg:"SCTP INIT chunk detected"; :example-rule-emphasis:`sctp.chunk_type:init;` sid:4; rev:1;) | ||
|
|
||
| .. container:: example-rule | ||
|
|
||
| alert sctp any any -> any any (msg:"SCTP INIT chunk detected"; :example-rule-emphasis:`sctp.chunk_type:1;` sid:5; rev:1;) | ||
|
|
||
| sctp.chunk_cnt | ||
| -------------- | ||
|
|
||
| Match on the number of SCTP chunks in the packet. | ||
|
|
||
| sctp.chunk_cnt uses an :ref:`unsigned 8-bit integer <rules-integer-keywords>`. | ||
|
|
||
| Syntax:: | ||
|
|
||
| sctp.chunk_cnt:[op]<number> | ||
|
|
||
| The chunk count can be matched exactly, or compared using the _op_ setting:: | ||
|
|
||
| sctp.chunk_cnt:1 # exactly 1 chunk | ||
| sctp.chunk_cnt:>3 # more than 3 chunks | ||
| sctp.chunk_cnt:2-5 # range 2 to 5 | ||
|
|
||
| Example rule: | ||
|
|
||
| .. container:: example-rule | ||
|
|
||
| alert sctp any any -> any any (msg:"SCTP packet with multiple chunks"; :example-rule-emphasis:`sctp.chunk_cnt:>1;` sid:5; rev:1;) | ||
|
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is leading to a CI failure for Check rules doc: Error: detect-dataset: failed to set up dataset 'blocked-domains'. [DetectDatasetSetup:detect-dataset.c:640]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commented on the PR as well...