pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Christoph Moench-Tegeder <cmt@burggraben.net>
Cc: Michael Mühlbeyer <Michael.Muehlbeyer@trivadis.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: md5 issues Postgres14 on OL7
Date: Wed, 05 Jan 2022 01:08:53 -0500
Message-ID: <4190764.1641362933@sss.pgh.pa.us> (raw)
In-Reply-To: <YdUx+6Sm5T0II8Un@paquier.xyz>
References: <89B7F072-5BBE-4C92-903E-D83E865D9367@trivadis.com>
	<YcCRp9QvQvCZ7ODI@elch.exwg.net>
	<YdQ1GLqQ/Vq6LwW9@paquier.xyz>
	<4038656.1641318875@sss.pgh.pa.us>
	<YdUx+6Sm5T0II8Un@paquier.xyz>

Michael Paquier <michael@paquier.xyz> writes:
> On Tue, Jan 04, 2022 at 12:54:35PM -0500, Tom Lane wrote:
>> I reproduced this on Fedora 35 with FIPS mode enabled.  The problem
>> is that OpenSSL treats MD5 as a disallowed cipher type under FIPS
>> mode, so this call in pg_cryptohash_init fails:

> Is that 3.0.0 or 1.1.1?  I can see the following, telling that Fedora
> 35 uses OpenSSL 1.1.1:
> https://packages.fedoraproject.org/pkgs/openssl/openssl/

I don't have the image booted up right at the moment, but it was
a plain vanilla, fresh-out-of-the-box F35 install, so whatever the
default openssl version is for that.  That link does say that it
should be 1.1.1l.

> Indeed, this error is a pilot error with the cryptohash integration of
> 14.  In ~13, the custom MD5 implementation would only fail on OOM, but
> more failure modes are possible now.

Right, the code in md5_text() was fine when it was written ... but
now, not so much.

> At the end, I agree that we should improve the error message in these
> two cases.  However, I would stick to simplicity by not assuming that 
> those two code paths fail only on OOM, and reword things in md5_text()
> and md5_bytea() with a simple "could not compute MD5 hash".  Any code
> paths calling the routines of md5_common.c just do that as well for
> ages when the computation fails, and that's what we care about here.

I think it's very important that the error message in this case
mention "FIPS mode" explicitly.  Otherwise, people will have no
idea that that's where the problem originates, and they'll be
frustrated and we'll get bug reports.  (They may be frustrated
anyway, but it was their choice, or their corporate policy's
choice, to cut off their access to MD5.  Not our place to dodge
that decision.)

			regards, tom lane





view thread (16+ messages)  latest in thread

Message-ID: <4190764.1641362933@sss.pgh.pa.us>
Permalink:  ../4190764.1641362933@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4190764.1641362933@sss.pgh.pa.us

 · 

reply

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: tgl@sss.pgh.pa.us, michael@paquier.xyz, cmt@burggraben.net, Michael.Muehlbeyer@trivadis.com
  Subject: Re: md5 issues Postgres14 on OL7
  In-Reply-To: <4190764.1641362933@sss.pgh.pa.us>
  References: <89B7F072-5BBE-4C92-903E-D83E865D9367@trivadis.com> <YcCRp9QvQvCZ7ODI@elch.exwg.net> <YdQ1GLqQ/Vq6LwW9@paquier.xyz> <4038656.1641318875@sss.pgh.pa.us> <YdUx+6Sm5T0II8Un@paquier.xyz> <4190764.1641362933@sss.pgh.pa.us>

* 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