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>] [day] [month] [year] [list]
Date:   Tue, 16 Nov 2021 19:39:44 +0800
From:   Sandy Harris <sandyinchina@...il.com>
To:     LKML <linux-kernel@...r.kernel.org>,
        Linux Crypto Mailing List <linux-crypto@...r.kernel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: [PATCH 8/8] Replace memset() with memzero_explicit()

Replace memset(address,0,bytes) which may be optimised
away with memzero_explicit(address,bytes) which resists
such optimisation

---
 crypto/rmd160.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crypto/rmd160.c b/crypto/rmd160.c
index c5fe4034b153..a80f783d5a4f 100644
--- a/crypto/rmd160.c
+++ b/crypto/rmd160.c
@@ -329,7 +329,7 @@ static int rmd160_final(struct shash_desc *desc, u8 *out)
         dst[i] = cpu_to_le32p(&rctx->state[i]);

     /* Wipe context */
-    memset(rctx, 0, sizeof(*rctx));
+    memzero_explicit(rctx, sizeof(*rctx));

     return 0;
 }
--

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ