![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Please describe a way to repeat the problem. Please try to provide a concise reproducible example, if at all possible: ---------------------------------------------------------------------- testdb=# SELECT crypt('lalalal',gen_salt('md5')); server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. The connection to the server was lost. Attempting reset: Failed. pglog LOG: ReadRecord: record with zero length at 0/18BDEA8 LOG: redo is not required LOG: database system is ready LOG: server process (pid 21460) was terminated by signal 11 LOG: terminating any other active server processes LOG: all server processes terminated; reinitializing shared memory and semaphores LOG: database system was interrupted at 2003-07-21 11:44:47 EEST LOG: checkpoint record is at 0/18BDEA8 LOG: redo record is at 0/18BDEA8; undo record is at 0/0; shutdown TRUE LOG: next transaction id: 996; next oid: 98896 LOG: database system was not properly shut down; automatic recovery in progress FATAL: The database system is starting up /pglog |
#3
| |||
| |||
|
|
testdb=# SELECT crypt('lalalal',gen_salt('md5')); server closed the connection unexpectedly FWIW, I can confirm this, but I don't think it's a FreeBSD specific problem given that the backend dies inside of an OpenSSL routine. |
#4
| |||
| |||
|
|
FWIW, I can confirm this, but I don't think it's a FreeBSD specific problem given that the backend dies inside of an OpenSSL routine. #0 0x2864ae9c in EVP_DigestUpdate () from /usr/lib/libcrypto.so.3 #1 0x28576a90 in px_find_cipher () from /usr/local/lib/postgresql/pgcrypto.so #2 0x2857c584 in px_crypt_md5 () from /usr/local/lib/postgresql/pgcrypto.so |
#5
| |||
| |||
|
|
FWIW, I can confirm this, but I don't think it's a FreeBSD specific problem given that the backend dies inside of an OpenSSL routine. #0 0x2864ae9c in EVP_DigestUpdate () from /usr/lib/libcrypto.so.3 #1 0x28576a90 in px_find_cipher () from /usr/local/lib/postgresql/pgcrypto.so #2 0x2857c584 in px_crypt_md5 () from /usr/local/lib/postgresql/pgcrypto.so By chance I noticed this entry in the CVS logs: 2002-11-14 21:54 momjian * contrib/pgcrypto/openssl.c: OpenSSL 0.9.6g in Debian/unstable stopped working with pgcrypto. This is pgcrypto bug as it assumed too much about inner workings of OpenSSL. Following patch stops pgcrypto using EVP* functions for ciphers and lets it manage ciphers itself. This patch supports Blowfish, DES and CAST5 algorithms. Marko Kreen Perhaps the problem is that Marko didn't fix the crypt() code in the same way? |
#6
| |||
| |||
|
|
testdb=# SELECT crypt('lalalal',gen_salt('md5')); server closed the connection unexpectedly FWIW, I can confirm this, but I don't think it's a FreeBSD specific problem given that the backend dies inside of an OpenSSL routine. Works fine here: regression=# SELECT crypt('lalalal',gen_salt('md5')); crypt ------------------------------------ $1$2tnDkstz$e2vTadSh2zGH4yh51Ocbu0 (1 row) "here" being Red Hat 8.0 with these OpenSSL packages: openssl095a-0.9.5a-16 openssl-devel-0.9.6b-29 openssl-perl-0.9.6b-29 openssl-0.9.6b-29 openssl096-0.9.6-11 What OpenSSL release are you using? |
#7
| |||
| |||
|
|
Perhaps the problem is that Marko didn't fix the crypt() code in the same way? Ah, I think that's _very_ likely the case here... -sc |
#8
| |||
| |||
|
|
Possible, but I'm a skeptical of that. FreeBSD's openssl code _should_ be stock (unless someone bungled the import) with the exception of not including Win32 or other non-FreeBSD related bits. crypt() works when salted with only 2 chars, however it shouldn't core with more than that... |
#9
| |||
| |||
|
|
Possible, but I'm a skeptical of that. FreeBSD's openssl code _should_ be stock (unless someone bungled the import) with the exception of not including Win32 or other non-FreeBSD related bits. crypt() works when salted with only 2 chars, however it shouldn't core with more than that... But maybe the problem is in crypt(3) and not in OpenSSL at all? I'm quite willing to believe that neither Linux nor HPUX share crypt() source with FreeBSD... |
#10
| |||
| |||
|
|
Try applying the attached patch and seeing if that lets you reproduce the crash. |
![]() |
| Thread Tools | |
| Display Modes | |
| |