lkml.org 
[lkml]   [2014]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] random: add and use memzero_explicit() for clearing data
On Mon, Aug 25, 2014 at 10:01:39PM +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
>

What???

That's not ok. We totally rely on memset to work. Every single memset
that I have added was absolutely necessary. This should be fixed
so that memset works instead of adding a work around for specific
drivers.

regards,
dan carpnter



\
 
 \ /
  Last update: 2014-12-01 12:01    [W:0.162 / U:0.844 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site