Re: Buffer overflow in psql

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jack Orenstein <jorenstein(at)Archivas(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Buffer overflow in psql
Date: 2006-11-22 18:52:51
Message-ID: 2950.1164221571@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jack Orenstein <jorenstein(at)Archivas(dot)com> writes:
> Tom Lane wrote:
>> Good catch! What platform and compiler are you using exactly? I'd
>> imagine that on most platforms, the size of that array is effectively
>> rounded up to 12 bytes due to alignment/padding considerations, which
>> would mask the mistake. Yours must somehow be putting something
>> critical right after the array.

> We're using gcc-4.0.2-8.fc4 on FC4 (intel). I believe that we didn't
> just get lucky with the overflow. One of our Linux experts says that
> our libc is doing memory bounds checking.

Ah so, that explains how come it noticed. BTW, I see that somebody
already changed the array size to 16 bytes in HEAD --- so it's just
the back branches that need fixing.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Brandon Aiken 2006-11-22 18:55:55 Re: MSSQL to PostgreSQL : Encoding problem
Previous Message Jack Orenstein 2006-11-22 18:47:52 Re: Buffer overflow in psql