]> git.ipfire.org Git - thirdparty/suricata.git/commit
pgsql: fix u16 overflow in query data_row
authorJuliana Fajardini <jufajardini@oisf.net>
Wed, 11 Oct 2023 20:24:45 +0000 (17:24 -0300)
committerVictor Julien <victor@inliniac.net>
Mon, 8 Jan 2024 19:23:27 +0000 (20:23 +0100)
commit8d3de85edda97b0c585253803da3faeccc257942
tree1fdea06639dba552aceedf115f7942f95985ceb4
parent4933b817aacc649edc52409426500a9ec271ccc6
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
rust/src/pgsql/logger.rs
rust/src/pgsql/parser.rs
rust/src/pgsql/pgsql.rs