From: Noah Misch <noah@leadboat.com>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: In REFRESH MATERIALIZED VIEW, set user ID before running user co
Date: Mon, 09 May 2022 15:37:46 +0000
Message-ID: <E1no5SD-000lVJ-3m@gemulon.postgresql.org> (raw)
In REFRESH MATERIALIZED VIEW, set user ID before running user code.
It intended to, but did not, achieve this. Adopt the new standard of
setting user ID just after locking the relation. Back-patch to v10 (all
supported versions).
Reviewed by Simon Riggs. Reported by Alvaro Herrera.
Security: CVE-2022-1552
Branch
------
REL_13_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/88743d581e1bdedc13e4ca33c5a6597a5d2dbdc4
Modified Files
--------------
src/backend/commands/matview.c | 30 +++++++++++-------------------
src/test/regress/expected/privileges.out | 16 ++++++++++++++++
src/test/regress/sql/privileges.sql | 17 +++++++++++++++++
3 files changed, 44 insertions(+), 19 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 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: In REFRESH MATERIALIZED VIEW, set user ID before running user co
In-Reply-To: <E1no5SD-000lVJ-3m@gemulon.postgresql.org>
References: <E1no5SD-000lVJ-3m@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