pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Check EXECUTE privilege on foreign key cast functions.
3+ messages / 1 participants
[nested] [flat]

* pgsql: Check EXECUTE privilege on foreign key cast functions.
@ 2026-11-09 14:21 Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 3+ messages in thread

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

Check EXECUTE privilege on foreign key cast functions.

When a foreign key's referencing column must be cast to the type of
the referenced column, the comparison that decides whether an
UPDATE of the referencing table changed the key executes the cast
function without first checking for EXECUTE privileges.  To fix,
check privileges and invoke the function execution hook before
calling the cast function.  Note that this check is made as the
user issuing the UPDATE, since the comparison happens before any
switch to the referenced table's owner.

Reported-by: Noah Misch <noah@leadboat.com>
Author: Nathan Bossart <nathandbossart@gmail.com>
Security: CVE-2026-116303
Backpatch-through: 14

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e6695e2a767974bae3d1bc15402a1b767d30503c
Author: Nathan Bossart <nathan@postgresql.org>

Modified Files
--------------
src/backend/utils/adt/ri_triggers.c       | 10 ++++++++++
src/test/regress/expected/foreign_key.out | 21 +++++++++++++++++++++
src/test/regress/sql/foreign_key.sql      | 22 ++++++++++++++++++++++
3 files changed, 53 insertions(+)



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

* pgsql: Check EXECUTE privilege on foreign key cast functions.
@ 2026-11-09 14:21 Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 3+ messages in thread

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

Check EXECUTE privilege on foreign key cast functions.

When a foreign key's referencing column must be cast to the type of
the referenced column, the comparison that decides whether an
UPDATE of the referencing table changed the key executes the cast
function without first checking for EXECUTE privileges.  To fix,
check privileges and invoke the function execution hook before
calling the cast function.  Note that this check is made as the
user issuing the UPDATE, since the comparison happens before any
switch to the referenced table's owner.

Reported-by: Noah Misch <noah@leadboat.com>
Author: Nathan Bossart <nathandbossart@gmail.com>
Security: CVE-2026-116303
Backpatch-through: 14

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d3c033944f887e30a6c947dcaef54971e97dab5f
Author: Nathan Bossart <nathan@postgresql.org>

Modified Files
--------------
src/backend/utils/adt/ri_triggers.c       | 10 ++++++++++
src/test/regress/expected/foreign_key.out | 21 +++++++++++++++++++++
src/test/regress/sql/foreign_key.sql      | 22 ++++++++++++++++++++++
3 files changed, 53 insertions(+)



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

* pgsql: Check EXECUTE privilege on foreign key cast functions.
@ 2026-11-09 14:21 Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 3+ messages in thread

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

Check EXECUTE privilege on foreign key cast functions.

When a foreign key's referencing column must be cast to the type of
the referenced column, the comparison that decides whether an
UPDATE of the referencing table changed the key executes the cast
function without first checking for EXECUTE privileges.  To fix,
check privileges and invoke the function execution hook before
calling the cast function.  Note that this check is made as the
user issuing the UPDATE, since the comparison happens before any
switch to the referenced table's owner.

Reported-by: Noah Misch <noah@leadboat.com>
Author: Nathan Bossart <nathandbossart@gmail.com>
Security: CVE-2026-116303
Backpatch-through: 14

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d9b15fda5684b4a6feadf23b28fc4aa8812eb65a
Author: Nathan Bossart <nathan@postgresql.org>

Modified Files
--------------
src/backend/utils/adt/ri_triggers.c       | 11 +++++++++++
src/test/regress/expected/foreign_key.out | 26 ++++++++++++++++++++++++++
src/test/regress/sql/foreign_key.sql      | 27 +++++++++++++++++++++++++++
3 files changed, 64 insertions(+)



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


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

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-11-09 14:21 pgsql: Check EXECUTE privilege on foreign key cast functions. Noah Misch <noah@leadboat.com>
2026-11-09 14:21 pgsql: Check EXECUTE privilege on foreign key cast functions. Noah Misch <noah@leadboat.com>
2026-11-09 14:21 pgsql: Check EXECUTE privilege on foreign key cast functions. 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