public inbox for [email protected]  
help / color / mirror / Atom feed
From: Vladlen Popolitov <[email protected]>
To: Sutou Kouhei <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Subject: Re: Make COPY format extendable: Extract COPY TO format implementations
Date: Mon, 03 Feb 2025 13:38:04 +0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <CAD21AoBpWFU4k-_bwrTq0AkFSAdwQqhAsSW188STmu9HxLJ0nQ@mail.gmail.com>
	<[email protected]>
	<CAD21AoA3KMddnjxY1hxth3f4f1wo8a8i2icgK6GEKqXNR_e6jA@mail.gmail.com>
	<[email protected]>

Sutou Kouhei писал(а) 2025-02-01 17:12:
> Hi,
> 

Hi
I would like to inform about the security breach in your design of COPY 
TO/FROM.

You use FORMAT option to add new formats, filling it with routine name
in shared library. As result any caller can call any routine in 
PostgreSQL kernel.
I think, it will start competition, who can find most dangerous routine
to call just from COPY FROM command.

  Standard PostgreSQL realisation for new methods to use USING keyword. 
Every
new method could have own options (FORMAT is option of internal 'copy 
from/to'
methods), it assumes some SetOptions interface, that defines
an options structure according to the new method requirements.

  I agree with the general direction of the extensibility, but it should 
be secure
and consistent.

-- 
Best regards,

Vladlen Popolitov.






view thread (14+ messages)  latest in thread

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: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Make COPY format extendable: Extract COPY TO format implementations
  In-Reply-To: <[email protected]>

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

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox