| 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:09:29 |
| Message-ID: | E1xTlyC-00000000I0e-43Rc@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
------
REL_17_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/94280519a071f33198169066a4d7372c11523a84
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:40 | pgsql: Robustify pg_column_is_updatable() against overly large attnums |
| Previous Message | David Rowley | 2026-11-18 20:09:21 | pgsql: Robustify pg_column_is_updatable() against overly large attnums |