| From: | David Rowley <drowley(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Robustify pg_column_is_updatable() against overly large attnums |
| Date: | 2026-11-18 20:08:57 |
| Message-ID: | E1xTlxg-00000000Hyf-3EVr@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Robustify pg_column_is_updatable() against overly large attnums
Passing an attnum sufficiently close to PG_INT16_MAX could wrap
AttrNumber when offsetting for FirstLowInvalidHeapAttributeNumber,
leading to an attempt to build a Bitmapset with a negative member value
resulting in an ERROR, rather than returning the result as it would for
other nonexistent columns.
Upgrade the type used to 32-bit to avoid this issue.
Bug: #19904
Reported-by: Zheng Hacker <hackerzheng666(at)gmail(dot)com>
Discussion: https://postgr.es/m/19904-57a44a8aa7638ae4@postgresql.org
Backpatch-through: 15
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/4892c9447e315f00be028d90a60e1e0ccfe3992d
Modified Files
--------------
src/backend/utils/adt/misc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David Rowley | 2026-11-18 20:09:10 | pgsql: Robustify pg_column_is_updatable() against overly large attnums |
| Previous Message | Masahiko Sawada | 2026-11-18 18:59:08 | pgsql: Fix DSA allocation to honor DSA_ALLOC_NO_OOM when out of DSM seg |