mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
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
This commit is contained in:
@ -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">
|
||||
|
@ -997,6 +997,14 @@ PostgreSQL documentation
|
||||
The only exception is that an empty pattern is disallowed.
|
||||
</para>
|
||||
|
||||
<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,
|
||||
|
Reference in New Issue
Block a user