pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Treat application of a leaky function to CaseTestExpr/Param as l
4+ messages / 1 participants
[nested] [flat]

* pgsql: Treat application of a leaky function to CaseTestExpr/Param as l
@ 2026-11-09 14:21  Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 4+ messages in thread

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

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(-)



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

* pgsql: Treat application of a leaky function to CaseTestExpr/Param as l
@ 2026-11-09 14:21  Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 4+ messages in thread

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

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
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/36a8cb70a0267e91c6b645309d5d4e874aa4bb77
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(-)



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

* pgsql: Treat application of a leaky function to CaseTestExpr/Param as l
@ 2026-11-09 14:21  Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 4+ messages in thread

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

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
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/9a96032e100a9833534dae226d5aad0f693006c3
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(-)



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

* pgsql: Treat application of a leaky function to CaseTestExpr/Param as l
@ 2026-11-09 14:22  Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 4+ messages in thread

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

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
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/606c23540b9039380d8ef940657bd44bc54eff1c
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(-)



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


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

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-11-09 14:21 pgsql: Treat application of a leaky function to CaseTestExpr/Param as l Noah Misch <noah@leadboat.com>
2026-11-09 14:21 pgsql: Treat application of a leaky function to CaseTestExpr/Param as l Noah Misch <noah@leadboat.com>
2026-11-09 14:21 pgsql: Treat application of a leaky function to CaseTestExpr/Param as l Noah Misch <noah@leadboat.com>
2026-11-09 14:22 pgsql: Treat application of a leaky function to CaseTestExpr/Param as l 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