libpq leaks memory for SSL connections

Поиск
Список
Период
Сортировка
От Timo Sirainen
Тема libpq leaks memory for SSL connections
Дата
Msg-id CE981CB2-8907-4530-9886-24A54C9056B9@sirainen.com
обсуждение исходный текст
Ответы Re: libpq leaks memory for SSL connections  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
I noticed with valgrind how libpq is leaking memory:

at 0x483577F: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x5F645C8: CRYPTO_zalloc (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
by 0x5E94EEF: BIO_meth_new (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
by 0x65181EB: ??? (in /usr/lib/x86_64-linux-gnu/libpq.so.5.11)
by 0x651950C: ??? (in /usr/lib/x86_64-linux-gnu/libpq.so.5.11)
by 0x650140F: PQconnectPoll (in /usr/lib/x86_64-linux-gnu/libpq.so.5.11)

Debian doesn't have debuginfo packages for libpq, but looking at the code I think it's pretty clear where the bug is:

my_SSL_set_fd() calls my_BIO_s_socket() which allocates memory with BIO_meth_new(), but nothing ever frees it. Note
thatOpenSSL's BIO_s_socket() returns a const pointer to statically allocated memory. 




В списке pgsql-bugs по дате отправления:

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17209: The latest pgdg-redhat-repo-latest.noarch has incorrect path for pgdg14
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17210: Postgres Let'sEncrypt root certificate is expired and breaks installation of postgres-client