lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <547C4B59.1000807@redhat.com>
Date:	Mon, 01 Dec 2014 12:04:57 +0100
From:	Daniel Borkmann <dborkman@...hat.com>
To:	Dan Carpenter <dan.carpenter@...cle.com>
CC:	tytso@....edu, zatimend@...mail.co.uk,
	linux-kernel@...r.kernel.org,
	Hannes Frederic Sowa <hannes@...essinduktion.org>,
	Alexey Dobriyan <adobriyan@...il.com>,
	Kees Cook <keescook@...omium.org>,
	Julia Lawall <julia.lawall@...6.fr>
Subject: Re: [PATCH] random: add and use memzero_explicit() for clearing data

On 12/01/2014 11:27 AM, Dan Carpenter wrote:
> 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.

Well, BSD has helpers such as bzero_explicit() for such cases to work
around this, which memzero_explicit() similarly does; see also [1].

   [1] https://gcc.gnu.org/ml/gcc-help/2014-10/msg00059.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ