| From: | Nathan Bossart <nathan(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Check for CREATE privilege on the schema in CREATE STATISTICS. |
| Date: | 2025-11-10 15:01:06 |
| Message-ID: | E1vITOE-005vvG-0G@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Check for CREATE privilege on the schema in CREATE STATISTICS.
This omission allowed table owners to create statistics in any
schema, potentially leading to unexpected naming conflicts. For
ALTER TABLE commands that require re-creating statistics objects,
skip this check in case the user has since lost CREATE on the
schema. The addition of a second parameter to CreateStatistics()
breaks ABI compatibility, but we are unaware of any impacted
third-party code.
Reported-by: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
Author: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
Co-authored-by: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Reviewed-by: Noah Misch <noah(at)leadboat(dot)com>
Reviewed-by: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
Security: CVE-2025-12817
Backpatch-through: 13
Branch
------
REL_15_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/2393d374ae9c0bc8327adc80fe4490edb05be167
Modified Files
--------------
src/backend/commands/statscmds.c | 16 +++++++++++++++-
src/backend/commands/tablecmds.c | 2 +-
src/backend/tcop/utility.c | 2 +-
src/include/commands/defrem.h | 2 +-
src/test/regress/expected/stats_ext.out | 19 +++++++++++++++++++
src/test/regress/sql/stats_ext.sql | 19 +++++++++++++++++++
6 files changed, 56 insertions(+), 4 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Heikki Linnakangas | 2025-11-10 17:22:01 | pgsql: Bump PG_CONTROL_VERSION for commit 3e0ae46d90 |
| Previous Message | Jacob Champion | 2025-11-10 14:24:49 | pgsql: libpq: Prevent some overflows of int/size_t |