Subject: Fast-Path documentation

From: Peter Eisentraut <[email-masked]>
Date: Wed, 5 Mar 2003 18:13:17 +0100 (CET)

The libpq documentation contains this:

"""
<productname>PostgreSQL</productname> provides a fast-path interface to
send function calls to the backend.  This is a trapdoor into system
internals and can be a potential security hole.  Most users will not need
this feature.
"""

Why and under what circumstances is this a security hole, and what is a
user to do about it?

-- 
Peter Eisentraut   [email-masked]

---

From: Tom Lane <[email-masked]>
Date: Thu, 06 Mar 2003 18:19:27 -0500

> Why and under what circumstances is this a security hole, and what is a

The security problem is that the frontend feeds raw internal-format data
to the backend.  While this is relatively harmless for datatypes with no
internal structure, it'd be pretty easy to crash the backend by feeding
in a misconstructed polygon, for example.  There was some discussion of
this in pgsql-interfaces awhile back, see
http://archives.postgresql.org/pgsql-interfaces/2003-01/msg00000.php

There are a bunch of other problems with the fast-path protocol; see
comments in src/backend/tcop/fastpath.c.  I consider redesigning it to
be one of the "must do" topics for the long-threatened protocol revision.

			regards, tom lane