[Bug 292903] libfetch: Segmentation fault when openssl.cnf has errors

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 03 Feb 2026 13:25:44 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292903

            Bug ID: 292903
           Summary: libfetch: Segmentation fault when openssl.cnf has
                    errors
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: mmargaron@gmail.com

Created attachment 267734
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=267734&action=edit
patch to handle error return from SSL_CTX_new

When /etc/ssl/openssl.cnf cannot be parsed, SSL_CTX_new in common.c:1186 will
return NULL, which will in turn cause a core dump later when SSL_CTX_set_mode
attempts to access it.
The attached patch prints out the error message from OpenSSL and returns -1

-- 
You are receiving this mail because:
You are the assignee for the bug.