| From: | Noah Misch <noah(at)leadboat(dot)com> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Treat application of a leaky function to CaseTestExpr/Param as l |
| Date: | 2026-11-09 14:21:52 |
| Message-ID: | E1xQQFs-000000003QR-3Lm2@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Treat application of a leaky function to CaseTestExpr/Param as leaky.
A CaseTestExpr or internal Param represents the value of an expression
somewhere else in the query. If that expression contains a Var then
there is potential for information leakage. Therefore, teach
contain_leaked_vars() to reject such cases.
In principle we could try to find the referenced expression and
perform a more accurate analysis, but that seems not worth the
substantial work required, because in most real-world cases
there'd be a Var there anyway.
Reported-by: Only see myself <1950233439(at)qq(dot)com>
Author: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Backpatch-through: 14
Security: CVE-2026-116327
Branch
------
REL_19_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/36a8cb70a0267e91c6b645309d5d4e874aa4bb77
Author: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Modified Files
--------------
src/backend/optimizer/util/clauses.c | 19 +++++++----
src/backend/optimizer/util/var.c | 64 ++++++++++++++++++++++++++++++++++++
src/include/optimizer/optimizer.h | 1 +
3 files changed, 77 insertions(+), 7 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Noah Misch | 2026-11-09 14:21:53 | pgsql: Reject extnamespace if it's temporary or it's '$user'::regnamesp |
| Previous Message | Noah Misch | 2026-11-09 14:21:51 | pgsql: Close portals at end of trigger functions with transition tables |