pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: plpgsql: recheck record field's type after casting value.
2+ messages / 1 participants
[nested] [flat]

* pgsql: plpgsql: recheck record field's type after casting value.
@ 2026-11-09 14:21  Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Noah Misch @ 2026-11-09 14:21 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

plpgsql: recheck record field's type after casting value.

exec_cast_value() can reach code that will change the rowtype of a
RECORD variable, but the RECFIELD case in exec_assign_value() doesn't
account for that and assumes the record field type and column number
that it previously looked up are still good.  Recheck that data
if the tuple type ID changed; since that condition never holds in
normal usage, this is a cheap enough safety check.

Reported-by: Claude and Ada Logics
Author: Tom Lane <tgl@sss.pgh.pa.us>
Backpatch-through: 14
Security: CVE-2026-120151

Branch
------
master

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

Modified Files
--------------
src/pl/plpgsql/src/pl_exec.c | 43 +++++++++++++++++++++++++++++++++++--------
1 file changed, 35 insertions(+), 8 deletions(-)



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

* pgsql: plpgsql: recheck record field's type after casting value.
@ 2026-11-09 14:21  Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Noah Misch @ 2026-11-09 14:21 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

plpgsql: recheck record field's type after casting value.

exec_cast_value() can reach code that will change the rowtype of a
RECORD variable, but the RECFIELD case in exec_assign_value() doesn't
account for that and assumes the record field type and column number
that it previously looked up are still good.  Recheck that data
if the tuple type ID changed; since that condition never holds in
normal usage, this is a cheap enough safety check.

Reported-by: Claude and Ada Logics
Author: Tom Lane <tgl@sss.pgh.pa.us>
Backpatch-through: 14
Security: CVE-2026-120151

Branch
------
REL_19_STABLE

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

Modified Files
--------------
src/pl/plpgsql/src/pl_exec.c | 43 +++++++++++++++++++++++++++++++++++--------
1 file changed, 35 insertions(+), 8 deletions(-)



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


end of thread, other threads:[~2026-11-09 14:21 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-11-09 14:21 pgsql: plpgsql: recheck record field's type after casting value. Noah Misch <noah@leadboat.com>
2026-11-09 14:21 pgsql: plpgsql: recheck record field's type after casting value. Noah Misch <noah@leadboat.com>

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