Re: Possible problem with pgcrypto

From: Jan Wieck <jan(at)wi3ck(dot)info>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Possible problem with pgcrypto
Date: 2015-02-05 19:10:24
Message-ID: 54D3C020.9030005@wi3ck.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 02/05/2015 10:58 AM, Tom Lane wrote:
> Jan Wieck <jan(at)wi3ck(dot)info> writes:
>> I have encountered a small instability in the behavior of pgcrypto's
>> pgp_sym_decrypt() function. Attached is a script that can reproduce the
>> problem. It may have to be run repeatedly because the symptom occurs
>> rather seldom.
>
>> What the script does is to encode a small string with pgp_sym_encrypt()
>> and then repeatedly try to decrypt it with different "wrong" passwords.
>> The expected error message for that is of course
>> "Wrong key or corrupt data".
>
>> Every now and then, I get a different error message. Things I've seen are:
>
> Have you tested this with this week's releases? We fixed some
> memory-mishandling bugs in pgcrypto ...

The posted script reproduces the symptom in today's checkout of master
as well as REL9_4_STABLE.

Jan

--
Jan Wieck
Senior Software Engineer
http://slony.info

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2015-02-05 19:11:10 Re: Redesigning checkpoint_segments
Previous Message Michael Paquier 2015-02-05 18:42:42 Re: [REVIEW] Re: Compression of full-page-writes