Re: @(#)Mordred Labs advisory 0x0007: Remove DoS in PostgreSQL

From: "Shridhar Daithankar" <shridhar_daithankar(at)persistent(dot)co(dot)in>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: @(#)Mordred Labs advisory 0x0007: Remove DoS in PostgreSQL
Date: 2002-08-26 14:55:15
Message-ID: 3D6A8EAB.31690.244677E0@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 26 Aug 2002 at 14:46, Sir Mordred The Traitor wrote:
> [snip]
> static int recv_and_check_password0(Port *port) {
> int32 len;
> char *buf;
>
> if (pq_getint(&len, 4) == EOF)
> return STATUS_EOF;
> len -= 4;
> buf = palloc(len); /* len is taken from a packet */
> [snip]

So that should read,

buf=palloc((len>LENMAX?SAFELEN:len));

is what you want to say?

sounds good to me.. But if it is taken from the packet, won't that be tripped
to MTA size? Just a naïve question. Never saw much of postgres code myself..

Bye
Shridhar

--
Wilcox's Law: A pat on the back is only a few centimeters from a kick in the
pants.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-08-26 15:02:56 Re: @(#)Mordred Labs advisory 0x0007: Remove DoS in PostgreSQL
Previous Message Sir Mordred The Traitor 2002-08-26 14:46:19 @(#)Mordred Labs advisory 0x0007: Remove DoS in PostgreSQL