pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: ljb <lbayuk@mindspring.com>
To: pgsql-interfaces@postgresql.org
Subject: Re: Is PQfn() insecure or not?
Date: Wed, 1 Jan 2003 21:57:13 +0000 (UTC)
Message-ID: <auvo7p$1viu$1@news.hub.org> (raw)
References: <7477.1041448969@sss.pgh.pa.us>

tgl@sss.pgh.pa.us wrote:
> ljb <lbayuk@mindspring.com> writes:
>> "Programmer's Guide, Client Interfaces, libpq, The Fast-Path Interface"
>> describes PQfn() and has this alarming remark:
>>   "This is a trapdoor into system internals and can be a potential
>>    security hole."
>> Sure this isn't true. PQfn() just lets a frontend call a function which is
>> also accessible (if maybe not useful) via a SELECT statement, correct?
> 
> The insecure part is not the function call per se (*); it's the fact
> that the frontend feeds raw internal-format values to the backend for
> the function's parameters.  It'd be fairly trivial to cause a backend
> crash by feeding bogus data.  Not sure whether it's possible to do
> anything worse than that.

Well, if it's 'just' a backend fatal error, that would be OK with me -
you can crash your own backend, big deal. But if it can cause a "panic"
and take out all the backends, that would be more serious, and one could
argue that this means PostgreSQL needs more parameter checking. I think
I'll try and see how much damage I can do.



view thread (3+ messages)

Message-ID: <auvo7p$1viu$1@news.hub.org>
Permalink:  ../auvo7p$1viu$1@news.hub.org/
Also on:    postgresql.org/message-id/auvo7p$1viu$1@news.hub.org

 · 

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-interfaces@postgresql.org
  Cc: lbayuk@mindspring.com
  Subject: Re: Is PQfn() insecure or not?
  In-Reply-To: <auvo7p$1viu$1@news.hub.org>

* 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