From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Handle RLS dependencies in inlined set-returning functions prope
Date: Mon, 08 May 2023 14:12:57 +0000
Message-ID: <E1pw1bl-0016dM-8R@gemulon.postgresql.org> (raw)
Handle RLS dependencies in inlined set-returning functions properly.
If an SRF in the FROM clause references a table having row-level
security policies, and we inline that SRF into the calling query,
we neglected to mark the plan as potentially dependent on which
role is executing it. This could lead to later executions in the
same session returning or hiding rows that should have been hidden
or returned instead.
Our thanks to Wolfgang Walther for reporting this problem.
Stephen Frost and Tom Lane
Security: CVE-2023-2455
Branch
------
REL_12_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/ee87b482c3952a1e7504a8ba0df7c8ebaab36f72
Modified Files
--------------
src/backend/optimizer/util/clauses.c | 7 +++++++
src/test/regress/expected/rowsecurity.out | 27 +++++++++++++++++++++++++++
src/test/regress/sql/rowsecurity.sql | 20 ++++++++++++++++++++
3 files changed, 54 insertions(+)
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: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Handle RLS dependencies in inlined set-returning functions prope
In-Reply-To: <E1pw1bl-0016dM-8R@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