mirror of
https://github.com/zeek/zeek.git
synced 2025-10-15 21:18:20 +00:00
Reassem: Reject blocks overflowing 64bit upper
The reassembler logic isn't wrap around safe, so just truncate or reject such blocks. For files specifically, a byte offset in the 2**64 bytes represents 16EiB which is the maximum size supported by BTRFS or NTFS (and probably nothing we'd ever see in practice).
This commit is contained in:
parent
9f8eb682b1
commit
ea80f21e1d
3 changed files with 71 additions and 1 deletions
|
@ -371,6 +371,7 @@ void TCP_Reassembler::BlockInserted(DataBlockMap::const_iterator it)
|
|||
{
|
||||
const auto& start_block = it->second;
|
||||
|
||||
assert(start_block.seq < start_block.upper);
|
||||
if ( start_block.seq > last_reassem_seq || start_block.upper <= last_reassem_seq )
|
||||
return;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue