postgresql/src
Masahiko Sawada 79c7a7e296 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
2024-08-05 06:05:17 -07:00
..
backend Restrict accesses to non-system views and foreign tables during pg_dump. 2024-08-05 06:05:17 -07:00
bin Restrict accesses to non-system views and foreign tables during pg_dump. 2024-08-05 06:05:17 -07:00
common Try to handle torn reads of pg_control in frontend. 2023-10-16 17:25:43 +13:00
fe_utils Clean up assorted failures under clang's -fsanitize=undefined checks. 2022-03-03 18:13:24 -05:00
include Restrict accesses to non-system views and foreign tables during pg_dump. 2024-08-05 06:05:17 -07:00
interfaces Translation updates 2024-08-05 12:25:03 +02:00
makefiles Select CFLAGS_SL at configure time, not in platform-specific Makefiles. 2019-10-21 12:32:35 -04:00
pl Translation updates 2024-08-05 12:25:03 +02:00
port Stamp 12.19. 2024-05-06 16:27:39 -04:00
template On NetBSD, force dynamic symbol resolution at postmaster start. 2022-08-30 17:29:13 -04:00
test Restrict accesses to non-system views and foreign tables during pg_dump. 2024-08-05 06:05:17 -07:00
timezone Update time zone data files to tzdata release 2024a. 2024-02-01 15:57:53 -05:00
tools Fix building with MSVC for TLS session disabling 2024-07-26 19:10:37 +02:00
tutorial Doc: sync src/tutorial/basics.source with SGML documentation. 2022-11-19 13:09:14 -05:00
.gitignore
DEVELOPERS
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Suppress macOS warnings about duplicate libraries in link commands. 2023-09-29 14:07:30 -04:00
Makefile.shlib Stop using "-multiply_defined suppress" on macOS. 2023-09-26 21:06:21 -04:00
nls-global.mk NLS: Fix backend gettext triggers 2019-09-23 09:05:50 +02:00