| From: | Noah Misch <noah(at)leadboat(dot)com> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: vacuumdb: Fully qualify the catalog query's operators. |
| Date: | 2026-11-09 14:21:58 |
| Message-ID: | E1xQQFy-000000003dU-3mXl@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
vacuumdb: Fully qualify the catalog query's operators.
vacuumdb runs its catalog query with the session's default
search_path so that --table arguments resolve as they would in
psql, but commit edba754f05 added two constructs whose = is not
schema-qualified: the relkind IN list in the LATERAL and the IS
DISTINCT FROM tests on attstattarget and stxstattarget. This
allows a database owner to shadow the operator with their own and
execute arbitrary code as the user running vacuumdb. To fix,
rewrite the former as OPERATOR(pg_catalog.=) ANY (array[...]) like
the relkind filter in the WHERE clause, and the latter as an IS
NULL test with OPERATOR(pg_catalog.<>).
Reported-by: Noah Misch <noah(at)leadboat(dot)com>
Reported-by: Anthropic OSS program
Author: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Co-authored-by: Anthropic OSS program
Reviewed-by: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
Security: CVE-2026-116313
Backpatch-through: 18
Branch
------
REL_18_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/e10d38d4715ecb75b274546f0c5917de2fe14829
Author: Nathan Bossart <nathan(at)postgresql(dot)org>
Modified Files
--------------
src/bin/scripts/vacuumdb.c | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Noah Misch | 2026-11-09 14:21:59 | pgsql: Reject pseudo-types in extended statistics expressions. |
| Previous Message | Noah Misch | 2026-11-09 14:21:57 | pgsql: Fix reusing large allocations in generation memory contexts |