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]
Message-ID: <CACXcFm=02=y=+0m3h_q4X1Jtf--7Ou=tmvVMKjEC46tFGj=V4A@mail.gmail.com>
Date:   Tue, 16 Nov 2021 19:36:27 +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 6/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/sha3_generic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crypto/sha3_generic.c b/crypto/sha3_generic.c
index 3e4069935b53..cfc10dd62e02 100644
--- a/crypto/sha3_generic.c
+++ b/crypto/sha3_generic.c
@@ -232,7 +232,7 @@ int crypto_sha3_final(struct shash_desc *desc, u8 *out)
     if (digest_size & 4)
         put_unaligned_le32(sctx->st[i], (__le32 *)digest);

-    memset(sctx, 0, sizeof(*sctx));
+    memzero_explicit(sctx, sizeof(*sctx));
     return 0;
 }
 EXPORT_SYMBOL(crypto_sha3_final);
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ