Commit Graph

15866 Commits (8560564657735a4c22004d51db9775ca2f1d9645)
 

Author SHA1 Message Date
Jason Ish 8560564657 rust: rename .cargo/config to .cargo/config.toml
Addresses this warning from the Rust compiler:

warning: `../rust/.cargo/config` is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
10 months ago
Jason Ish 6d2d8c26d3 detect-lua: small cleanups
- remove unused headers
- cleanup/rename flags
10 months ago
Jason Ish 224f55ba21 detect/lua: don't treat a crashed script as no match
If a rule script crashed, the return value was treated as a no
match. This would make a negation of the rule match and alert.

Instead cleanup and exit early if the rule script crashed and don't
run negation logic.

A stat, detect.lua.errors has been added to count how many times a
script crashes.

Also consolidates the running of the Lua script and return value
handling to a common function.

Bug: #6940
10 months ago
Philippe Antoine f2c39fc87b ftp: protocol detection avoiding FP on POP3 10 months ago
Philippe Antoine 2c305ba37e pop3: protocol detection
Ticket: #6366
10 months ago
Philippe Antoine ed895c04ff smtp: exit data mode if data command was rejected
And the server was advertising pipelining.

Ticket: 6906
10 months ago
Philippe Antoine dfdf2e2d1a detect: checks for space in http.protcol keyword 10 months ago
Philippe Antoine 7582b18a9f http: configures libhtp to allow spaces in uri
Ticket: #2881
10 months ago
Giuseppe Longo b728916ca6 decode/gre: decode arp packets 10 months ago
Giuseppe Longo 8a171c9d74 doc: add arp changes 10 months ago
Giuseppe Longo 01586d884d output-json/arp: implement logger
This adds a logger for ARP, disabled by default.

Ticket #6827
10 months ago
Giuseppe Longo a1c6328156 output/json: check 5-tuple values prior to logging
This commit enhances the JSON output by introducing a feature for conditional port logging.
Now, port logging is dependent on the underlying protocol
(such as TCP, UDP, or SCTP), where port information is pertinent, while it
avoids unnecessary logging for protocols where a port is not utilized (e.g. ARP).

Furthermore, this update ensures that IP addresses and the protocol have
meaningful values set, rather than being logged as empty strings.

These changes will make each log entry more precise, eliminating cases where
5-tuple fields are empty or set to zero, indicating the absence of a field.
10 months ago
Giuseppe Longo 987a27923d output/json: make JSONFormatAndAddMACAddr public
This change exposes 'JSONFormatAndAddMACAddr' as a public function,
allowing it to be reused across modules, such as the ARP logger, for logging
MAC addresses extracted from ARP packets.
10 months ago
Giuseppe Longo 5219a5da5f decode/arp: implement decoder
This adds a decoder for ARP.

Ticket #6827
10 months ago
Shivani Bhardwaj 12d027f6a2 base64: re-add the check for destination space
Cover all the calls to DecodeBase64Block with the check for enough
space. Found by the recently introduced fuzz target.

Bug 7028

Fixes: c0bc43c393 ("util/base64: use decoder fns per RFC")
10 months ago
Victor Julien d401082bba github-actions: set bpf to icmp for af-packet 10 months ago
Victor Julien 1240bdd914 github-actions: add pcap live test script and jobs
Asan and coverage jobs.
10 months ago
Victor Julien 27b6a31a0c github-actions: unix pcap coverage run
To increase code coverage.
10 months ago
Victor Julien ea95aac022 github-actions: add unix socket runmode script and job
Runs with ASAN.
10 months ago
Victor Julien 40b87bfd04 github-actions: add ASAN enabled Ubuntu 24.04 build of live tests 10 months ago
Philippe Antoine fcdd7f000a detect: add options to app-layer-protocol keyword
Ticket: 4921

app-layer-protocol keyword accept an optional mode to precise
which protocol we want to match: toclient, toserver, final,
or original
10 months ago
Philippe Antoine 3b5f1173ab Revert "rust: temporary: disable debug assertions"
This reverts commit 14ab9aa763.
10 months ago
Philippe Antoine 37a9003736 rust/probing: safety check for null input
Ticket: 7013

Done consistently for all protocols

This may change some protocols behaviors which failed early
if they found there was not enough data...
10 months ago
Philippe Antoine 5dc8dea869 rust: return empty slice without using from_raw_parts
As this triggers rustc 1.78
unsafe precondition(s) violated: slice::from_raw_parts requires
the pointer to be aligned and non-null,
and the total size of the slice not to exceed `isize::MAX`

Ticket: 7013
10 months ago
Philippe Antoine edd5507ea4 tests: do not bother to free a null pointer
Ticket: #7013
10 months ago
Victor Julien 4c33e64d56 github-actions: make sure unix socket is created in dpdk tests 10 months ago
Victor Julien 8e320449f6 github-actions: expand af-packet live test with more unix commands 10 months ago
Victor Julien d02c57bd1f hostbits: release use_cnt for unix (add|remove)-hostbit
Commands would leave use_cnt incremented, never decrementing them. This
would lead to a asserting triggering at shutdown.

Bug: #7020.
10 months ago
Victor Julien bc2dfe4c17 device: don't crash on unix command 'iface-bypassed-stat'
In the default config iface bypass support is not enabled,
and storage API not initialized for it. Using it will lead to a crash.

This commit first checks if the device storage API is initialized.

Bug: #7022.
10 months ago
Philippe Antoine 806052d762 websocket: fix opcodes values for ping/pong
And also set close

Ticket: 7025
10 months ago
Philippe Antoine 8b103ae755 dns: set tx id for frames 10 months ago
Philippe Antoine 715bf048ee frames: rust API makes tx_id explicit
And set it right for SIP and websocket,
so that relevant tx app-layer metadata gets logged.

Ticket: 6973
10 months ago
Philippe Antoine 9e01956e77 detect: log relevant frames app-layer metadata
Ticket: 6973

Completes commit 2b4e10224e
10 months ago
Shivani Bhardwaj 2e6777c8e3 fuzz: add target for DecodeBase64
Task 6050
10 months ago
Shivani Bhardwaj 6d92596548 doc: add note about fast_pattern w base64_data
Bug 5220
10 months ago
Shivani Bhardwaj 363050616a base64_data: reject fast_pattern use
If a rule has fast_pattern on base64_data, it is anyway not applied, so,
consider any such rules invalid.

Bug 5220
10 months ago
Jeff Lucovsky cb56752bf7 config/ja3: Eliminate warnings when JA3 is disabled
This commit eliminates warnings when either ja3, ja4 or both are
disabled.
10 months ago
Jason Ish 14ab9aa763 rust: temporary: disable debug assertions 10 months ago
Jason Ish f7eb94a6c0 github: update pull request template
Update the pull request template to suggest providing a link to the
SV/LIBHTP pull request as this aides in cross linking.

Also change the way to provide the link to the Redmine ticket, as it
often results in linking to our Redmine, and add a checkbox for the
creation of a ticket.
10 months ago
Jason Ish cec1c9d853 bundle.sh: accept more forms of a branch name
For GitHub, add the following branch name formats:
- https://github.com/OISF/libhtp/pull/123
- OISF/libhtp#123
10 months ago
jason taylor abb74245cc doc: update normalization notes
Ticket: #6781

Signed-off-by: jason taylor <jtfas90@gmail.com>
10 months ago
jason taylor 5dacf4d92b doc: add http.connection ref and fix location
Signed-off-by: jason taylor <jtfas90@gmail.com>
10 months ago
Shivani Bhardwaj 329ac61961 eve/stats: add description for ips
Ticket 6434
10 months ago
Shivani Bhardwaj 861ffff972 eve/stats: add description for transactions
Ticket 6434
10 months ago
Philippe Antoine ce4119ae3d snmp: remove community keyword unit test
Ticket: 3725

This test was moved to suricata-verify snmp-community
10 months ago
dependabot[bot] 1297d96592 github-actions: bump actions/upload-artifact from 4.3.1 to 4.3.3
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.1 to 4.3.3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](5d5d22a312...65462800fd)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
10 months ago
dependabot[bot] f14a4a1bf8 github-actions: bump github/codeql-action from 3.24.9 to 3.25.3
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.24.9 to 3.25.3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Commits](https://github.com/github/codeql-action/compare/v3.24.9...v3.25.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
10 months ago
dependabot[bot] b9fbc5749d github-actions: bump actions/download-artifact from 4.1.4 to 4.1.7
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4.1.4 to 4.1.7.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](c850b930e6...65a9edc588)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
10 months ago
dependabot[bot] 76314cc00e github-actions: bump codecov/codecov-action from 4.1.1 to 4.3.1
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.1.1 to 4.3.1.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](c16abc29c9...5ecb98a3c6)

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

Signed-off-by: dependabot[bot] <support@github.com>
10 months ago
Victor Julien 2b80689ee4 github-actions: convert dpdk tests to use script 10 months ago