pgsql: Patch from Marko Kreen: pgcrypto crypt()/md5 and hmac() leak - Mailing list pgsql-committers

From neilc@postgresql.org (Neil Conway)
Subject pgsql: Patch from Marko Kreen: pgcrypto crypt()/md5 and hmac() leak
Date
Msg-id 20060218204900.49D1C9DCAA7@postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
Patch from Marko Kreen:

pgcrypto crypt()/md5 and hmac() leak memory when compiled against
OpenSSL as openssl.c digest ->reset will do two DigestInit calls
against a context.  This happened to work with OpenSSL 0.9.6
but not with 0.9.7+.

Reason for the messy code was that I tried to avoid creating
wrapper structure to transport algorithm info and tried to use
OpenSSL context for it.  The fix is to create wrapper structure.

It also uses newer digest API to avoid memory allocations
on reset with newer OpenSSLs.

Thanks to Daniel Blaisdell for reporting it.

Tags:
----
REL7_4_STABLE

Modified Files:
--------------
    pgsql/contrib/pgcrypto:
        openssl.c (r1.12.4.1 -> r1.12.4.2)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/pgcrypto/openssl.c.diff?r1=1.12.4.1&r2=1.12.4.2)

pgsql-committers by date:

Previous
From: neilc@postgresql.org (Neil Conway)
Date:
Subject: pgsql: Patch from Marko Kreen: pgcrypto crypt()/md5 and hmac() leak
Next
From: neilc@postgresql.org (Neil Conway)
Date:
Subject: pgsql: Patch from Marko Kreen: pgcrypto crypt()/md5 and hmac() leak