On 23.08.2023 16:23, Daniel Gustafsson wrote:
On 1 Aug 2023, at 16:44, Sergey Shinderuk <s.shinde...@postgrespro.ru> wrote:
A static analyzer reported a possible pfree(NULL) in be_tls_open_server().
This has the smell of a theoretical problem, I can't really imagine a
certificate where which would produce this. Have you been able to trigger it?
I triggered a crash by generating a certificate without a CN and forcing
malloc to return NULL when called from X509_NAME_print_ex or
BIO_get_mem_ptr with gdb.
Initially I tried to trigger a crash by generating a certificate without
a CN and with a DN contaning the null byte. But as I said, the error
condition "SSL certificate's distinguished name contains embedded null"
isn't really reachable, because XN_FLAG_RFC2253 escapes null bytes.
--
Sergey Shinderuk https://postgrespro.com/