]> git.ipfire.org Git - thirdparty/suricata.git/commit
util/streaming-buffer: fix regions intersection
authorPhilippe Antoine <pantoine@oisf.net>
Thu, 21 Nov 2024 13:55:32 +0000 (14:55 +0100)
committerVictor Julien <vjulien@oisf.net>
Wed, 11 Dec 2024 05:49:35 +0000 (06:49 +0100)
commit282509f70c4ce805098e59535af445362e3e9ebd
treef45dd14eb6fdd77e06291a49dc553731c9f06e78
parent0e4faba79ae7e9fbe36815956cfd44af6d7f9378
util/streaming-buffer: fix regions intersection

This was not a problem for current callers in Suricata,
as RegionsIntersect is only called through StreamingBufferInsertAt
which is only used by TCP...

And TCP uses default region gap = 256kb, and only calls
StreamingBufferInsertAt with a u16, so TCP never inserts a new
data that will strictly contain an existing region augmented
with region gap, which was the only case where RegionsIntersect
returned the wrong result, which could later lead to a
buffer overflow.

Ticket: 7393
src/util-streaming-buffer.c