pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Follow-up fixes for SHA-2 patch (commit 749a9e20c).
Date: Mon, 07 Apr 2025 18:14:33 +0000
Message-ID: <E1u1qzR-003A9q-2d@gemulon.postgresql.org> (raw)

Follow-up fixes for SHA-2 patch (commit 749a9e20c).

This changes the check for valid characters in the salt string to
only allow plain ASCII letters and digits.  The previous coding was
locale-dependent which doesn't really seem like a great idea here;
moreover it could not work correctly in multibyte encodings.

This fixes a careless pointer-use-after-pfree, too.

Reported-by: Tom Lane <tgl@sss.pgh.pa.us>
Reported-by: Andres Freund <andres@anarazel.de>
Author: Bernd Helmle <mailings@oopsware.de>
Discussion: https://postgr.es/m/6fab35422df6b6b9727fdcc243c5fa1c667dd3b5.camel@oopsware.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/969ab9d4f5d141ac25db092a0e5cd004d3d60a60

Modified Files
--------------
contrib/pgcrypto/crypt-sha.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)



Message-ID: <E1u1qzR-003A9q-2d@gemulon.postgresql.org>
Permalink:  ../E1u1qzR-003A9q-2d@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1u1qzR-003A9q-2d@gemulon.postgresql.org

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Follow-up fixes for SHA-2 patch (commit 749a9e20c).
  In-Reply-To: <E1u1qzR-003A9q-2d@gemulon.postgresql.org>

* 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