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
Victor Julien 4241dae1ad detect/http1: inspect HTTP/1 block buffers only when complete
The raw HTTP header buffer had to be registered one state past the
header state. The reason is that htp reports progress as soon as a block
starts: request_progress reaches HEADERS right after the request line
and TRAILER at the zero-length chunk, so a detection round at HEADERS
can run while the block is still arriving. For a byte buffer that shows
- negated content or a within: relative match would decide on a
truncated block. HEADERS + 1 avoided it by accident of numbering, BODY
being what htp reaches once the block is done.

Make completion an event instead of inferring it from numbering. htp's
REQUEST_HEADERS and RESPONSE_HEADERS hooks only ran in test builds,
which is why production had nothing to key on; they now run always and
are bound through the C API. Suricata marks per transaction that a block
ended, from those hooks and from the trailer hooks that already ran, and
the four HTTP/1 block buffers - http.header.raw, http.trailer,
http.trailer.raw and http.trailer_names - report no data until then.
Each registers at the state where its content completes, and no state
offset remains in the tree.

A block that ends because the stream closes needs no special case: htp's
closure handling advances progress past the block state and runs the
trailer hook, so the gate opens on its own and the partial content is
inspected as it is today. Suricata-Verify tests/http1-raw-header-
truncated covers both directions.

htp progress values, and the transaction lifecycle built on them, are
left alone: delaying those changes when firewall decisions become
definitive and fails the ruletype-firewall state hook tests.

Ticket: #8256.
5 days ago
..
.cargo rust: rename .cargo/config to .cargo/config.toml 2 years ago
derive doc: string enum derive has a function listing the enum values 3 weeks ago
ffi rust/ffi: add flow accessors to flow wrapper 2 months ago
htp detect/http1: inspect HTTP/1 block buffers only when complete 5 days ago
src detect/http2: give HTTP/2 trailers buffers of their own 5 days ago
suricatactl rust: limit clap verson to 4.5.57 7 months ago
suricatasc rust: clippy fixups for 1.97 4 months ago
sys app-layer/http2: add a transaction state for the trailer block 5 days ago
.gitignore rust: rename .cargo/config to .cargo/config.toml 2 years ago
Cargo.lock.in psl: update to 2.1.241 1 week ago
Cargo.toml.in rust: add zstd dependency 1 month ago
Makefile.am rust: fail check-bindgen-bindings if bindgen fails 3 weeks ago
cbindgen.toml http2: split transaction state machines 4 months ago
rustfmt.toml
…