Harden some allocations against integer wraparound

This isn't closing any specific security bug, but attacks are perhaps
conceivable due to various forms of type confusion or data corruption.
Tighten that up a bit.  More is undoubtely possible.

Author: Álvaro Herrera <[email protected]>
Security: CVE-2026-120139
Backpatch-through: 14

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/16aa33802a3acb9d8d4aafa28c85bc312092d41e
Author: Álvaro Herrera <[email protected]>

Modified Files
--------------
src/backend/access/common/detoast.c           |  9 +++++++
src/backend/access/common/toast_compression.c | 37 ++++++++++++++++++++++++---
src/backend/utils/adt/array_userfuncs.c       |  8 +++++-
src/include/access/tableam.h                  |  6 +++++
src/include/postgres.h                        |  5 ++--
5 files changed, 58 insertions(+), 7 deletions(-)

Reply via email to