Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xMgsh-000000029Tu-03Go for pgsql-bugs@arkaria.postgresql.org; Fri, 30 Oct 2026 07:18:31 +0000 Received: from localhost ([127.0.0.1]:51180 helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xMgsf-00000008qJl-29H9 for pgsql-bugs@arkaria.postgresql.org; Fri, 30 Oct 2026 07:18:29 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]:45776) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xMS6r-000000054FJ-0wtw for pgsql-bugs@lists.postgresql.org; Thu, 29 Oct 2026 15:32:09 +0000 Received: from mahout.postgresql.org ([2001:4800:3e1:1::227]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xMS6o-00000001biI-3RTZ for pgsql-bugs@lists.postgresql.org; Thu, 29 Oct 2026 15:32:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=postgresql.org; s=20171124; h=Message-ID:Date:Reply-To:Cc:From:To:Subject: Content-Transfer-Encoding:MIME-Version:Content-Type:Sender:Content-ID: Content-Description:In-Reply-To:References; bh=mY6iagY8Gbwt7LsDjJ3KIR59rjN9AWZdadEKeM5Popw=; b=sOfUJbjyVzOJ3HI5/MHgDa9LTH 5z6toj4wdSVhtsOfhM9AzQunQLVu0IjOixG6uy0z0bsSXQdktz/mcSD9oBkOtXssI53n47xDtPEk5 uWngH4sTKHvqLFEsYJM64IlHNYyTAa/gAEXLOeB7V3x0I0hZETt1w1aH4OQ1gooMIvQN+xumQLvwc Rp+mFIN9nbDz39M2a1rqQ+wIXCFojNLs3p306WDVLULlMPh2MXWHvYpUkN4cloExOPVj+IG60qsVw yGNwz4C5kH5KZNRpjFJfFqIU6124rk1VKj7YZWVXNWnS9/4XQY4HbWEIDmkoLizXEYwnQTzrGFyfE JwyHufNA==; Received: from wrigleys.postgresql.org ([2a02:16a8:dc51::60]) by mahout.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xMS6n-00000004Sc8-1ebY for pgsql-bugs@lists.postgresql.org; Thu, 29 Oct 2026 15:32:05 +0000 Received: from localhost ([127.0.0.1] helo=wrigleys.postgresql.org) by wrigleys.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xMS6k-00000006AXc-3vLv for pgsql-bugs@lists.postgresql.org; Thu, 29 Oct 2026 15:32:03 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #19815: 004_sni.pl fails deterministically with OpenSSL 1.1.1 (tests 75 and 86) To: pgsql-bugs@lists.postgresql.org From: PG Bug reporting form Cc: benjamin.arthur.mejia@gmail.com Reply-To: benjamin.arthur.mejia@gmail.com, pgsql-bugs@lists.postgresql.org Date: Thu, 29 Oct 2026 15:32:00 +0000 Message-ID: <19815-8c6d40e717afe5fd@postgresql.org> X-Auto-Response-Suppress: All Auto-Submitted: auto-generated List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk The following bug has been logged on the website: Bug reference: 19815 Logged by: Ben Mejia Email address: benjamin.arthur.mejia@gmail.com PostgreSQL version: 19rc1 Operating system: RHEL 8.10 (UBI 8 container), x86_64, OpenSSL 1.1. Description: =20 The new SNI test src/test/ssl/t/004_sni.pl fails on RHEL 8 with OpenSSL 1.1.1k, which configure.ac documents as the minimum supported version. Two of its 129 assertions fail on every run. The same source passes on RHEL 9, and the test has no OpenSSL version guard. Environment - RHEL 8.10 (UBI 8 builder image), x86_64, openssl-1.1.1k-18.el8_6 - configure --enable-tap-tests --with-openssl (plus other options) - source: REL_19_STABLE at fc189eb7508 (after the REL_19_RC1 tag), which includes commit 4f433025f66 ("ssl: Serverside SNI support for libpq"); checked against current REL_19_STABLE (0c6e0437110): the test and be-secure-openssl.c are unchanged by the 40 newer commits except for 9674c91aeb2 (EXEC_BACKEND/Windows, unrelated to this path) Reproduce make -C src/test/ssl check PG_TEST_EXTRA=3Dssl PROVE_TESTS=3Dt/004_sni.pl Result (5 of 5 runs identical, about 6 seconds each) # Failed test 'pg_hosts.conf: connect to default with sslmode=3Drequire: matches' # at t/004_sni.pl line 333. # 'psql: error: connection to server at "127.0.0.1", port 22348 failed: SSL SYSCALL error: EOF detected' # doesn't match '(?^:handshake failure)' # Failed test 'pg_hosts.conf: connect to default after failed reload with ssl_sni off: matches' # at t/004_sni.pl line 394. (same message) # Looks like you failed 2 tests of 129. Both are connect_fails() calls with sslsni=3D0 against a server whose pg_hosts.conf has no default entry, expecting qr/handshake failure/. The other 127 assertions pass, including the ones that expect "unrecognized name". What I checked - The server rejects the connection as the code intends. Its log has "could not accept SSL connection: callback failed", and there is no crash or signal. In sni_clienthello_cb() the no-hostname case sets *al =3D SSL_AD_MISSING_EXTENSION and returns SSL_CLIENT_HELLO_ERROR. - It is not TLS 1.3 specific. With ssl_max_protocol_version =3D 'TLSv1.2' on the server (the server log then shows protocol=3DTLSv1.2 for all 27 connections), the same two assertions fail the same way. - It is not a timing race: 5 of 5 runs fail. - The same source on RHEL 9 with its system OpenSSL 3 passes the whole test, so the client there does report the expected message. I did not record that OpenSSL's exact version. What I do not know - Whether the 1.1.1 server does not send the alert on this early ClientHello-callback failure, or sends it and the 1.1.1 client does not read it before the connection closes. I have not looked at the traffic. - Whether any buildfarm animal runs this test with OpenSSL 1.1.1. Question Is the expected message in these two assertions meant to depend on the OpenSSL version? If 1.1.1 should be supported here, should the test accept the EOF form (as some other tests in this directory accept alternatives), or should the server behave differently in this case? I am happy to run further experiments on this setup.