Commit Graph

2133 Commits (364d2c077d529bb01b3ca5cc3f53b1b9beb5d712)

Author SHA1 Message Date
Jason Ish 7c70f74942 rust/telnet: convert to nom 8
Ticket: #8043
9 months ago
Jason Ish 2ff2eb1325 rust/ssh: convert to nom 8
Ticket: #8042
9 months ago
Jason Ish baa22287b8 rust/rfb: convert to nom 8
Ticket: #8041
9 months ago
Jason Ish dcfe247467 rust/pgsql: convert to nom 8
Ticket: #8039
9 months ago
Jason Ish d25286e77a rust/enip: convert to nom 8
Ticket: #8038
9 months ago
Jason Ish d74f8522ee rust/tftp: convert to nom 8
Ticket: #8037
9 months ago
Jason Ish 4b09622ebc rust/dhcp: convert to nom 8
Ticket: #8036
9 months ago
Philippe Antoine 772bd9ca53 rust: reduce visibility of detect_parse_uint_notending
It is meant as an internal function

Also document the function
9 months ago
Philippe Antoine b636dffd5b detect: urilen keyword fails on trailing junk
Fails especailly on 1<>2 which looks like a range, but is invalid
as too small, and ended up being accepted as =1

Ticket: 8028
9 months ago
Philippe Antoine 2e9027fd5a plugins: update SC_API_VERSION to 9
So that plugins built for 8 will fail to load with 9 as there
were already breaking changes in the structures and functions
prototypes
9 months ago
Jason Ish 16d313cb8b rust/applayertemplate: convert to nom 8
Ticket: #8027
9 months ago
Jason Ish f0f4d88119 rust/sip+sdp: update to nom 8
Done together as there is a dependence of SDP by SIP.

Ticket: #8025
9 months ago
Jason Ish 58564a4b0e rust/ftp: update to nom 8
Ticket: #8026
9 months ago
Jason Ish 54cc97b78e rust/dns: convert to nom 8.0
Ticket: #8024
9 months ago
Jason Ish 16c42da57e rust: add nom8 as a dependency
For the update from nom 7 to nom 8.
9 months ago
Jason Ish 0990c9dbf6 rust: pin indexmap
Newer indexmap, pulled in by serde_json requires Rust 1.82, so pin
pack to 2.11.4 which still works with Rust 1.75.
9 months ago
Philippe Antoine dc7874b2ac rust: bindgen more http range functions used in http2
Ticket: 7667
9 months ago
Philippe Antoine 842352c190 rust: bindgen SCHttpRangeFreeBlock
Ticket: 7667
9 months ago
Philippe Antoine 93785ae357 rust: bindgen SCHTTP2MimicHttp1Request
Ticket: 7667
9 months ago
Philippe Antoine a1613fecb4 detect: tcp.flags rejects non-sensical values
ignored flags are only meaningful for equal mode
9 months ago
Philippe Antoine 31e9cb55be detect: tcp.flags unit tests improvements
Tests better the ignored flags functionality.
This functionality is only used at detection for default mode,
it is not used for any, plus or not mode.

So, have unit tests about igored flags with default mode with
both matching and non matching cases
9 months ago
Philippe Antoine d8cb00e795 detect/tcp: make tcp.flags a generic integer with bitflags
Ticket: 6724

Allows to use numerical values for example

Also fixes some unit tests that were returning 1 after goto error
FlagsTestParse05 especially took this path as
de->ignored_flags != (TH_SYN|TH_RST) was false
we had de->ignored_flags == 0xff ^ (TH_SYN|TH_RST)
And then, we had a match, instead of what the not-run code
was supposing.
9 months ago
Philippe Antoine 1f9236a6d8 detect/ipv4: make fragbits a generic uint16 bitflags keyword
Ticket: 6724

Allows to use numerical values
9 months ago
Philippe Antoine 633180c93f detect/integers: generalize support for bitflags modifier
Ticket: 6724

Allows sugar syntax for bitflags keywords.
While the expressivity does not increase, because we could already
use numerial values with all generic integer modes, this modifier
prefix is used with the strings, and follows the syntax
that is already used for fragbits and tcp.flags keyword.
9 months ago
Philippe Antoine f25194480c libhtp: fix newer clippy lints with newer MSRV 9 months ago
Jason Ish bc33bd49eb quic/crypto: remove use of GenericArray
Its not needed, and gets rid of the deprecation warnings.
9 months ago
Jason Ish bdfdf7ff33 rust: update deps with cargo-update
Suppress deprecation warnings in quick/crypto.rs about GenericArray.
9 months ago
Jason Ish 6fdf0d736b rust: update aes-gcm to 0.10.3 9 months ago
Jason Ish b9517de86e rust: update aes to 0.8.4 9 months ago
Philippe Antoine 4b69a31dc3 detect/integers: count argument for multi-integers
Ticket: 7211

Allows to count the number of elements, without matching on
individual elements
9 months ago
Philippe Antoine 3babd68af4 pop3: count retr_data into consumed
for later AppLayerResult::incomplete

Fixes: acef961645 ("pop3: improve parsing")

https://issues.oss-fuzz.com/u/1/issues/451112373

Ticket: 7994
9 months ago
Philippe Antoine 9a4a29e218 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
9 months ago
Philippe Antoine 7f0087f19a rust/detect: fix correct pointer type in SCDetectU32ArrayFree 9 months ago
Philippe Antoine 969739d067 detect: http2.errorcode is now a generic integer
Ticket: 7889
9 months ago
Philippe Antoine 401b2fcae6 detect: http2.frametype is now a generic integer
Ticket: 7889
9 months ago
Philippe Antoine 454f73b445 rust: EnumString derive accepts a enum_string_style parameter
So that http2.frametype and http2.errorcode can use EnumString
without changing the format, as they used UPPERCASE instead of
the default EnumString snake_case
9 months ago
Victor Julien acef961645 pop3: improve parsing
Improve multiline commands and SASL auth.

Work around missing support in crate for empty server challenge and SASL base64 data.

Ticket: #7709.
9 months ago
Jason Ish 5e2dc9ace3 ike: don't log empty server objects 9 months ago
Jason Ish 2d86412f46 ike: log attributes as objects
IKE attributes are an array of TLV style objects, this means there can
be duplicate types seen on the wire. However, Suricata logs these as a
mapping with the type as the key. This can result in the JSON
containing duplicate keys.

To address this, log the attributes as an array of objects, allow
duplicates to exist, for example:

  "client": {
    "proposals": [
      {
        "sa_life_duration": "Unknown",
        "sa_life_duration_raw": 86400,
      }
    }
  }

is now logged as:

  "client": {
    "proposals": [
      {"key": "sa_life_duration", "value": "Unknown", "raw": 86400}
    ]
  }

Also adds `"version": 2` to each IKE record to note the change of
format from previous versions.

Ticket: #7902
9 months ago
Jason Ish b543e28402 ike/detect: info log message should be debug 9 months ago
Philippe Antoine a393147415 rust: restrict visibility of reexported suricata_sys structs 9 months ago
Philippe Antoine fa322e3dc2 rust: remove unneeded cbindgen exclusions 9 months ago
Philippe Antoine 958344787f rust: bindgen FileAppendData
Ticket: 7667
9 months ago
Philippe Antoine 811d28cc6b rust: bindgen util-spm-bs.h
for SCBasicSearchNocaseIndex

Ticket: 7667
9 months ago
Jeff Lucovsky 0e547b9519 rust/conf: Accept xiB unit suffixes
Update the memval to recognize
- kb and kib
- mb and mib
- gb and gib
as equivalent.
10 months ago
Philippe Antoine 56e08c9134 mime: retain some stateful data for quoted-printable
In case a sequence like =3D is split over 2 calls to SCSmtpMimeParseLine

Ticket: 7950
10 months ago
Victor Julien 870b40220c rust: cargo update 10 months ago
Philippe Antoine 096ba42ce9 detect/integers: add some meaningful error messages
To help rule writers
10 months ago
Philippe Antoine 4f7fc25a1a detect/dnp3: make dnp3.ind a generic uint16 bitflags keyword
Ticket: 6724

Allows operations such as negation
10 months ago
Philippe Antoine c1917dec21 detect/integers: make mqtt use generic detect_parse_uint_bitflags
Ticket: 6724
10 months ago
Philippe Antoine 867f5bfa21 detect/integers: generic detect_parse_uint_bitflags
Ticket: 6724

This will ease other keywords with bitflags, by having a generic
function + an association between flag string and bit value.
10 months ago
Philippe Antoine 3641b4eda1 detect/nfs: move nfs_procedure to rust
Make it able to use strings on the way

Ticket: 6723
10 months ago
Philippe Antoine 9869fb776b detect/snmp: pdu_type keyword now accepts strings
Ticket: 6723
10 months ago
Philippe Antoine 0553dfa814 detect/krb5: move krb5_msg_type to rust
Makes it a generic u32 on the way

Unit tests are covered by SV tests

Ticket: 6723
10 months ago
Philippe Antoine 24503b0ead rust: move file functions out of SuricataContext
Ticket: 7667
10 months ago
Philippe Antoine 1f084f8cb7 rust: move HttpRangeFreeBlock out of SuricataContext
Ticket: 7667
10 months ago
Philippe Antoine 828a6bdbf8 rust: bindgen SCLogMessage
Ticket: 7667
10 months ago
Philippe Antoine cc845dccdb rust: bindgen GenericVarFree
Ticket: 7667
10 months ago
Philippe Antoine b00788af8b rust: bindgen SCAppLayerParserTriggerRawStreamInspection
Ticket: 7667
10 months ago
Philippe Antoine c52121586a rust: move AppLayerEvents funcs out of RustContext
Ticket: 7667

just use it directly, with bindgen, and cfg not test
10 months ago
Philippe Antoine bf6b8510fe rust: move DetectEngineStateFree out of RustContext
Ticket: 7667

just use it directly, with bindgen, and cfg not test
10 months ago
Philippe Antoine 573dd2367e rust: bindgen SCFileFlowFlagsToFlags
Ticket: 7667
10 months ago
Philippe Antoine 6fa85d18f0 rust: reenable lint unused_doc_comment
With just local exceptions
10 months ago
Philippe Antoine b59086210f rust: bindgen flow ffi API
Ticket: 7667
10 months ago
Philippe Antoine bbf1424371 rust: bindgen MpmAddPatternCI
Ticket: 7667
10 months ago
Philippe Antoine c391451f19 rust: begin to bindgen app-layer-register.h
Ticket: 7667
10 months ago
Philippe Antoine 95483228d2 detect: list-keywords cli shows integers with bitflags
Ticket: 7875
10 months ago
Philippe Antoine 53d9569dfb detect: list-keywords cli shows integers with enums
Ticket: 7875
10 months ago
Philippe Antoine da486af881 detect: list-keywords cli shows integers
Ticket: 7875
10 months ago
Philippe Antoine 68017d3fe1 detect: grow SigTableElmt flags to u32
to be later able to store information about keywords being about
integers
10 months ago
Philippe Antoine b298bce0e7 detect: list-keywords cli shows multi-buffers
Ticket: 7571
10 months ago
Philippe Antoine cb9ab951b9 detect/integers: subslice for multi-integers 10 months ago
Philippe Antoine 82f0e725a2 detect/integers: index or_absent and or_oob
To match if array is empty, or index is out of bounds
10 months ago
Philippe Antoine 1480cf47ab detect/integers: nb index to match a specific number of times
For example
dns.rrtype: !A,nb>3
will match if we have more than 3 dns records which are not A
10 months ago
Philippe Antoine 6f848eeaaf detect/integers: all1 index to match only on non-empty arrays 10 months ago
Philippe Antoine dd81cfa733 detect/uint: wait for end of progress to match on all
As is done for absent keyword for instance
10 months ago
Philippe Antoine 5add185f22 http2/detect: http2.window can now use index
Ticket: 7480
10 months ago
Philippe Antoine 83868778b9 http2/detect: http2.priority can now use index
Ticket: 7480
10 months ago
Philippe Antoine 9fc407fd75 mqtt/detect: mqtt.type can now use index
Ticket: 7480
10 months ago
Philippe Antoine c0988252ba dns/detect: rrtype can now use index
Ticket: 7480
10 months ago
Philippe Antoine d8c1f8e7be rust/detect: generic detect_uint_match_at_index
and make ldap use it

Ticket: 7480

No behavior change, just code restyling
10 months ago
Philippe Antoine 7effcb7835 rust/ldap: use Vec instead of Vecdeque
as we do not pop

Ticket: 7480

May have a behavior change, but only in terms of performance
10 months ago
Philippe Antoine f555f02ed4 rust/detect: generic detect_parse_array_uint_enum
And make ldap use it

Ticket: 7480

No behavior change, just code restyling
10 months ago
Philippe Antoine c6d3857793 rust/detect: create generic DetectUintArrayData
And make ldap use them

Ticket: 7480

No behavior change, just code restyling
10 months ago
Philippe Antoine e01d19889e rust/detect: move DetectUintIndex definition to generic file
Ticket: 7480

No behavior change, just code restyling
10 months ago
Philippe Antoine ef6ce7d701 detect: rename LdapIndex to something generic
to be able to use it outside of ldap

Ticket: 7480

No behavior change, just code restyling
10 months ago
Philippe Antoine 2ed7a85356 rust: rustfmt detect uint 10 months ago
Alice Akaki 8e0b0ef35f detect: add email.body_md5 keyword
email.body_md5 matches on md5 hash generated from email body
This keyword maps to the EVE field email.body_md5
It is a sticky buffer
Supports prefiltering

Ticket: #7587
10 months ago
Alice Akaki 6c88cc1e0c detect/mime: fix detect mime nits
Return 0 if .to_str() fails in functions
SCDetectMimeEmailGetData and SCDetectMimeEmailGetDataArray

Fixes:
431822c ("detect: add email.from")
96e461f ("detect: add email.received keyword")
10 months ago
Alice Akaki 4f1cc19f25 mime/smtp: Change md5_result type from GenericArray<u8, U16> to String 10 months ago
Victor Julien 96ae693b44 version: start work on 9.0.0 10 months ago
Shivani Bhardwaj 0d65d35c92 version: start development towards 8.0.2 10 months ago
Jason Ish 2444feed0d release: 8.0.1; update changelog 10 months ago
Jason Ish 6d74656bef rust: respect RUSTC and CARGO env vars like CC
To support alternative cargo and rustc programs (such as cargo-1.82),
respect CARGO and RUSTC environment variables during ./configure much
like CC.

RUSTFMT is also respected as that is required for the tests, and Cargo
can't figure this out like it can for rustc (perhaps a bug in the
packaging).

For cbindgen, we have also have to make sure the cargo environment
variable is set for each invocation.

To build with Ubuntu's Rust 1.82 packaging:

  CARGO=cargo-1.82 RUSTC=rustc-1.82 RUSTDOC=rustdoc-1.82 \
      ./configure

Note that setting RUSTDOC is only required for commands like "make
check" to pass.

Ticket: #7877
10 months ago
Jason Ish db945aec83 rust: bindgen requires rustfmt
Bindgen will use rustfmt after generating the bindings, but this will
fail if rustfmt is not installed. Only run bindgen if rustfmt is
installed.
10 months ago
Jason Ish 4d4198dccc rust: update tracing-subscriber
Address https://rustsec.org/advisories/RUSTSEC-2025-0055.
10 months ago
Jason Ish 3b9dfe620d rust: pin time crate to 0.3.41
0.3.42 introduces dependencies that require Rust 1.81.
10 months ago
Philippe Antoine be605ba2de htp: use transactions right get function
Not the VecDeque one

Ticket: 7803
11 months ago
Philippe Antoine d0a513df6a detect/integers: support kibibyte unit
Ticket: 7869
11 months ago
Philippe Antoine 2a17ab6d88 http: generate no anomaly for identity encoding
Ticket: 7843
11 months ago
Jeff Lucovsky 03d676531a detect/from_base64: Support keyword w/no opts
Issue: 7853

Support the use of `from_base64` with no optional values. In this case,
the default values for:
- mode RFC4648
- offset: 0
- bytes: buffer size
will be used.
11 months ago
Jason Ish b93a27722c rust: fix mismatched_lifetime_syntaxes warning
Fix new warning present in Rust 1.89.

warning: hiding a lifetime that's elided elsewhere is confusing
   --> src/ldap/types.rs:191:30
    = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
    = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default
help: use `'_` for type paths
11 months ago
Philippe Antoine fe9da8acd6 http2: do not log empty objects for request or response
Ticket: 7741
12 months ago
Philippe Antoine 11c549211e snmp: fix the possibility to disable the parser
Ticket: 7820

Do not register anything, not even ALPROTO_SNMP "snmp" string
if parser is disabled
12 months ago
Shivani Bhardwaj e4b3b75b23 version: start development towards 8.0.1 1 year ago
Shivani Bhardwaj 9956286fb8 release: 8.0.0; update changelog 1 year ago
Philippe Antoine fa8d3a4ccb http2: do not set file flags for global txs
Global txs means here txs with stream id 0, used for connection control
messages.
1 year ago
Philippe Antoine 349c21af2c http2: mark old txs as updated
As is done in the other case a few lines below
1 year ago
Philippe Antoine 1d6d331752 http2: forbid data on stream 0
Ticket: 7658

Suricata will not handle well if we open a file for this tx,
do not close it, but set the transaction state to completed.

RFC 9113 section 6.1 states:

If a DATA frame is received whose Stream Identifier field is 0x00,
the recipient MUST respond with a connection error (Section 5.4.1)
 of type PROTOCOL_ERROR.
1 year ago
Jason Ish c204ddb3e5 rust/Makefile: sort filenames
Misc cleanup as these lists are growing.
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
Philippe Antoine 1940454a69 http: do not yield after failed connect if already pipelined
Ticket: 7791
1 year ago
Philippe Antoine 10150e95ad rust: allow collapsible_else_if for debug logs
see https://github.com/rust-lang/rust-clippy/issues/15158
1 year ago
Philippe Antoine a22b2f06fe rust/htp: fix clippy uninlined_format_args
--> htp/src/decompressors.rs:703:64
    |
703 |                 std::io::Error::new(std::io::ErrorKind::Other, format!("{}", e))
    |                                                                ^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
1 year ago
Jeff Lucovsky 7e713cb45a detect/analyzer: Support u8 types
Issue: 6359

Support JSON output of u8 types
1 year ago
Philippe Antoine bca6cbfb04 rust: fix prototype for AppLayerParserTriggerRawStreamInspection
Ticket: 7762

As it modifies the flow indeed
1 year ago
Philippe Antoine f8168493f6 rust: remove unnecessary cbindgen exclusions 1 year ago
Philippe Antoine 59a5b53809 util/mpm: constify arg
and make rust version use the correct integer type

Ticket: 7762
1 year ago
Shivani Bhardwaj 6a6104304d version: start development towards 8.0.0 1 year ago
Shivani Bhardwaj cdfebcdc9c release: 8.0.0-rc1; update changelog 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
Eric Leblond dd94dc6cc6 datajson: introduce feature
This patch introduces new option to dataset keyword.
Where regular dataset allows match from sets, dataset with json
format allows the same but also adds JSON data to the alert
event. This data is coming from the set definition it self.
For example, an ipv4 set will look like:

  [{"ip": "10.16.1.11", "test": "success","context":3}]

The syntax is a JSON array but it can also be a JSON object
with an array inside. The idea is to directly used data coming
from the API of a threat intel management software.

The syntax of the keyword is the following:

  dataset:isset,src_ip,type ip,load src.lst,format json, \
       enrichment_key src_ip, value_key ip;

Compare to dataset, it just have a supplementary option key
that is used to indicate in which subobject the JSON value
should be added.

The information is added in the even under the alert.extra
subobject:

  "alert": {
    "extra": {
      "src_ip": {
        "ip": "10.6.1.11",
        "test": "success",
        "context": 3
      },

The main interest of the feature is to be able to contextualize
a match. For example, if you have an IOC source, you can do

 [
   {"buffer": "value1", "actor":"APT28","Country":"FR"},
   {"buffer": "value2", "actor":"APT32","Country":"NL"}
 ]

This way, a single dataset is able to produce context to the
event where it was not possible before and multiple signatures
had to be used.

The format introduced in datajson is an evolution of the
historical datarep format. This has some limitations. For example,
if a user fetch IOCs from a threat intel server there is a large
change that the format will be JSON or XML. Suricata has no support
for the second but can support the first one.

Keeping the key value may seem redundant but it is useful to have it
directly accessible in the extra data to be able to query it
independantly of the signature (where it can be multiple metadata
or even be a transformed metadata).

In some case, when interacting with data (mostly coming from
threat intel servers), the JSON array containing the data
to use is not at the root of the object and it is ncessary
to access a subobject.

This patch implements this with support of key in level1.level2.
This is done via the `array_key` option that contains the path
to the data.

Ticket: #7372
1 year ago
Pierre Chifflier adcee8d7b5 ldap: avoid unneeded renaming of variables 1 year ago
Pierre Chifflier ebc1678c5c ldap: fix clippy warnings (unneded conversions) 1 year ago
Pierre Chifflier bda22c1f4a ldap: factorize code and remove duplicated structs, use ldap_parser where relevant 1 year ago
Pierre Chifflier c152c5c7e0 ldap: update ldap-parser to 0.5.0 1 year ago
Philippe Antoine 6dbc421825 rust: bindgen AppLayerParserConfParserEnabled
Ticket: 7667
1 year ago
Philippe Antoine 49b2a2be5d rust: bindgen SCAppLayerParserRegisterLogger
Ticket: 7667
1 year ago
Philippe Antoine 7bfef2e1e8 rust: bindgen AppLayerParserRegisterParserAcceptableDataDirection
Ticket: 7667
1 year ago
Philippe Antoine 1ff4dbfc24 rust: bindgen AppLayerParserSetStreamDepth
Ticket: 7667
1 year ago
Philippe Antoine b29d46d81f rust: bindgen SCAppLayerParserStateIssetFlag
Ticket: 7667
1 year ago
Philippe Antoine 6d56beffef rust: bindgen AppLayerParserStateSetFlag
Ticket: 7667
1 year ago
Jason Ish 1aaf5cb7d2 rust: allow some lints in suricatactl and suricatasc
These are lints we allow in the Suricata Rust source code for style
reasons.
1 year ago
Jason Ish 89ba53272c suricatasc: reconnect on loss of connection
If the connection is lost (for example, Suricata is restarted), try to
re-open the connect and re-execute the command.

This was the behavior of the Python implementation.

Ticket: #7746
1 year ago
Shivani Bhardwaj 16eb56aa73 sip: fix inspection direction 1 year ago
Jason Ish f0411c079d rust: fix compiler warning for confusing lifetimes
For example:

error: lifetime flowing from input to output with different syntax can be confusing
   --> htp/src/headers.rs:475:16
    |
475 | fn null(input: &[u8]) -> IResult<&[u8], ParsedBytes> {
    |                ^^^^^             -----  ----------- the lifetimes get resolved as `'_`
    |                |                 |
    |                |                 the lifetimes get resolved as `'_`
    |                this lifetime flows to the output
    |
note: the lint level is defined here
   --> htp/src/lib.rs:3:9

This currently only happens when using the Rust nightly compiler, which
we use for our fuzz builds.
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 332bc6a05b rust: fix new clippy issues with MSRV update 1 year ago
Jason Ish 7de03a5ef3 rust: update clap and rustyline
With a MSRV of 1.75.0 we can now use current Clap. Rustlyline is
updated, but still needs to be held back from the most current
release.
1 year ago
Jason Ish 55a0d403cb rust: unpin once_cell from old version
We can now update to the current version of once_cell with Rust 1.75.
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
Jeff Lucovsky a292670443 detect/entropy: Add calculated entropy value to flowvars
When the entropy keyword is used, record the calculated entropy value to
a flow variable for logging use.
1 year ago
Philippe Antoine 79544d0f1e rust: remove some unneeded cbindgen:ignore
Ticket: 7667
1 year ago
Philippe Antoine 7bb0c94ae9 rust: bindgen app-layer-detect-proto.h
Ticket: 7667
1 year ago
Juliana Fajardini 765041dcdd pgsql: fix clippy warnings 1 year ago
Juliana Fajardini be47de4f6d pgsql: fix typo in comment that changed meaning 1 year ago
Juliana Fajardini 88fdfb9d5a pgsql: debug validation on duplicated request msgs
There shouldn't be duplicated messages in the requests Vec. And thus
the parser shouldn't log duplicated keys nor messages. Add debug
validations to ensure this.

With PGSQL's current state machine, most frontend/ client messages will
lead to the creation of a new transaction - which would prevent
duplicated messages being pushed to the requests array and reaching the
logger.

The current exceptions for that are:

- CopyDataIn
- CopyDone
- CopyFail

Thus, debug statements were added for those cases.

CopyDone and CopyFail, per the documentation, shouldn't be seen
duplicated on the wire for the same transaction. CopyDataIn -- yes, but
we consolidate those, so the expectation is that they won't be
duplicated in the requests array or when reaching the logger either.

Related to
Task #7645
1 year ago
Juliana Fajardini f4439c520c pgsql: separate request completion and state type
Since some of state types could indicate a request completion, don't
process them in if/else statements.

Related to
Task #7645
1 year ago
Juliana Fajardini 68acc0cfcb pgsql: be more strict with pub usage
Review pub visibility to:
Make it pub crate-only wherever possible.
Remove pub altogether where not-needed.
1 year ago