postgresql/src/backend/commands
Noah Misch de494ec14f Reject substituting extension schemas or owners matching ["$'\].
Substituting such values in extension scripts facilitated SQL injection
when @extowner@, @extschema@, or @extschema:...@ appeared inside a
quoting construct (dollar quoting, '', or "").  No bundled extension was
vulnerable.  Vulnerable uses do appear in a documentation example and in
non-bundled extensions.  Hence, the attack prerequisite was an
administrator having installed files of a vulnerable, trusted,
non-bundled extension.  Subject to that prerequisite, this enabled an
attacker having database-level CREATE privilege to execute arbitrary
code as the bootstrap superuser.  By blocking this attack in the core
server, there's no need to modify individual extensions.  Back-patch to
v11 (all supported versions).

Reported by Micah Gate, Valerie Woolard, Tim Carey-Smith, and Christoph
Berg.

Security: CVE-2023-39417
2023-08-07 06:06:00 -07:00
..
aggregatecmds.c
alter.c
amcmds.c
analyze.c Ensure acquire_inherited_sample_rows sets its output parameters. 2023-03-31 10:08:40 -04:00
async.c Revert the addition of GetMaxBackends() and related stuff. 2022-04-12 14:45:23 -04:00
cluster.c Fix pg_depend entry to AMs after ALTER TABLE .. SET ACCESS METHOD 2023-06-30 07:49:07 +09:00
collationcmds.c Pre-beta mechanical code beautification. 2022-05-12 15:17:30 -04:00
comment.c
constraint.c
conversioncmds.c
copy.c Ensure COPY TO on an RLS-enabled table copies no more than it should. 2023-03-10 13:52:28 -05:00
copyfrom.c Fix thinko in comment. 2022-09-22 15:55:01 +09:00
copyfromparse.c Fix typo in comment. 2022-08-26 16:55:01 +09:00
copyto.c Ensure COPY TO on an RLS-enabled table copies no more than it should. 2023-03-10 13:52:28 -05:00
createas.c In extensions, don't replace objects not belonging to the extension. 2022-08-08 11:12:31 -04:00
dbcommands.c Handle DROP DATABASE getting interrupted 2023-07-13 13:04:45 -07:00
define.c Fix CREATE DATABASE so we can pg_upgrade DBs with OIDs above 2^31. 2022-11-04 10:39:52 -04:00
discard.c
dropcmds.c
event_trigger.c Rename SetSingleFuncCall() to InitMaterializedSRF() 2022-10-18 10:22:40 +09:00
explain.c Revert SQL/JSON features 2022-09-01 17:10:42 -04:00
extension.c Reject substituting extension schemas or owners matching ["$'\]. 2023-08-07 06:06:00 -07:00
foreigncmds.c In extensions, don't replace objects not belonging to the extension. 2022-08-08 11:12:31 -04:00
functioncmds.c Fix breakage in AlterFunction(). 2022-04-19 23:03:59 -04:00
indexcmds.c Fix marking of indisvalid for partitioned indexes at creation 2023-06-30 13:54:55 +09:00
lockcmds.c
Makefile
matview.c Pre-beta mechanical code beautification. 2022-05-12 15:17:30 -04:00
opclasscmds.c Fix DDL deparse of CREATE OPERATOR CLASS 2022-05-20 18:52:55 +02:00
operatorcmds.c
policy.c
portalcmds.c
prepare.c Rename SetSingleFuncCall() to InitMaterializedSRF() 2022-10-18 10:22:40 +09:00
proclang.c
publicationcmds.c Change some errdetail() to errdetail_internal() 2022-09-28 17:14:53 +02:00
schemacmds.c Replace last PushOverrideSearchPath() call with set_config_option(). 2023-05-08 06:14:11 -07:00
seclabel.c
sequence.c In extensions, don't replace objects not belonging to the extension. 2022-08-08 11:12:31 -04:00
statscmds.c In extensions, don't replace objects not belonging to the extension. 2022-08-08 11:12:31 -04:00
subscriptioncmds.c pgstat: fix subscription stats entry leak. 2023-07-05 14:49:53 +09:00
tablecmds.c Fix updates of indisvalid for partitioned indexes 2023-07-14 10:13:15 +09:00
tablespace.c Fix replay of create database records on standby 2022-07-28 08:26:05 +02:00
trigger.c Fix oversight in handling of modifiedCols since f24523672d 2023-07-02 22:22:50 +02:00
tsearchcmds.c
typecmds.c
user.c Change some errdetail() to errdetail_internal() 2022-09-28 17:14:53 +02:00
vacuum.c Handle DROP DATABASE getting interrupted 2023-07-13 13:04:45 -07:00
vacuumparallel.c Use logical operator && instead of & in vacuumparallel.c. 2022-08-22 08:51:25 +05:30
variable.c
view.c In extensions, don't replace objects not belonging to the extension. 2022-08-08 11:12:31 -04:00