]> git.ipfire.org Git - thirdparty/suricata.git/commit
smb: fix post-trunc chunk behavior
authorVictor Julien <vjulien@oisf.net>
Wed, 11 Jan 2023 20:07:16 +0000 (21:07 +0100)
committerVictor Julien <vjulien@oisf.net>
Tue, 24 Jan 2023 08:34:23 +0000 (09:34 +0100)
commitba4a533797c2a2336042070c10345f423e3fc859
treef1071464b456d6e415e5f4e3235b0961aa8cc351
parent26fc02227bfe77c95a599e78824b64cb2be2740e
smb: fix post-trunc chunk behavior

After a gap in a file transaction, the file tracker is truncated. However
this did not clear any stored out of order chunks from memory or stop more
chunks to be stored, leading to accumulation of a large number of chunks.

This patches fixes this be clearing the stored chunks on trunc. It also
makes sure no more chunks are stored in the tracker after the trunc.

Bug: #5781.
(cherry picked from commit a24d7dc45c818054f97448ce42ca9ba270b3b8e4)
rust/src/filetracker.rs