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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
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 15:07:11
Message-ID: 25065.1276096031@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
> On 09/06/10 17:34, Tom Lane wrote:
>> 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.

And that's what I'm telling you is a hopeless task.

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

I think that's the only solution that will actually fix the problem,
rather than lead to a never-ending series of security bugs. In
hindsight we should never have exposed that function in that form.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2010-06-09 15:08:22 Re: Bad optimizer data for xml (WAS: xml data type implications of no =)
Previous Message Robert Haas 2010-06-09 15:05:03 Re: Invalid YAML output from EXPLAIN

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2010-06-09 15:09:02 Re: Streaming Replication: Checkpoint_segment and wal_keep_segments on standby
Previous Message Robert Haas 2010-06-09 15:05:03 Re: Invalid YAML output from EXPLAIN