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
Giuseppe Longo ddc6d29fd1 swf: grow decompression buffer on demand
Previously, SWF decompression guessed the final output size from FileLength,
allocated the whole buffer, and then decompressed once. A malicious SWF could
claim a 50MB output and force the per-thread inspection buffer to allocate and
retain 64 MiB before the compressed data was even checked.

Change the logic:
allocate 4 KiB, decompress, grow only when the buffer is full, and continue.
The buffer grows geometrically up to the configured output limit,
and the final inspection length is set to the number of bytes actually produced.

Also, for zlib, Z_OK does not by itself mean that decompression is complete.
It should be checked together with avail_out and avail_in,
grow the buffer when output space is exhausted, and continue the same inflate stream.

Ticket: #8829
2 months ago
..
.cargo rust: rename .cargo/config to .cargo/config.toml 2 years ago
derive rust/ffi: move AppLayerEvent to ffi 6 months ago
ffi rust/ffi: add flow accessors to flow wrapper 2 months ago
htp http: warn once for chunk extension 2 months ago
src swf: grow decompression buffer on demand 2 months ago
suricatactl rust: limit clap verson to 4.5.57 7 months ago
suricatasc rust: clippy fixups for 1.97 4 months ago
sys rust/ffi: bindgen flow storage 2 months ago
.gitignore rust: rename .cargo/config to .cargo/config.toml 2 years ago
Cargo.lock.in psl: update to 2.1.228 2 months ago
Cargo.toml.in rust: set minimum rust version to 1.85 2 months ago
Makefile.am rust: set CARGO_ENV when generating ffi bindings 2 months ago
cbindgen.toml http2: split transaction state machines 4 months ago
rustfmt.toml
…