Skip site navigation (1) Skip section navigation (2)

Re: How to get SE-PostgreSQL acceptable

From: KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org, sfrost(at)snowman(dot)net
Subject: Re: How to get SE-PostgreSQL acceptable
Date: 2009-01-29 04:33:01
Message-ID: 4981317D.4030500@ak.jp.nec.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Robert Haas wrote:
>> My concern is that superuser is allowed to modify system catalog
>> by hand, like:
>>
>>  UPDATE pg_proc SET probin = '/tmp/malicious_library.so'
>>     WHERE oid = ...;
>>
>> It is logically same as ALTER FUNCTION.
>>
>> Even if I remove a hook from simple_heap_xxxx(), it is necessary
>> to check queries from clients.
> 
> That's a valid concern, I think all we're saying here is that you need
> to find a better place to block that, maybe by assigning pg_proc an
> security label that prevents modification by the superuser.

On SE-PostgreSQL, we have two kind of superuser:
  1. A superuser with privileged domain for ALTER FUNCTION.
  2. A superuser with unprivileged domain for ALTER FUNCTION.

SE-PostgreSQL also allows (1) to modify pg_proc by hand,
becuase security policy allows it.
(But, OS feature can block someone untrusted (like web app) to
  translate into privileged domain.)

Stephen's suggestion (deny to update all the system catalog) seems
to me a bit rough. I don't make sure there is no application which
depends on superuser is writable to system catalog.

In addition, this limitation is not based on security policy.

So, I think we have to deploy a hook on ExecUpdate() at least,
simple_heap_update() aside.
If we cannot obtain enough information from context, we can
apply possible maximum permissions here.

Thanks,
-- 
OSS Platform Development Division, NEC
KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com>

In response to

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2009-01-29 04:35:22
Subject: Re: Commitfest infrastructure (was Re: 8.4 release =?iso-8859-1?q?=09planning?=)
Previous:From: Bruce MomjianDate: 2009-01-29 04:19:02
Subject: Re: pg_upgrade project status

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group