Commit Graph

808 Commits (6cffecfe3e6811df72bdba6d2f82f2fd41f6f8fc)

Author SHA1 Message Date
Jason Ish 6cffecfe3e template: use generic tx iterator 5 years ago
Jason Ish a936755731 nfs: use generic tx iterator 5 years ago
Jason Ish 0188a01daf rfb: use generic tx iterator 5 years ago
Jason Ish b335409690 mqtt: use generic tx iterator 5 years ago
Jason Ish d71bcd82d9 modbus: use generic tx iterator 5 years ago
Jason Ish fcfc9876ce smb: use generic tx iterator 5 years ago
Jason Ish 049d43212e rust/app-layer: provide generic implementation of iterator
Create traits for app-layer State and Transaction that allow
a generic implementation of a transaction iterator that parser
can use when the follow the common pattern for iterating
transactions.

Also convert DNS to use the generic for testing purposes.
5 years ago
Shivani Bhardwaj 26c7d3cc35 http2: remove needless borrows 5 years ago
Shivani Bhardwaj f3a1e3b92e core: Remove unneeded consts 5 years ago
Shivani Bhardwaj b5a123adb1 ssh: use Direction enum 5 years ago
Shivani Bhardwaj baf30cfc05 snmp: use Direction enum 5 years ago
Shivani Bhardwaj 89cb337930 smb: use Direction enum 5 years ago
Shivani Bhardwaj 8f9f78c2d0 sip: use Direction enum 5 years ago
Shivani Bhardwaj 11c438a07d nfs: use Direction enum 5 years ago
Shivani Bhardwaj a7ac79bed7 mqtt: use Direction enum 5 years ago
Shivani Bhardwaj 209e2f17fa krb: use Direction enum 5 years ago
Shivani Bhardwaj 243960a511 ike: use Direction enum 5 years ago
Shivani Bhardwaj ee5b300ccf http2: use Direction enum 5 years ago
Shivani Bhardwaj 0c6e9ac931 files: use Direction enum 5 years ago
Shivani Bhardwaj a19d2b4e1e dns: use Direction enum 5 years ago
Shivani Bhardwaj a866499bca dcerpc: use Direction enum 5 years ago
Shivani Bhardwaj 9512bfd729 core: add Direction enum
Ticket: 3832
5 years ago
Philippe Antoine 3212fa7d2b ntp: fixes leak of de_state
Bug: #4752.
5 years ago
Philippe Antoine 28a3181a2d snmp: fixes leak of de_state
Bug: #4752.
5 years ago
Philippe Antoine f37240a3e2 smb: midstream probing checks for netbios message type
If it is available

Bug: #4620.
5 years ago
Philippe Antoine 8f8823b6f2 rust: right condition for both uint to be zero
Theay can overflow leading to their addition to be zero

If a NFS read reply indicates a count of 0xFFFFFFFF

Bug: #4680.
5 years ago
Pierre Chifflier ce652511bd rust/tftp: convert parser to nom7 functions 5 years ago
Pierre Chifflier c525a1337c rust/dns: convert parser to nom7 functions 5 years ago
Pierre Chifflier 74be8b94ec rust/ssh: convert parser to nom7 functions 5 years ago
Pierre Chifflier 8a584c211e rust/mqtt: convert parser to nom7 functions 5 years ago
Pierre Chifflier d27125d77a rust/sip: convert parser to nom7 functions 5 years ago
Pierre Chifflier 1046a7d1a3 rust/ftp: convert parser to nom7 functions 5 years ago
Pierre Chifflier ebd5883da8 rust/dhcp: convert parser to nom7 functions 5 years ago
Pierre Chifflier 17170c41aa rust: add nom7 dependency 5 years ago
Modupe Falodun a87c7e5c08 rust: remove unnecessary nested match
Bug: #4605
5 years ago
Modupe Falodun 74c39500c3 rust: fix inherent to string
Bug: OISF#4618
5 years ago
Sam Muhammed 922a453da5 rust(lint): use is_null() instead of ptr::null_mut()
Bug: #4594
5 years ago
Sam Muhammed 23768c7181 rust(lint): use is_null() instead of ptr::null()
Bug: #4594
5 years ago
Sam Muhammed da0a976e23 rust(lint): use let for binding single value
`match` is better used with binding to multiple variables,
for binding to a single value, `let` statement is recommended.

Bug: #4616
5 years ago
Philippe Antoine 5bd065cb3c range: checks that end is after start for HTTP2
As was done only for HTTP1 in previous commit

The verification part stays separated from the parsing part,
as we want to keep on logging invalid ranges values.
5 years ago
Philippe Antoine accdad7881 ike: do not keep server transforms in state
Fixes #4534

Now, only the tx with the transforms will match
with ike.chosen_sa_attribute
5 years ago
Philippe Antoine 83887510a8 modbus: tx iterator
When there are a lot of open transactions, as is possible with
modbus, the default tx_iterator will loop for the whole
transacations vector to find each transaction, that means
quadratic complexity.

Reusing the tx_iterator from the template, and keeping as a state
the last index where to start looking avoids this quadratic
complexity.
5 years ago
Philippe Antoine ea4a509a54 app-layer: disable by default if not in configuration
DNP3, ENIP, HTTP2 and Modbus are supposed to be disabled
by default. That means the default configuration does it,
but that also means that, if they are not in suricata.yaml,
the protocol should stay disabled.
5 years ago
Philippe Antoine 8e8899c90c http2: range: check return value when opening
HttpRangeContainerOpenFile can return NULL
so, http2_range_open can set file_range to NULL
And we should check this before calling http2_range_close
5 years ago
Philippe Antoine cb30772372 style: remove latest warnings
about unused variables
5 years ago
Philippe Antoine 98f84d5a9b http2: follow range requests
Move the content-range parsing code to rust
5 years ago
Philippe Antoine 56fae072b2 http2: better rust lifetimes
so that borrow check gets happy
5 years ago
Philippe Antoine a1f9e0c97a rust: rename to StreamingBufferConfig as in C 5 years ago
Shivani Bhardwaj 42da0fb5c5 smb: fix broken stream depth setting
The stream depth setting was broken since it was moved to Rust because
of a missing parser for memory values in configuration.
Use get_memval fn from conf.rs to calculate and fetch the correct
values.
5 years ago
Shivani Bhardwaj 0cfe512ef0 rust/conf: add getter for memval
Add a parser for memory values like 50kb, 20mb, etc on the Rust side.
5 years ago