Re: [HACKERS] Re: New pg_pwd patch and stuff

Поиск
Список
Период
Сортировка
От Phil Thompson
Тема Re: [HACKERS] Re: New pg_pwd patch and stuff
Дата
Msg-id 34BFB8CA.467C128B@river-bank.demon.co.uk
обсуждение исходный текст
Ответ на Re: [HACKERS] Re: New pg_pwd patch and stuff  (The Hermit Hacker <scrappy@hub.org>)
Ответы Re: [HACKERS] Re: New pg_pwd patch and stuff  (todd brandys <brandys@eng3.hep.uiuc.edu>)
Список pgsql-hackers
The Hermit Hacker wrote:
>
> On Fri, 16 Jan 1998, Micha3 Mosiewicz wrote:
>
> > No, no, no! For security reasons, you can't fork (and exec)
> > unauthenticated processes. Especially HBA authentication should be done
> > to consume as low resources as possbile. Otherwise you open a giant door
> > for so infamously called Denial of Service attacks. Afterwards, every
> > hacker will know that to bring your system running postgres to it's
> > knees he just have to try to connect to 5432 port very frequently. "OK",
> > you might say, "I have this firewall". "OK", I say, "so what's that HBA
> > for?".
> >
> > So it's the postmaster's role to deny as much connections as possible.
> > Unless we speak of non-execing postgres childs?
>
>         Hrmmmm...i don't quite agree with this.  postmaster can handle one
> connection at a time, and then has to pass it off to the postgres backend
> process...DoS attacks are easier now then by forking before HBA.  I just have
> to continuously open a connection to port 5432...so, while postmaster is
> handling that connection, checking HBA, checking a password...no other new
> connections can  happen.  Can't think of a stronger DoS then that...? :)

I think Micha is right.  The postmaster can handle multiple connections
as the read of the startup packet is done a fragment at a time without
blocking so there is no DoS problem until the postmaster runs out of
sockets.  I think this is less of a problem than loads of
unauthenticated, resource hungry backends forked by the postmaster.

In changing the authentication methods for 6.3 I've had to add the
ability for the postmaster to do non-blocking writes as well as reads so
that a two-way (non-blocking) dialog can take place between frontend and
postmaster.

Having said that, I won't fix (for 6.3 anyway) other parts of the
postmaster that do blocked I/O - the ident lookup in particular.
However, it is at least under the control of the DBA whether or not
ident is used.

Phil

В списке pgsql-hackers по дате отправления:

Предыдущее
От: The Hermit Hacker
Дата:
Сообщение: Re: [HACKERS] PSQL man page patch
Следующее
От: maycock@intelliquest.com
Дата:
Сообщение: Latest src tree