Re: pgsql: Fix search_path to a safe value during maintenance operations.

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Noah Misch <noah(at)leadboat(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgsql: Fix search_path to a safe value during maintenance operations.
Date: 2023-06-29 20:29:40
Message-ID: 20230629202940.GA2052174@nathanxps13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Thu, Jun 29, 2023 at 11:19:38AM -0400, Robert Haas wrote:
> [ emerges from hibernation ]

Welcome back.

> If we're not going to fix the feature so that it doesn't break the
> security model, we should probably just revert it. I don't understand
> at all the idea of shipping something that we 100% know is broken.

Given Jeff's commit followed the precedent set by the fix for
CVE-2018-1058, I'm inclined to think he was on the right track. Perhaps a
more targeted fix, such as only changing search_path when the command is
not run by the table owner (as suggested upthread [0]) is worth
considering.

[0] https://postgr.es/m/CAKFQuwaVJkM9u%2BqpOaom2UkPE1sz0BASF-E5amxWPxncUhm4Hw%40mail.gmail.com

--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2023-06-29 22:50:05 pgsql: Fix pg_depend entry to AMs after ALTER TABLE .. SET ACCESS METHO
Previous Message Andrew Dunstan 2023-06-29 19:08:35 Re: pgsql: Fix search_path to a safe value during maintenance operations.

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2023-06-29 20:56:38 Re: vacuumdb/clusterdb/reindexdb: allow specifying objects to process in all databases
Previous Message Jonathan S. Katz 2023-06-29 19:51:10 Re: plan_create_index_workers doesn't account for TOAST