Re: [BUG] SECURITY DEFINER on call handler makes daemon crash

From: KaiGai Kohei <kaigai(at)kaigai(dot)gr(dot)jp>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com>, PostgreSQL-Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [BUG] SECURITY DEFINER on call handler makes daemon crash
Date: 2010-03-20 02:29:19
Message-ID: 4BA432FF.8010905@kaigai.gr.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

(2010/03/20 11:17), Robert Haas wrote:
> On Fri, Mar 19, 2010 at 8:11 PM, Tom Lane<tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Robert Haas<robertmhaas(at)gmail(dot)com> writes:
>>> On Fri, Mar 19, 2010 at 8:18 AM, Tom Lane<tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>>> KaiGai Kohei<kaigai(at)ak(dot)jp(dot)nec(dot)com> writes:
>>>>> When we assign "SECURITY DEFINER" attribute on plpgsql_call_handler(),
>>>>> it makes server process crashed.
>>>>
>>>> So don't do that. Whatever possessed you to think that's a sensible
>>>> idea anyway?
>>
>>> It might not be sensible, but the whole server going down as a result
>>> doesn't seem very sensible either.
>>
>> [ shrug... ] If you would like to start enumerating the ways in which
>> you can crash the server with erroneous pg_proc entries for C functions,
>> go for it. It'll keep you out of trouble for a very long time.
>
> It's obviously not possible to make this bulletproof in general, but
> that doesn't mean we should crash just for fun.

I'd like to put the question in anotherexpression.

Is it an expected behavior that PostgreSQL tries to execute foo() with
privileges of the owner of language call handler because of its security
definer property? This server crash is just a result.

Thanks,
--
KaiGai Kohei <kaigai(at)kaigai(dot)gr(dot)jp>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2010-03-20 03:27:15 Re: [BUG] SECURITY DEFINER on call handler makes daemon crash
Previous Message Robert Haas 2010-03-20 02:17:41 Re: [BUG] SECURITY DEFINER on call handler makes daemon crash