aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorMasahiko Sawada <msawada@postgresql.org>2024-08-05 06:05:33 -0700
committerMasahiko Sawada <msawada@postgresql.org>2024-08-05 06:05:33 -0700
commit66e94448abec3aad04faf0a79cab4881ae08e08a (patch)
tree1bb205b149e888ec01e3cf374bbd833171102421 /doc/src
parentca6fde92258a328a98c1d9e41da5462b73da8529 (diff)
downloadpostgresql-66e94448abec3aad04faf0a79cab4881ae08e08a.tar.gz
postgresql-66e94448abec3aad04faf0a79cab4881ae08e08a.zip
Restrict accesses to non-system views and foreign tables during pg_dump.
When pg_dump retrieves the list of database objects and performs the data dump, there was possibility that objects are replaced with others of the same name, such as views, and access them. This vulnerability could result in code execution with superuser privileges during the pg_dump process. This issue can arise when dumping data of sequences, foreign tables (only 13 or later), or tables registered with a WHERE clause in the extension configuration table. To address this, pg_dump now utilizes the newly introduced restrict_nonsystem_relation_kind GUC parameter to restrict the accesses to non-system views and foreign tables during the dump process. This new GUC parameter is added to back branches too, but these changes do not require cluster recreation. Back-patch to all supported branches. Reviewed-by: Noah Misch Security: CVE-2024-7348 Backpatch-through: 12
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/config.sgml17
-rw-r--r--doc/src/sgml/ref/pg_dump.sgml8
2 files changed, 25 insertions, 0 deletions
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index a65839a6709..a1a1d58a436 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -9813,6 +9813,23 @@ SET XML OPTION { DOCUMENT | CONTENT };
</listitem>
</varlistentry>
+ <varlistentry id="guc-restrict-nonsystem-relation-kind" xreflabel="restrict_nonsystem_relation_kind">
+ <term><varname>restrict_nonsystem_relation_kind</varname> (<type>string</type>)
+ <indexterm>
+ <primary><varname>restrict_nonsystem_relation_kind</varname></primary>
+ <secondary>configuration parameter</secondary>
+ </indexterm>
+ </term>
+ <listitem>
+ <para>
+ This variable specifies relation kind to which access is restricted.
+ It contains a comma-separated list of relation kind. Currently, the
+ supported relation kinds are <literal>view</literal> and
+ <literal>foreign-table</literal>.
+ </para>
+ </listitem>
+ </varlistentry>
+
</variablelist>
</sect2>
<sect2 id="runtime-config-client-format">
diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml
index 1010d817f18..ffc29b04fb7 100644
--- a/doc/src/sgml/ref/pg_dump.sgml
+++ b/doc/src/sgml/ref/pg_dump.sgml
@@ -1003,6 +1003,14 @@ PostgreSQL documentation
<note>
<para>
+ Using wildcards in <option>--include-foreign-data</option> may result
+ in access to unexpected foreign servers. Also, to use this option securely,
+ make sure that the named server must have a trusted owner.
+ </para>
+ </note>
+
+ <note>
+ <para>
When <option>--include-foreign-data</option> is specified,
<application>pg_dump</application> does not check that the foreign
table is writable. Therefore, there is no guarantee that the