postgresql/src/backend/commands
Noah Misch 681d9e4621 Replace last PushOverrideSearchPath() call with set_config_option().
The two methods don't cooperate, so set_config_option("search_path",
...) has been ineffective under non-empty overrideStack.  This defect
enabled an attacker having database-level CREATE privilege to execute
arbitrary code as the bootstrap superuser.  While that particular attack
requires v13+ for the trusted extension attribute, other attacks are
feasible in all supported versions.

Standardize on the combination of NewGUCNestLevel() and
set_config_option("search_path", ...).  It is newer than
PushOverrideSearchPath(), more-prevalent, and has no known
disadvantages.  The "override" mechanism remains for now, for
compatibility with out-of-tree code.  Users should update such code,
which likely suffers from the same sort of vulnerability closed here.
Back-patch to v11 (all supported versions).

Alexander Lakhin.  Reported by Alexander Lakhin.

Security: CVE-2023-2454
2023-05-08 06:14:07 -07:00
..
Makefile Move parallel vacuum code to vacuumparallel.c. 2021-12-23 11:42:52 +05:30
aggregatecmds.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
alter.c Add new predefined role pg_create_subscription. 2023-03-30 11:37:19 -04:00
amcmds.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
analyze.c Move heaprel struct field next to index rel field. 2023-04-03 11:01:11 -07:00
async.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
cluster.c Fix MAINTAIN privileges for toast tables and partitions. 2023-01-14 00:16:23 -08:00
collationcmds.c Canonicalize ICU locale names to language tags. 2023-04-04 10:38:58 -07:00
comment.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
constraint.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
conversioncmds.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
copy.c Improve several permission-related error messages. 2023-03-17 10:33:09 +01:00
copyfrom.c Ignore BRIN indexes when checking for HOT updates 2023-03-20 11:02:42 +01:00
copyfromparse.c Don't try to read default for a non-existent attribute 2023-03-15 17:20:42 -04:00
copyto.c Simplify useless 0L constants 2023-03-29 08:25:12 +02:00
createas.c Simplify useless 0L constants 2023-03-29 08:25:12 +02:00
dbcommands.c Canonicalize ICU locale names to language tags. 2023-04-04 10:38:58 -07:00
define.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
discard.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
dropcmds.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
event_trigger.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
explain.c Support "Right Anti Join" plan shapes. 2023-04-05 16:59:09 -04:00
extension.c Add @extschema:name@ and no_relocate options to extensions. 2023-03-20 18:37:11 -04:00
foreigncmds.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
functioncmds.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
indexcmds.c Add SysCacheGetAttrNotNull for guaranteed not-null attrs 2023-03-25 22:49:33 +01:00
lockcmds.c Get rid of the "new" and "old" entries in a view's rangetable. 2023-01-18 13:23:57 -05:00
matview.c Simplify useless 0L constants 2023-03-29 08:25:12 +02:00
meson.build Update copyright for 2023 2023-01-02 15:00:37 -05:00
opclasscmds.c Fix typos in comments 2023-05-02 12:23:08 +09:00
operatorcmds.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
policy.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
portalcmds.c Simplify useless 0L constants 2023-03-29 08:25:12 +02:00
prepare.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
proclang.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
publicationcmds.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
schemacmds.c Replace last PushOverrideSearchPath() call with set_config_option(). 2023-05-08 06:14:07 -07:00
seclabel.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
sequence.c Convert many uses of ReadBuffer[Extended](P_NEW) to ExtendBufferedRel() 2023-04-05 18:57:29 -07:00
statscmds.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
subscriptioncmds.c Fix typos in comments 2023-05-02 12:23:08 +09:00
tablecmds.c Fix typos in comments 2023-05-02 12:23:08 +09:00
tablespace.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
trigger.c Fix another issue with ENABLE/DISABLE TRIGGER on partitioned tables. 2023-04-05 12:56:32 -04:00
tsearchcmds.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
typecmds.c Add SysCacheGetAttrNotNull for guaranteed not-null attrs 2023-03-25 22:49:33 +01:00
user.c Fix typo 2023-03-17 21:40:25 +01:00
vacuum.c Improve ereports for VACUUM's BUFFER_USAGE_LIMIT option 2023-04-11 19:36:34 +12:00
vacuumparallel.c Fix various typos and incorrect/outdated name references 2023-04-19 13:50:33 +12:00
variable.c Fix outdated references to guc.c 2023-03-02 13:49:39 +01:00
view.c Get rid of the "new" and "old" entries in a view's rangetable. 2023-01-18 13:23:57 -05:00