Re: [BUGS] Server crash while trying to read expression using pg_get_expr()

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Rushabh Lathia <rushabh(dot)lathia(at)enterprisedb(dot)com>
Subject: Re: [BUGS] Server crash while trying to read expression using pg_get_expr()
Date: 2010-06-09 14:38:56
Message-ID: 4C0FA780.5000209@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On 09/06/10 17:34, Tom Lane wrote:
> Heikki Linnakangas<heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
>> We have two options:
>
>> 1. Make pg_get_expr() handle arbitrary (possibly even malicious) input
>> gracefully.
>
>> 2. Restrict pg_get_expr() to superusers only.
>
> I think #1 is a fool's errand. There is far too much structure to a
> node tree that is outside the scope of what readfuncs.c is capable of
> understanding.

That's why I said that ruleutils.c will need to understand and complain
about the rest.

Are you thinking we should restrict pg_get_expr() to superusers then?

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Robert Haas 2010-06-09 14:43:11 Re: Invalid YAML output from EXPLAIN
Previous Message Heikki Linnakangas 2010-06-09 14:38:42 Re: [BUGS] Server crash while trying to read expression using pg_get_expr()

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-06-09 14:41:25 Re: failover vs. read only queries
Previous Message Heikki Linnakangas 2010-06-09 14:38:42 Re: [BUGS] Server crash while trying to read expression using pg_get_expr()