From: Philippe Antoine Date: Wed, 12 Jul 2023 07:42:47 +0000 (+0200) Subject: http2: do not append data after closing file X-Git-Tag: suricata-7.0.0~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60db5e981cd4a6680022de523bfd03f651e61764;p=thirdparty%2Fsuricata.git http2: do not append data after closing file Ticket: #6211 Completes commit 02dece5db5170ae9bd946d0b8805e45ac071a97c Once a http2 stream has end of stream flag, we close the file. If we see new data frames with this stream id, the new_chunk function should ignore them as the file was already closed. --- diff --git a/rust/src/filetracker.rs b/rust/src/filetracker.rs index d35126d7ae..ad1c4c0c3a 100644 --- a/rust/src/filetracker.rs +++ b/rust/src/filetracker.rs @@ -152,7 +152,7 @@ impl FileTransferTracker { self.fill_bytes = fill_bytes; self.chunk_is_last = is_last; - if self.file_is_truncated { + if self.file_is_truncated || self.file_closed { return 0; } if !self.file_open {