pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Noah Misch <noah@leadboat.com>
To: Jeff Davis <pgsql@j-davis.com>
Cc: Nathan Bossart <nathandbossart@gmail.com>
Cc: pgsql-hackers@postgresql.org, Joe Conway <mail@joeconway.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Subject: Re: MAINTAIN privilege -- what do we need to un-revert it?
Date: Sun, 30 Jun 2024 15:23:44 -0700
Message-ID: <20240630222344.db.nmisch@google.com> (raw)
In-Reply-To: <fe5d572b02d07d8e9940f9b518d900708e0b0166.camel@j-davis.com>
References: <d4ccaf3658cb3c281ec88c851a09733cd9482f22.camel@j-davis.com>
	<20240214190226.GA373350@nathanxps13>
	<4d497d82e4516037dc1082d5a62d199ea00d62e7.camel@j-davis.com>
	<20240223213055.GA1805646@nathanxps13>
	<196d1c86d43a147e777bb74159774f255dbe73e3.camel@j-davis.com>
	<20240228165523.GA2435539@nathanxps13>
	<31ae1bf73e8a1dae3ee7ef2dd43a9bbda1e1ab86.camel@j-davis.com>
	<fe5d572b02d07d8e9940f9b518d900708e0b0166.camel@j-davis.com>

On Mon, Mar 04, 2024 at 07:52:05PM -0800, Jeff Davis wrote:
> Committed.

Commit 2af07e2 wrote:
> --- a/src/backend/access/brin/brin.c
> +++ b/src/backend/access/brin/brin.c
> @@ -1412,6 +1412,8 @@ brin_summarize_range(PG_FUNCTION_ARGS)
>  		SetUserIdAndSecContext(heapRel->rd_rel->relowner,
>  							   save_sec_context | SECURITY_RESTRICTED_OPERATION);
>  		save_nestlevel = NewGUCNestLevel();
> +		SetConfigOption("search_path", GUC_SAFE_SEARCH_PATH, PGC_USERSET,
> +						PGC_S_SESSION);

I've audited NewGUCNestLevel() calls that didn't get this addition.  Among
those, these need the addition:

- Each in ComputeIndexAttrs() -- they arise when the caller is DefineIndex()
- In DefineIndex(), after comment "changed a behavior-affecting GUC"

While "not necessary for security", ExecCreateTableAs() should do it for the
same reason it calls NewGUCNestLevel().





view thread (30+ messages)  latest in thread

Message-ID: <20240630222344.db.nmisch@google.com>
Permalink:  ../20240630222344.db.nmisch@google.com/
Also on:    postgresql.org/message-id/20240630222344.db.nmisch@google.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: noah@leadboat.com, pgsql@j-davis.com, nathandbossart@gmail.com, mail@joeconway.com, robertmhaas@gmail.com
  Subject: Re: MAINTAIN privilege -- what do we need to un-revert it?
  In-Reply-To: <20240630222344.db.nmisch@google.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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