bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Bruno Haible <bruno@clisp.org>
To: Simon Josefsson <simon@josefsson.org>
Cc: Paul Eggert <eggert@cs.ucla.edu>, bug-gnulib@gnu.org
Subject: Re: [PROPOSED 0/4] memset_explicit patches
Date: Mon, 28 Nov 2022 17:04:11 +0100	[thread overview]
Message-ID: <12846274.EVyyLHbfrO@nimes> (raw)
In-Reply-To: <87edtn2xn8.fsf@latte>

Simon Josefsson wrote:
> A general observation is that I'm mixed about offering replacement of
> security-relevant APIs which do not offer the same guarantees as a
> secure implementation.  In these situations, it may actually be
> preferrably to crash or to refuse to build the application, at least by
> default.

I disagree. IMO, security is always done on a best-effort basis. There is
no 100% security.

In the case of memset_explicit, the secret may be present in memory
  - with a working memset_explicit: for 5 microseconds,
  - with a dysfunctional memset_explicit: for 5 seconds.
So, a working memset_explicit provides a 99.9999% protection, at most.
Even with a working memset_explicit, the attacker can halt the CPU at a
particular instruction before the erase (e.g. set a breakpoint at
memset_explicit :-) ), make a dump of the RAM of the process, and analyze it.

Therefore I don't think that an FTBFS or an abort() are justified if the
security guarantees cannot be met.

Bruno





      reply	other threads:[~2022-11-28 16:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-28  4:55 [PROPOSED 0/4] memset_explicit patches Paul Eggert
2022-11-28  4:55 ` [PROPOSED 1/4] memset_explicit: new module Paul Eggert
2022-11-28 16:17   ` Bruno Haible
2022-11-28  4:55 ` [PROPOSED 2/4] read-file: use memset_explicit Paul Eggert
2022-11-28  4:55 ` [PROPOSED 3/4] explicit_bzero: memset_explicit is standard Paul Eggert
2022-11-28  4:55 ` [PROPOSED 4/4] explicit_bzero: implement via memset_explicit Paul Eggert
2022-11-28 16:17   ` Bruno Haible
2022-11-29  6:06     ` Paul Eggert
2022-11-29  8:09       ` Bruno Haible
2022-11-28 10:15 ` [PROPOSED 0/4] memset_explicit patches Simon Josefsson via Gnulib discussion list
2022-11-28 16:04   ` Bruno Haible [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=12846274.EVyyLHbfrO@nimes \
    --to=bruno@clisp.org \
    --cc=bug-gnulib@gnu.org \
    --cc=eggert@cs.ucla.edu \
    --cc=simon@josefsson.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).