From: Michael Paquier <michael@paquier.xyz>
To: Alessandro Gherardi <alessandro.gherardi@yahoo.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: scram-sha-256 authentication broken in FIPS mode
Date: Tue, 4 Sep 2018 21:27:17 -0700
Message-ID: <20180905042717.GL20696@paquier.xyz> (raw)
In-Reply-To: <898098721.1290085.1536118171911@mail.yahoo.com>
References: <898098721.1290085.1536118171911.ref@mail.yahoo.com>
<898098721.1290085.1536118171911@mail.yahoo.com>
On Wed, Sep 05, 2018 at 03:29:31AM +0000, Alessandro Gherardi wrote:
> It looks like scram-sha-256 doesn't work when postgres is linked
> against FIPS-enabled OpenSSL and FIPS mode is turned on.
>
> Specifically, all login attempts fail with an OpenSSL error saying
> something along the lines of "Low level API call to digest SHA256
> forbidden in fips mode".
The error comes from libc, right? Postgres can of course be configured
to work with FIPS without patching it, it just needs to be enabled
system-wide, which is what RedHat does, and what you are doing I guess?
> I think this issue could be solved by refactoring the code in
> sha2_openssl.c to use the OpenSSL EVP interface
> (see https://wiki.openssl.org/index.php/EVP_Message_DigestsĀ ).
> Any thoughts? Is this a known issue?
This report is the first of this kind since Postgres 10, which is where
the SHA2 interface for OpenSSL has been introduced. So likely we'd need
to look into that more deeply.. This has the strong smell of a bug. If
your system is new enough, you should have sha256() & co as system
functions, so you would see the failure as well? The regression tests
would have likely complained.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: michael@paquier.xyz, alessandro.gherardi@yahoo.com
Subject: Re: scram-sha-256 authentication broken in FIPS mode
In-Reply-To: <20180905042717.GL20696@paquier.xyz>
References: <898098721.1290085.1536118171911.ref@mail.yahoo.com> <898098721.1290085.1536118171911@mail.yahoo.com> <20180905042717.GL20696@paquier.xyz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox