]> git.ipfire.org Git - thirdparty/suricata.git/commit
streaming/buffer: improve integer handling safety
authorVictor Julien <vjulien@oisf.net>
Thu, 28 Mar 2024 12:46:23 +0000 (13:46 +0100)
committerVictor Julien <victor@inliniac.net>
Fri, 19 Apr 2024 18:51:24 +0000 (20:51 +0200)
commitcf6278f95adaba86e0db578dad95cba386a7d509
tree0ae941c880b71da3e7a9d73006a3d07bf3867726
parente6895b835a76a96a18c5e9c33f46c89687eceab9
streaming/buffer: improve integer handling safety

Unsafe handling of buffer offset and to be inserted data's length
could lead to a integer overflow. This in turn would skip growing
the target buffer, which then would be memcpy'd into, leading to
an out of bounds write.

This issue shouldn't be reachable through any of the consumers of
the API, but to be sure some debug validation checks have been
added.

Bug: #6903.
src/util-streaming-buffer.c