linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Hannes Frederic Sowa <hannes@stressinduktion.org>
Cc: Daniel Borkmann <dborkman@redhat.com>,
	zatimend@hotmail.co.uk, linux-kernel@vger.kernel.org,
	Alexey Dobriyan <adobriyan@gmail.com>
Subject: Re: [PATCH] random: add and use memzero_explicit() for clearing data
Date: Tue, 26 Aug 2014 23:21:43 -0400	[thread overview]
Message-ID: <20140827032143.GQ11317@thunk.org> (raw)
In-Reply-To: <1409008290.6274.73.camel@localhost>

On Tue, Aug 26, 2014 at 01:11:30AM +0200, Hannes Frederic Sowa wrote:
> On Mo, 2014-08-25 at 22:01 +0200, Daniel Borkmann wrote:
> > zatimend has reported that in his environment (3.16/gcc4.8.3/corei7)
> > memset() calls which clear out sensitive data in extract_{buf,entropy,
> > entropy_user}() in random driver are being optimized away by gcc.
> > 
> > Add a helper memzero_explicit() (similarly as explicit_bzero() variants)
> > that can be used in such cases where a variable with sensitive data is
> > being cleared out in the end. Other use cases might also be in crypto
> > code. [ I have put this into lib/string.c though, as it's always built-in
> > and doesn't need any dependencies then. ]
> > 
> > Fixes kernel bugzilla: 82041
> > 
> > Reported-by: zatimend@hotmail.co.uk
> > Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
> > Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
> > Cc: Alexey Dobriyan <adobriyan@gmail.com>
> 
> Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>

Applied to the random tree, thanks.

					- Ted

  reply	other threads:[~2014-08-27  3:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-25 20:01 [PATCH] random: add and use memzero_explicit() for clearing data Daniel Borkmann
2014-08-25 20:35 ` Alexey Dobriyan
2014-08-25 20:38   ` Daniel Borkmann
2014-08-25 23:11 ` Hannes Frederic Sowa
2014-08-27  3:21   ` Theodore Ts'o [this message]
2014-12-01 10:27 ` Dan Carpenter
2014-12-01 11:04   ` Daniel Borkmann
2014-12-01 11:29     ` Dan Carpenter
2014-12-01 11:38       ` Dan Carpenter
2014-12-01 13:39         ` Daniel Borkmann
2014-12-01 11:48       ` Daniel Borkmann

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

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

  git send-email \
    --in-reply-to=20140827032143.GQ11317@thunk.org \
    --to=tytso@mit.edu \
    --cc=adobriyan@gmail.com \
    --cc=dborkman@redhat.com \
    --cc=hannes@stressinduktion.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zatimend@hotmail.co.uk \
    /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 NNTP newsgroup(s).