agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Noah Misch <noah@leadboat.com>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Apply timingsafe_bcmp() in authentication paths
Date: Mon, 11 May 2026 12:19:38 +0000
Message-ID: <E1wMPbm-0002XK-1F@gemulon.postgresql.org> (raw)
Apply timingsafe_bcmp() in authentication paths
This commit applies timingsafe_bcmp() to authentication paths that
handle attributes or data previously compared with memcpy() or strcmp(),
which are sensitive to timing attacks.
The following data is concerned by this change, some being in the
backend and some in the frontend:
- For a SCRAM or MD5 password, the computed key or the MD5 hash compared
with a password during a plain authentication.
- For a SCRAM exchange, the stored key, the client's final nonce and the
server nonce.
- RADIUS (up to v18), the encrypted password.
- For MD5 authentication, the MD5(MD5()) hash.
Reported-by: Joe Conway <mail@joeconway.com>
Security: CVE-2026-6478
Author: Michael Paquier <michael@paquier.xyz>
Reviewed-by: John Naylor <johncnaylorls@gmail.com>
Backpatch-through: 14
Branch
------
REL_17_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/c4e7435b30984dacd0396ce0128bd54c8026fef5
Author: Michael Paquier <michael@paquier.xyz>
Modified Files
--------------
src/backend/libpq/auth-scram.c | 8 ++++----
src/backend/libpq/auth.c | 2 +-
src/backend/libpq/crypt.c | 6 ++++--
src/interfaces/libpq/fe-auth-scram.c | 6 +++---
4 files changed, 12 insertions(+), 10 deletions(-)
view thread (6+ messages) latest in thread
Message-ID: <E1wMPbm-0002XK-1F@gemulon.postgresql.org>
Permalink: ../E1wMPbm-0002XK-1F@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1wMPbm-0002XK-1F@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: noah@leadboat.com, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Apply timingsafe_bcmp() in authentication paths
In-Reply-To: <E1wMPbm-0002XK-1F@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox