Commit Graph

153 Commits (008f71bfc195413a7e8141921eb0b8fb564d48d9)

Author SHA1 Message Date
Philippe Antoine 4da99dedcd rust: update zstd
To make cargo audit happy

Crate:     zstd
Version:   0.13.3
Title:     Data from an abandoned stream leaks into the next stream on a reused context
Date:      2026-10-16
ID:        RUSTSEC-2026-0391
URL:       https://rustsec.org/advisories/RUSTSEC-2026-0391
Solution:  Upgrade to >=0.14.3
17 hours ago
Jason Ish fc96a9f69e rust: hoist nom 8 dependency into workspace 4 days ago
Jason Ish 773828ce34 rust: hoist flate2 dependency into workspace 4 days ago
Jason Ish 8c9a5590d3 rust: hoist serde_json dependency into workspace 4 days ago
Jason Ish c919b5f7e5 rust: hoist serde dependency into workspace 4 days ago
Jason Ish 1e21db66aa rust: hoist time dependency into workspace 4 days ago
Jason Ish 4f052f8160 rust: hoist libc dependency into workspace 4 days ago
Jason Ish 584ce3a60e rust: hoist lazy_static dependency into workspace 4 days ago
Jason Ish 4ede9e9036 rust: hoist lzma-rs dependency into workspace 4 days ago
Jason Ish 95c081b5e8 rust: hoist base64 dependency into workspace 4 days ago
Jason Ish 31b813fcfe rust: hoist suricata-sys dependency into workspace 4 days ago
Jason Ish d87a53ea17 rust: hoist zstd dependency into workspace 4 days ago
Jason Ish da76bcbe13 rust: hoist regex dependency into workspace 4 days ago
Jason Ish 06441ef392 rust: hoist once_cell dependency into workspace 4 days ago
Jason Ish 065dc02ae6 rust: hoist clap dependency into workspace 4 days ago
Jason Ish 06b70817b2 rust: hoist brotli dependency into workspace 4 days ago
Jason Ish e979f6d523 rust: inherit common package metadata from workspace 4 days ago
Philippe Antoine c3e9d421aa rust: add zstd dependency
Ticket: 7904
1 month ago
Victor Julien 9a25b2d93e rust: update ldap parser
Ticket: #8793.
1 month ago
Jason Ish 2bea5b6aad rust: set minimum rust version to 1.85
1.85 was chosen for now as it supports edition 2024. However, we have
not set our edition to 2024 yet.
2 months ago
Shivani Bhardwaj cee102c76d rust: add serde and serde_json as dependencies
Feature 2727
Feature 8523
3 months ago
Philippe Antoine efe3b16aac rust: feature debug in main crate enables feature debug in ffi 5 months ago
Philippe Antoine b90adcc2bb rust/ffi: move AppLayerTxData to ffi
Ticket: 7666
5 months ago
Philippe Antoine 5440e41314 rust/ffi: move debug validations macros to ffi
Ticket: 7666
5 months ago
Jason Ish f951477461 rust/debug: use functions from ffi crate where possible
It's not possible to use all the functions and macros from the ffi crate
in the main Suricata crate, as there are conditionals around when
running in test mode, and "cargo test" doesn't propagate the "cfg(test)"
to test crates.

Which for now means duplicating the macros and some functions.
9 months ago
Jason Ish 2c51744ccc rust/ffi: stub out a rust ffi crate
This crate is for Rust wrappers around the -sys crate which includes
only raw bindings. This is the place to add nice wrappers around those
bindings, however it should remain clear of dependencies on the main
Suricata core crates.

Ticket: #7666
9 months ago
Lukas Sismis 3e4fdb2118 misc: time unit parsing function 9 months ago
Victor Julien b1fe6a4ceb rust: update lru to 0.16.3; update lock
RUSTSEC-2026-0002

Ticket: #8210.
10 months ago
Jason Ish 16c42da57e rust: add nom8 as a dependency
For the update from nom 7 to nom 8.
1 year ago
Jason Ish 6fdf0d736b rust: update aes-gcm to 0.10.3 1 year ago
Jason Ish b9517de86e rust: update aes to 0.8.4 1 year ago
Jason Ish 3b9dfe620d rust: pin time crate to 0.3.41
0.3.42 introduces dependencies that require Rust 1.81.
1 year ago
Jason Ish f68b06798f rust/htp: follow suricata versioning
Have htp follow Suricata versioning so we don't have to worry about
version updates as it changes.

For example, between 8.0.0-beta1 and 8.0.0-rc1 there were changes to
the htp, however the version stayed at 2.0.0 making it impossible to
publish these changes to crates.io.
1 year ago
Jason Ish 25b8cd9761 lua: update to lua 5.4.8002
This updated crates remove tmpnam from being linked in, removing the
warning.
1 year ago
Pierre Chifflier c152c5c7e0 ldap: update ldap-parser to 0.5.0 1 year ago
Jason Ish b83c2dacd4 lua: update to Lua 5.4.8
Also uses a proper Lua tagged version that is not a pre-release.

Ticket: #7632
1 year ago
Jason Ish e7366e43b5 rust: update deps
Update all deps with cargo update. Additionally, apply the updated
versions to the Cargo.toml, which while not stricly required, does
make it more clear what the version in use is.
1 year ago
Jason Ish f0eaebe3a6 rust: set MSRV to 1.75.0
This is the Rust version found on Ubuntu LTS releases as of today, and
is the oldest we need to support.

Ticket: #6573
1 year ago
Philippe Antoine 97591230a9 rust: update brotli crate to latest version
Ticket: 7735

New version has a fix for an integer underflow
1 year ago
Jason Ish 9781f207f7 lua: update to suricata-lua-sys 0.1.0-alpha.9
This version supports picking up CFLAGS either passed with CFLAGS or
SURICATA_LUA_SYS_CFLAGS.
1 year ago
Philippe Antoine 44c8632284 rust: use flate2 with C zlib
move flate2.rs to a backend supporting the setting
of window_bits, which is not the case for miniz-oxide.

This will allow WebSocket to use Sec-WebSocket-Extensions
which can set a non-default window_bits
2 years ago
Jason Ish e3a400a581 htp: rename to suricata-htp; allow publishing to crates.io
As the "suricata" crate depends on htp, we need to publish htp to
crates.io first, however "htp" name is already taken. So rename "htp" to
"suricata-htp".
2 years ago
Alex Savage 778053876b pop3: app-layer parser using sawp-pop3
This module uses the sawp-pop3 crate to parse POP3 requests and responses
Features:
- eve logging
- events for parsable but non-RFC-compliant messages

Ticket: 3243
2 years ago
Eric Leblond 0b031a33c6 domain: add new transformation
Ticket: #5639
2 years ago
Todd Mortimer 9c324b796e http: Use libhtp-rs.
Ticket: #2696

There are a lot of changes here, which are described below.

In general these changes are renaming constants to conform to the
libhtp-rs versions (which are generated by cbindgen); making all htp
types opaque and changing struct->member references to
htp_struct_member() function calls; and a handful of changes to offload
functionality onto libhtp-rs from suricata, such as URI normalization
and transaction cleanup.

Functions introduced to handle opaque htp_tx_t:
- tx->parsed_uri => htp_tx_parsed_uri(tx)
- tx->parsed_uri->path => htp_uri_path(htp_tx_parsed_uri(tx)
- tx->parsed_uri->hostname => htp_uri_hostname(htp_tx_parsed_uri(tx))
- htp_tx_get_user_data() => htp_tx_user_data(tx)
- htp_tx_is_http_2_upgrade(tx) convenience function introduced to detect response status 101
  and “Upgrade: h2c" header.

Functions introduced to handle opaque htp_tx_data_t:
- d->len => htp_tx_data_len()
- d->data => htp_tx_data_data()
- htp_tx_data_tx(data) function to get the htp_tx_t from the htp_tx_data_t
- htp_tx_data_is_empty(data) convenience function introduced to test if the data is empty.

Other changes:

Build libhtp-rs as a crate inside rust. Update autoconf to no longer
use libhtp as an external dependency. Remove HAVE_HTP feature defines
since they are no longer needed.

Make function arguments and return values const where possible

htp_tx_destroy(tx) will now free an incomplete transaction

htp_time_t replaced with standard struct timeval

Callbacks from libhtp now provide the htp_connp_t and the htp_tx_data_t
as separate arguments. This means the connection parser is no longer
fetched from the transaction inside callbacks.

SCHTPGenerateNormalizedUri() functionality moved inside libhtp-rs, which
now provides normalized URI values.
The normalized URI is available with accessor function: htp_tx_normalized_uri()
Configuration settings added to control the behaviour of the URI normalization:
- htp_config_set_normalized_uri_include_all()
- htp_config_set_plusspace_decode()
- htp_config_set_convert_lowercase()
- htp_config_set_double_decode_normalized_query()
- htp_config_set_double_decode_normalized_path()
- htp_config_set_backslash_convert_slashes()
- htp_config_set_bestfit_replacement_byte()
- htp_config_set_convert_lowercase()
- htp_config_set_nul_encoded_terminates()
- htp_config_set_nul_raw_terminates()
- htp_config_set_path_separators_compress()
- htp_config_set_path_separators_decode()
- htp_config_set_u_encoding_decode()
- htp_config_set_url_encoding_invalid_handling()
- htp_config_set_utf8_convert_bestfit()
- htp_config_set_normalized_uri_include_all()
- htp_config_set_plusspace_decode()
Constants related to configuring uri normalization:
- HTP_URL_DECODE_PRESERVE_PERCENT => HTP_URL_ENCODING_HANDLING_PRESERVE_PERCENT
- HTP_URL_DECODE_REMOVE_PERCENT => HTP_URL_ENCODING_HANDLING_REMOVE_PERCENT
- HTP_URL_DECODE_PROCESS_INVALID => HTP_URL_ENCODING_HANDLING_PROCESS_INVALID

htp_config_set_field_limits(soft_limit, hard_limit) changed to
htp_config_set_field_limit(limit) because libhtp didn't implement soft
limits.

libhtp logging API updated to provide HTP_LOG_CODE constants along with
the message. This eliminates the need to perform string matching on
message text to map log messages to HTTP_DECODER_EVENT values, and the
HTP_LOG_CODE values can be used directly. In support of this,
HTP_DECODER_EVENT values are mapped to their corresponding HTP_LOG_CODE
values.

New log events to describe additional anomalies:
HTP_LOG_CODE_REQUEST_TOO_MANY_LZMA_LAYERS
HTP_LOG_CODE_RESPONSE_TOO_MANY_LZMA_LAYERS
HTP_LOG_CODE_PROTOCOL_CONTAINS_EXTRA_DATA
HTP_LOG_CODE_CONTENT_LENGTH_EXTRA_DATA_START
HTP_LOG_CODE_CONTENT_LENGTH_EXTRA_DATA_END
HTP_LOG_CODE_SWITCHING_PROTO_WITH_CONTENT_LENGTH
HTP_LOG_CODE_DEFORMED_EOL
HTP_LOG_CODE_PARSER_STATE_ERROR
HTP_LOG_CODE_MISSING_OUTBOUND_TRANSACTION_DATA
HTP_LOG_CODE_MISSING_INBOUND_TRANSACTION_DATA
HTP_LOG_CODE_ZERO_LENGTH_DATA_CHUNKS
HTP_LOG_CODE_REQUEST_LINE_UNKNOWN_METHOD
HTP_LOG_CODE_REQUEST_LINE_UNKNOWN_METHOD_NO_PROTOCOL
HTP_LOG_CODE_REQUEST_LINE_UNKNOWN_METHOD_INVALID_PROTOCOL
HTP_LOG_CODE_REQUEST_LINE_NO_PROTOCOL
HTP_LOG_CODE_RESPONSE_LINE_INVALID_PROTOCOL
HTP_LOG_CODE_RESPONSE_LINE_INVALID_RESPONSE_STATUS
HTP_LOG_CODE_RESPONSE_BODY_INTERNAL_ERROR
HTP_LOG_CODE_REQUEST_BODY_DATA_CALLBACK_ERROR
HTP_LOG_CODE_RESPONSE_INVALID_EMPTY_NAME
HTP_LOG_CODE_REQUEST_INVALID_EMPTY_NAME
HTP_LOG_CODE_RESPONSE_INVALID_LWS_AFTER_NAME
HTP_LOG_CODE_RESPONSE_HEADER_NAME_NOT_TOKEN
HTP_LOG_CODE_REQUEST_INVALID_LWS_AFTER_NAME
HTP_LOG_CODE_LZMA_DECOMPRESSION_DISABLED
HTP_LOG_CODE_CONNECTION_ALREADY_OPEN
HTP_LOG_CODE_COMPRESSION_BOMB_DOUBLE_LZMA
HTP_LOG_CODE_INVALID_CONTENT_ENCODING
HTP_LOG_CODE_INVALID_GAP
HTP_LOG_CODE_ERROR

The new htp_log API supports consuming log messages more easily than
walking a list and tracking the current offset. Internally, libhtp-rs
now provides log messages as a queue of htp_log_t, which means the
application can simply call htp_conn_next_log() to fetch the next log
message until the queue is empty. Once the application is done with a
log message, they can call htp_log_free() to dispose of it.

Functions supporting htp_log_t:
htp_conn_next_log(conn) - Get the next log message
htp_log_message(log) - To get the text of the message
htp_log_code(log) - To get the HTP_LOG_CODE value
htp_log_free(log) - To free the htp_log_t
2 years ago
Bryan Benson 15da9d783e rust: Update sawp dependencies to 0.13.1 due to SPDX license compatibility. 2 years ago
Jason Ish 8fa347410e suricatactl: rust version of suricatactl 2 years ago
Jason Ish 8115669602 suricatasc: a Rust implementation of suricatasc
This is a re-implementation of suricatasc program in Rust that
attempts to be a 100% drop-in replacement.
2 years ago
Jason Ish 8f22e55678 rust/sys: stub in suricata-sys crate for Rust bindings to C
Follow Rust convention of using a "sys" crate for bindings to C
functions. The bindings don't exist yet, but will be generated by
bindgen and put into this crate.

Ticket: #7341
2 years ago
Jason Ish fd488170c4 lua: update lua to 5.4.7
This version of out Lua crate also supports cross compiling.
2 years ago