agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Noah Misch <noah@leadboat.com>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Reject calls from SQL to functions that take or return type inte
Date: Mon, 10 Aug 2026 13:41:30 +0000
Message-ID: <E1wtQFu-00000000yJm-3Quh@gemulon.postgresql.org> (raw)

Reject calls from SQL to functions that take or return type internal.

Allowing that is a security hole, since there are many different
functions with different ideas of what their "internal" argument or
result is.  We already had a defense against the easy case of
"'foo'::internal", but that turns out to be insufficient.  Lock down
both function and operator syntax.  Also disallow attempts to cast to
or from type internal; those would mostly fail anyway, but we have
created some holes with features such as CoerceViaIO.

Reported-by: Amy Burnett (OpenAI Codex Security)
Author: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Robert Haas <robertmhaas@gmail.com>
Backpatch-through: 14
Security: CVE-2026-14680

Branch
------
REL_15_STABLE

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

Modified Files
--------------
src/backend/parser/parse_coerce.c |  8 ++++++++
src/backend/parser/parse_func.c   | 26 ++++++++++++++++++++++++++
src/backend/parser/parse_oper.c   | 22 ++++++++++++++++++++++
src/pl/plpgsql/src/pl_exec.c      | 12 ++++++++++--
4 files changed, 66 insertions(+), 2 deletions(-)



view thread (6+ messages)

Message-ID: <E1wtQFu-00000000yJm-3Quh@gemulon.postgresql.org>
Permalink:  ../E1wtQFu-00000000yJm-3Quh@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1wtQFu-00000000yJm-3Quh@gemulon.postgresql.org

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: noah@leadboat.com, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Reject calls from SQL to functions that take or return type inte
  In-Reply-To: <E1wtQFu-00000000yJm-3Quh@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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