]> git.ipfire.org Git - thirdparty/suricata.git/commit
pgsql: fix u16 overflow in query data_row 10137/head
authorJuliana Fajardini <jufajardini@oisf.net>
Wed, 11 Oct 2023 20:24:45 +0000 (17:24 -0300)
committerVictor Julien <vjulien@oisf.net>
Tue, 9 Jan 2024 08:21:57 +0000 (09:21 +0100)
commit2e6322bc36fee80b8e5b684f728b8b28997d2f6c
tree4da589628c54704ee20c139438a066b43fc9d2b2
parentba3f1f8c6f60dbd7e6ffe21d878e70b403d589df
pgsql: fix u16 overflow in query data_row

Found by oss-fuzz with quadfuzz.

Cf https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=63113

According to PostgreSQL documentation the maximum number of rows can be
the maximum of tuples that can fit onto max u32 pages - 4,294,967,295 (cf
https://www.postgresql.org/docs/current/limits.html). Some rough
calculations for that indicate that this could go over max u32, so
updating the data_row data type to u64.

Bug #6389

(cherry picked from commit 8d3de85edda97b0c585253803da3faeccc257942)
rust/src/pgsql/logger.rs
rust/src/pgsql/parser.rs
rust/src/pgsql/pgsql.rs