agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
pgsql: Add pg_add_size_overflow() and friends
6+ messages / 2 participants
[nested] [flat]

* pgsql: Add pg_add_size_overflow() and friends
@ 2025-11-24 20:24  Jacob Champion <jchampion@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Jacob Champion @ 2025-11-24 20:24 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Add pg_add_size_overflow() and friends

Commit 600086f47 added (several bespoke copies of) size_t addition with
overflow checks to libpq. Move this to common/int.h, along with
its subtraction and multiplication counterparts.

pg_neg_size_overflow() is intentionally omitted; I'm not sure we should
add SSIZE_MAX to win32_port.h for the sake of a function with no
callers.

Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/CAOYmi%2B%3D%2BpqUd2MUitvgW1pAJuXgG_TKCVc3_Ek7pe8z9nkf%2BAg%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8934f2136cd82333fd148954a13a8ab01f7bd7ef

Modified Files
--------------
src/include/common/int.h            | 67 +++++++++++++++++++++++++++++++++++++
src/interfaces/libpq/fe-exec.c      | 44 +++++++-----------------
src/interfaces/libpq/fe-print.c     | 36 +++++---------------
src/interfaces/libpq/fe-protocol3.c | 27 +++------------
4 files changed, 91 insertions(+), 83 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Add pg_add_size_overflow() and friends
@ 2026-05-11 12:19  Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Noah Misch @ 2026-05-11 12:19 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Add pg_add_size_overflow() and friends

Commit 600086f47 added (several bespoke copies of) size_t addition with
overflow checks to libpq. Move this to common/int.h, along with
its subtraction and multiplication counterparts.

pg_neg_size_overflow() is intentionally omitted; I'm not sure we should
add SSIZE_MAX to win32_port.h for the sake of a function with no
callers.

Back-patch of commit 8934f2136, done now because pg_add_size_overflow()
and friends are needed more widely for security fixes.

Author: Jacob Champion <jacob.champion@enterprisedb.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/CAOYmi%2B%3D%2BpqUd2MUitvgW1pAJuXgG_TKCVc3_Ek7pe8z9nkf%2BAg%40mail.gmail.com
Backpatch-through: 14-18
Security: CVE-2026-6473

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/c7fb9f765cc5d08b2edb242a2b40d5e8b3c88668
Author: Tom Lane <tgl@sss.pgh.pa.us>

Modified Files
--------------
src/include/common/int.h            | 67 +++++++++++++++++++++++++++++++++++++
src/interfaces/libpq/fe-exec.c      | 44 +++++++-----------------
src/interfaces/libpq/fe-print.c     | 36 +++++---------------
src/interfaces/libpq/fe-protocol3.c | 27 +++------------
4 files changed, 91 insertions(+), 83 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Add pg_add_size_overflow() and friends
@ 2026-05-11 12:19  Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Noah Misch @ 2026-05-11 12:19 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Add pg_add_size_overflow() and friends

Commit 600086f47 added (several bespoke copies of) size_t addition with
overflow checks to libpq. Move this to common/int.h, along with
its subtraction and multiplication counterparts.

pg_neg_size_overflow() is intentionally omitted; I'm not sure we should
add SSIZE_MAX to win32_port.h for the sake of a function with no
callers.

Back-patch of commit 8934f2136, done now because pg_add_size_overflow()
and friends are needed more widely for security fixes.

Author: Jacob Champion <jacob.champion@enterprisedb.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/CAOYmi%2B%3D%2BpqUd2MUitvgW1pAJuXgG_TKCVc3_Ek7pe8z9nkf%2BAg%40mail.gmail.com
Backpatch-through: 14-18
Security: CVE-2026-6473

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/00e243e6791ecc4559282da5ead7e21ae69b8174
Author: Tom Lane <tgl@sss.pgh.pa.us>

Modified Files
--------------
src/include/common/int.h            | 67 +++++++++++++++++++++++++++++++++++++
src/interfaces/libpq/fe-exec.c      | 44 +++++++-----------------
src/interfaces/libpq/fe-print.c     | 36 +++++---------------
src/interfaces/libpq/fe-protocol3.c | 27 +++------------
4 files changed, 91 insertions(+), 83 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Add pg_add_size_overflow() and friends
@ 2026-05-11 12:19  Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Noah Misch @ 2026-05-11 12:19 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Add pg_add_size_overflow() and friends

Commit 600086f47 added (several bespoke copies of) size_t addition with
overflow checks to libpq. Move this to common/int.h, along with
its subtraction and multiplication counterparts.

pg_neg_size_overflow() is intentionally omitted; I'm not sure we should
add SSIZE_MAX to win32_port.h for the sake of a function with no
callers.

Back-patch of commit 8934f2136, done now because pg_add_size_overflow()
and friends are needed more widely for security fixes.

Author: Jacob Champion <jacob.champion@enterprisedb.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/CAOYmi%2B%3D%2BpqUd2MUitvgW1pAJuXgG_TKCVc3_Ek7pe8z9nkf%2BAg%40mail.gmail.com
Backpatch-through: 14-18
Security: CVE-2026-6473

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/924b3e94390de04b0fbb55edce8a29873a5062e1
Author: Tom Lane <tgl@sss.pgh.pa.us>

Modified Files
--------------
src/include/common/int.h            | 67 +++++++++++++++++++++++++++++++++++++
src/interfaces/libpq/fe-exec.c      | 44 +++++++-----------------
src/interfaces/libpq/fe-print.c     | 36 +++++---------------
src/interfaces/libpq/fe-protocol3.c | 27 +++------------
4 files changed, 91 insertions(+), 83 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Add pg_add_size_overflow() and friends
@ 2026-05-11 12:19  Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Noah Misch @ 2026-05-11 12:19 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Add pg_add_size_overflow() and friends

Commit 600086f47 added (several bespoke copies of) size_t addition with
overflow checks to libpq. Move this to common/int.h, along with
its subtraction and multiplication counterparts.

pg_neg_size_overflow() is intentionally omitted; I'm not sure we should
add SSIZE_MAX to win32_port.h for the sake of a function with no
callers.

Back-patch of commit 8934f2136, done now because pg_add_size_overflow()
and friends are needed more widely for security fixes.

Author: Jacob Champion <jacob.champion@enterprisedb.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/CAOYmi%2B%3D%2BpqUd2MUitvgW1pAJuXgG_TKCVc3_Ek7pe8z9nkf%2BAg%40mail.gmail.com
Backpatch-through: 14-18
Security: CVE-2026-6473

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d75b1dc96f0a15b71dd832285fafaac7a755f4cb
Author: Tom Lane <tgl@sss.pgh.pa.us>

Modified Files
--------------
src/include/common/int.h            | 67 +++++++++++++++++++++++++++++++++++++
src/interfaces/libpq/fe-exec.c      | 44 +++++++-----------------
src/interfaces/libpq/fe-print.c     | 36 +++++---------------
src/interfaces/libpq/fe-protocol3.c | 27 +++------------
4 files changed, 91 insertions(+), 83 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Add pg_add_size_overflow() and friends
@ 2026-05-11 12:19  Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Noah Misch @ 2026-05-11 12:19 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Add pg_add_size_overflow() and friends

Commit 600086f47 added (several bespoke copies of) size_t addition with
overflow checks to libpq. Move this to common/int.h, along with
its subtraction and multiplication counterparts.

pg_neg_size_overflow() is intentionally omitted; I'm not sure we should
add SSIZE_MAX to win32_port.h for the sake of a function with no
callers.

Back-patch of commit 8934f2136, done now because pg_add_size_overflow()
and friends are needed more widely for security fixes.

Author: Jacob Champion <jacob.champion@enterprisedb.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/CAOYmi%2B%3D%2BpqUd2MUitvgW1pAJuXgG_TKCVc3_Ek7pe8z9nkf%2BAg%40mail.gmail.com
Backpatch-through: 14-18
Security: CVE-2026-6473

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/37842f3dc6c2da8eb71816698e99391a0e0d4441
Author: Tom Lane <tgl@sss.pgh.pa.us>

Modified Files
--------------
src/include/common/int.h            | 67 +++++++++++++++++++++++++++++++++++++
src/interfaces/libpq/fe-exec.c      | 44 +++++++-----------------
src/interfaces/libpq/fe-print.c     | 36 +++++---------------
src/interfaces/libpq/fe-protocol3.c | 27 +++------------
4 files changed, 91 insertions(+), 83 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2026-05-11 12:19 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-11-24 20:24 pgsql: Add pg_add_size_overflow() and friends Jacob Champion <jchampion@postgresql.org>
2026-05-11 12:19 pgsql: Add pg_add_size_overflow() and friends Noah Misch <noah@leadboat.com>
2026-05-11 12:19 pgsql: Add pg_add_size_overflow() and friends Noah Misch <noah@leadboat.com>
2026-05-11 12:19 pgsql: Add pg_add_size_overflow() and friends Noah Misch <noah@leadboat.com>
2026-05-11 12:19 pgsql: Add pg_add_size_overflow() and friends Noah Misch <noah@leadboat.com>
2026-05-11 12:19 pgsql: Add pg_add_size_overflow() and friends Noah Misch <noah@leadboat.com>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox