pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Use explicit_bzero
Date: Thu, 05 Sep 2019 06:37:53 +0000
Message-ID: <E1i5lOz-0007x3-Bw@gemulon.postgresql.org> (raw)

Use explicit_bzero

Use the explicit_bzero() function in places where it is important that
security information such as passwords is cleared from memory.  There
might be other places where it could be useful; this is just an
initial collection.

For platforms that don't have explicit_bzero(), provide various
fallback implementations.  (explicit_bzero() itself isn't standard,
but as Linux/glibc, FreeBSD, and OpenBSD have it, it's the most common
spelling, so it makes sense to make that the invocation point.)

Discussion: https://www.postgresql.org/message-id/flat/42d26bde-5d5b-c90d-87ae-6cab875f73be%402ndquadrant.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/74a308cf5221f491776fcdb4dc36eb61678dbc6f

Modified Files
--------------
configure                            | 15 +++++++++-
configure.in                         |  2 ++
src/backend/libpq/be-secure-common.c |  3 ++
src/include/pg_config.h.in           |  6 ++++
src/include/pg_config.h.win32        |  6 ++++
src/include/port.h                   |  4 +++
src/interfaces/libpq/fe-connect.c    |  8 ++++++
src/port/explicit_bzero.c            | 55 ++++++++++++++++++++++++++++++++++++
src/tools/msvc/Mkvcbuild.pm          |  2 +-
9 files changed, 99 insertions(+), 2 deletions(-)



Message-ID: <E1i5lOz-0007x3-Bw@gemulon.postgresql.org>
Permalink:  ../E1i5lOz-0007x3-Bw@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1i5lOz-0007x3-Bw@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 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-committers@postgresql.org
  Cc: peter@eisentraut.org
  Subject: Re: pgsql: Use explicit_bzero
  In-Reply-To: <E1i5lOz-0007x3-Bw@gemulon.postgresql.org>
  References: <E1i5lOz-0007x3-Bw@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