pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Noah Misch <noah@leadboat.com>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Treat application of a leaky function to CaseTestExpr/Param as l
Date: Mon, 09 Nov 2026 14:21:48 +0000
Message-ID: <E1xQQFo-000000003GG-10VJ@gemulon.postgresql.org> (raw)

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@qq.com>
Author: Tom Lane <tgl@sss.pgh.pa.us>
Backpatch-through: 14
Security: CVE-2026-116327

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4581711f38be5a3dc6e11518382ce7beaf1b9290
Author: Tom Lane <tgl@sss.pgh.pa.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(-)



view thread (4+ messages)  latest in thread

Message-ID: <E1xQQFo-000000003GG-10VJ@gemulon.postgresql.org>
Permalink:  ../E1xQQFo-000000003GG-10VJ@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1xQQFo-000000003GG-10VJ@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: noah@leadboat.com
  Subject: Re: pgsql: Treat application of a leaky function to CaseTestExpr/Param as l
  In-Reply-To: <E1xQQFo-000000003GG-10VJ@gemulon.postgresql.org>
  References: <E1xQQFo-000000003GG-10VJ@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox