pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Reject extnamespace if it's temporary or it's '$user'::regnamesp 5+ messages / 1 participants [nested] [flat]
* pgsql: Reject extnamespace if it's temporary or it's '$user'::regnamesp @ 2026-11-09 14:21 Noah Misch <noah@leadboat.com> 0 siblings, 0 replies; 5+ messages in thread From: Noah Misch @ 2026-11-09 14:21 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Reject extnamespace if it's temporary or it's '$user'::regnamespace. Historical behavior was bizarre. 'CREATE EXTENSION tcn SCHEMA "$user"' set extnamespace='$user'::regnamespace, but the extension's object landed in the schema named after the bootstrap superuser if such a schema existed, else in pg_temp. Many extension scripts failed, since pg_temp is searched for only a subset of object types. In other scenarios, a trusted-extension script located the wrong object and executed arbitrary SQL of a non-superuser's choice. The prior commit's locking additions could not cover this. Back-patch to v14 (all supported versions). Reported-by: Noah Misch <noah@leadboat.com> Reviewed-by: Greg Burd <greg@burd.me> Backpatch-through: 14 Security: CVE-2026-6467 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/7fad20ce3379755ed82c1b7d7cc1fa458bd3ed9b Modified Files -------------- src/backend/catalog/namespace.c | 13 +++++ src/backend/commands/extension.c | 36 ++++++++++--- .../test_extensions/expected/test_extensions.out | 60 +++++++++++++++++----- .../test_extensions/sql/test_extensions.sql | 44 +++++++++++++--- 4 files changed, 126 insertions(+), 27 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Reject extnamespace if it's temporary or it's '$user'::regnamesp @ 2026-11-09 14:21 Noah Misch <noah@leadboat.com> 0 siblings, 0 replies; 5+ messages in thread From: Noah Misch @ 2026-11-09 14:21 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Reject extnamespace if it's temporary or it's '$user'::regnamespace. Historical behavior was bizarre. 'CREATE EXTENSION tcn SCHEMA "$user"' set extnamespace='$user'::regnamespace, but the extension's object landed in the schema named after the bootstrap superuser if such a schema existed, else in pg_temp. Many extension scripts failed, since pg_temp is searched for only a subset of object types. In other scenarios, a trusted-extension script located the wrong object and executed arbitrary SQL of a non-superuser's choice. The prior commit's locking additions could not cover this. Back-patch to v14 (all supported versions). Reported-by: Noah Misch <noah@leadboat.com> Reviewed-by: Greg Burd <greg@burd.me> Backpatch-through: 14 Security: CVE-2026-6467 Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/4fea981a388e2a6e75ecfc66084c42e91fcde10f Modified Files -------------- src/backend/catalog/namespace.c | 13 +++++ src/backend/commands/extension.c | 36 ++++++++++--- .../test_extensions/expected/test_extensions.out | 60 +++++++++++++++++----- .../test_extensions/sql/test_extensions.sql | 44 +++++++++++++--- 4 files changed, 126 insertions(+), 27 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Reject extnamespace if it's temporary or it's '$user'::regnamesp @ 2026-11-09 14:21 Noah Misch <noah@leadboat.com> 0 siblings, 0 replies; 5+ messages in thread From: Noah Misch @ 2026-11-09 14:21 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Reject extnamespace if it's temporary or it's '$user'::regnamespace. Historical behavior was bizarre. 'CREATE EXTENSION tcn SCHEMA "$user"' set extnamespace='$user'::regnamespace, but the extension's object landed in the schema named after the bootstrap superuser if such a schema existed, else in pg_temp. Many extension scripts failed, since pg_temp is searched for only a subset of object types. In other scenarios, a trusted-extension script located the wrong object and executed arbitrary SQL of a non-superuser's choice. The prior commit's locking additions could not cover this. Back-patch to v14 (all supported versions). Reported-by: Noah Misch <noah@leadboat.com> Reviewed-by: Greg Burd <greg@burd.me> Backpatch-through: 14 Security: CVE-2026-6467 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/b552d6efb23e13a65906202bafb0e101a2355521 Modified Files -------------- src/backend/catalog/namespace.c | 13 +++++ src/backend/commands/extension.c | 36 ++++++++++--- .../test_extensions/expected/test_extensions.out | 60 +++++++++++++++++----- .../test_extensions/sql/test_extensions.sql | 44 +++++++++++++--- 4 files changed, 126 insertions(+), 27 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Reject extnamespace if it's temporary or it's '$user'::regnamesp @ 2026-11-09 14:22 Noah Misch <noah@leadboat.com> 0 siblings, 0 replies; 5+ messages in thread From: Noah Misch @ 2026-11-09 14:22 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Reject extnamespace if it's temporary or it's '$user'::regnamespace. Historical behavior was bizarre. 'CREATE EXTENSION tcn SCHEMA "$user"' set extnamespace='$user'::regnamespace, but the extension's object landed in the schema named after the bootstrap superuser if such a schema existed, else in pg_temp. Many extension scripts failed, since pg_temp is searched for only a subset of object types. In other scenarios, a trusted-extension script located the wrong object and executed arbitrary SQL of a non-superuser's choice. The prior commit's locking additions could not cover this. Back-patch to v14 (all supported versions). Reported-by: Noah Misch <noah@leadboat.com> Reviewed-by: Greg Burd <greg@burd.me> Backpatch-through: 14 Security: CVE-2026-6467 Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/5c751533737eb08c97d6816e43039324e34bad42 Modified Files -------------- src/backend/catalog/namespace.c | 13 +++++ src/backend/commands/extension.c | 36 ++++++++++--- .../test_extensions/expected/test_extensions.out | 60 +++++++++++++++++----- .../test_extensions/sql/test_extensions.sql | 44 +++++++++++++--- 4 files changed, 126 insertions(+), 27 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Reject extnamespace if it's temporary or it's '$user'::regnamesp @ 2026-11-09 14:22 Noah Misch <noah@leadboat.com> 0 siblings, 0 replies; 5+ messages in thread From: Noah Misch @ 2026-11-09 14:22 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Reject extnamespace if it's temporary or it's '$user'::regnamespace. Historical behavior was bizarre. 'CREATE EXTENSION tcn SCHEMA "$user"' set extnamespace='$user'::regnamespace, but the extension's object landed in the schema named after the bootstrap superuser if such a schema existed, else in pg_temp. Many extension scripts failed, since pg_temp is searched for only a subset of object types. In other scenarios, a trusted-extension script located the wrong object and executed arbitrary SQL of a non-superuser's choice. The prior commit's locking additions could not cover this. Back-patch to v14 (all supported versions). Reported-by: Noah Misch <noah@leadboat.com> Reviewed-by: Greg Burd <greg@burd.me> Backpatch-through: 14 Security: CVE-2026-6467 Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/b049106516df15009a0e6348385f8833e0a2bf58 Modified Files -------------- src/backend/catalog/namespace.c | 13 +++++ src/backend/commands/extension.c | 36 ++++++++++--- .../test_extensions/expected/test_extensions.out | 60 +++++++++++++++++----- .../test_extensions/sql/test_extensions.sql | 44 +++++++++++++--- 4 files changed, 126 insertions(+), 27 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2026-11-09 14:22 UTC | newest] Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-11-09 14:21 pgsql: Reject extnamespace if it's temporary or it's '$user'::regnamesp Noah Misch <noah@leadboat.com> 2026-11-09 14:21 pgsql: Reject extnamespace if it's temporary or it's '$user'::regnamesp Noah Misch <noah@leadboat.com> 2026-11-09 14:21 pgsql: Reject extnamespace if it's temporary or it's '$user'::regnamesp Noah Misch <noah@leadboat.com> 2026-11-09 14:22 pgsql: Reject extnamespace if it's temporary or it's '$user'::regnamesp Noah Misch <noah@leadboat.com> 2026-11-09 14:22 pgsql: Reject extnamespace if it's temporary or it's '$user'::regnamesp Noah Misch <noah@leadboat.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox