Re: [HACKERS] Fwd: init scripts and su

2004-08-09 Thread Peter Eisentraut
Tom Lane wrote:
> (a) And there would be untrusted code running as postgres exactly
> why?

Because someone has cracked the PostgreSQL server.

> (b) Seems to me the real security bug here is the mere existence of
> that ioctl call.

Probably.  I'm just pointing out the findings about the environment 
we're operating in.  The fact is that right now "run as postgres to 
protect your root account" won't work on some systems and with 
unfortunately written init scripts.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [HACKERS] Fwd: init scripts and su

2004-08-06 Thread Andreas Pflug
Tom Lane wrote:
Christopher Kings-Lynne <[EMAIL PROTECTED]> writes:
I was asked on IRC just why we can't have user=postgres and 
group=postgres in the postgresql.conf, and simply when we are run as 
root, switch to that user and group.

I should think that running as root up until sometime after we have read
postgresql.conf would open up more security issues.  It's certainly not
a way to close this one...
postmaster could use postgres/postgres by default, overridable by 
command line.

Regards,
Andreas
---(end of broadcast)---
TIP 6: Have you searched our list archives?
  http://archives.postgresql.org


Re: [HACKERS] Fwd: init scripts and su

2004-08-05 Thread Tom Lane
Christopher Kings-Lynne <[EMAIL PROTECTED]> writes:
> I was asked on IRC just why we can't have user=postgres and 
> group=postgres in the postgresql.conf, and simply when we are run as 
> root, switch to that user and group.

I should think that running as root up until sometime after we have read
postgresql.conf would open up more security issues.  It's certainly not
a way to close this one...

regards, tom lane

---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
  joining column's datatypes do not match


Re: [HACKERS] Fwd: init scripts and su

2004-08-05 Thread Christopher Kings-Lynne
During the time between the daemon launch and it closing it's file
handles and calling setsid(2) (which some daemons don't do because
they are buggy) any other code running in the same UID could take over
the process via ptrace, fork off a child process that inherits the
administrator tty, and then stuff characters into the keyboard buffer
with ioctl(fd,TIOCSTI,&c) (*).

(a) And there would be untrusted code running as postgres exactly why?
(b) Seems to me the real security bug here is the mere existence of that
ioctl call.
I was asked on IRC just why we can't have user=postgres and 
group=postgres in the postgresql.conf, and simply when we are run as 
root, switch to that user and group.

Chris
---(end of broadcast)---
TIP 8: explain analyze is your friend


Re: [HACKERS] Fwd: init scripts and su

2004-08-05 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes:
> For your amusement...

> During the time between the daemon launch and it closing it's file
> handles and calling setsid(2) (which some daemons don't do because
> they are buggy) any other code running in the same UID could take over
> the process via ptrace, fork off a child process that inherits the
> administrator tty, and then stuff characters into the keyboard buffer
> with ioctl(fd,TIOCSTI,&c) (*).

(a) And there would be untrusted code running as postgres exactly why?

(b) Seems to me the real security bug here is the mere existence of that
ioctl call.

regards, tom lane

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])