| From: | Noah Misch <noah(at)leadboat(dot)com> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Reject calls from SQL to functions that take or return type inte |
| Date: | 2026-08-10 13:41:30 |
| Message-ID: | E1wtQFu-00000000yJm-3Quh@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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(at)sss(dot)pgh(dot)pa(dot)us>
Reviewed-by: Robert Haas <robertmhaas(at)gmail(dot)com>
Backpatch-through: 14
Security: CVE-2026-14680
Branch
------
REL_15_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/e926a9aacbd7a3b20d1e806b0e8445a62d9f8168
Author: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Noah Misch | 2026-08-10 13:41:31 | pgsql: Invalidate plan cache after role changes. |
| Previous Message | Noah Misch | 2026-08-10 13:41:29 | pgsql: Avoid overflow in Levenshtein distance calculations. |