From: Nathan Bossart <nathan@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Ensure cached plans are correctly marked as dependent on role.
Date: Mon, 11 Nov 2024 15:00:50 +0000
Message-ID: <E1tAVuL-001Ji2-P6@gemulon.postgresql.org> (raw)
Ensure cached plans are correctly marked as dependent on role.
If a CTE, subquery, sublink, security invoker view, or coercion
projection references a table with row-level security policies, 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.
Reported-by: Wolfgang Walther
Reviewed-by: Noah Misch
Security: CVE-2024-10976
Backpatch-through: 12
Branch
------
REL_16_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/562289460e118fcad44ec916dcdab21e4763c38c
Modified Files
--------------
src/backend/executor/functions.c | 6 ++
src/backend/rewrite/rewriteHandler.c | 67 ++++++++++++++++++--
src/test/regress/expected/rowsecurity.out | 100 ++++++++++++++++++++++++++++++
src/test/regress/sql/rowsecurity.sql | 58 +++++++++++++++++
src/tools/pgindent/typedefs.list | 1 +
5 files changed, 226 insertions(+), 6 deletions(-)
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: nathan@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Ensure cached plans are correctly marked as dependent on role.
In-Reply-To: <E1tAVuL-001Ji2-P6@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