You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
suricata/rust
Shivani Bhardwaj 42978ca9a7 modbus: trigger raw stream reassembly
Internals
---------
Suricata's stream engine returns data for inspection to the detection
engine from the stream when the chunk size is reached.

Bug
---
Inspection triggered only in the specified chunk sizes may be too late
when it comes to inspection of smaller protocol specific data which
could result in delayed inspection, incorrect data logged with a transaction
and logs misindicating the pkt that triggered an alert.

Fix
---
Fix this by making an explicit call from all respective applayer parsers to
trigger raw stream reassembly which shall make the data available for inspection
in the following call of the stream engine. This needs to happen per direction
on the completion of an entity like a request or a response.

Important notes
---------------
1. The above mentioned behavior with and without this patch is
affected internally by the following conditions.
- inspection depth
- stream depth
In these special cases, the inspection window will be affected and
Suricata may not consider all the data that could be expected to be
inspected.
2. This only applies to applayer protocols running over TCP.
3. The inspection window is only considered up to the ACK'd data.
4. This entire issue is about IDS mode only.

Modbus has a classic request response model, so, a call to trigger raw
stream reassembly is added on completion of each request and response.

Optimization 7026
Bug 7004
6 months ago
..
.cargo rust: rename .cargo/config to .cargo/config.toml 2 years ago
derive rust: derive for AppLayerState 7 months ago
htp http1: use a tx iterator 6 months ago
src modbus: trigger raw stream reassembly 6 months ago
suricatactl suricatactl: add description to Cargo.toml 7 months ago
suricatasc rust: pin once_cell to work with Rust 1.67.1 8 months ago
sys detect/xform: Support transform identity data 6 months ago
.gitignore rust: rename .cargo/config to .cargo/config.toml 2 years ago
Cargo.lock.in http1: brotli decompression 7 months ago
Cargo.toml.in rust: use flate2 with C zlib 7 months ago
Makefile.am rust: always update Cargo.lock.in 7 months ago
cbindgen.toml rust: bindgen detect-engine-helper.h 6 months ago
rustfmt.toml rustfmt: replace deprecated fn_args_layout with fn_params_layout 2 years ago