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: <CACXcFmmyTXg77Dq1cR+MGCP=DRvcEzM=pCPcKL5u6-O+xofR1Q@mail.gmail.com>
Date:   Tue, 16 Nov 2021 19:32:46 +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 4/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/echainiv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crypto/echainiv.c b/crypto/echainiv.c
index 69686668625e..6a7321da2fc1 100644
--- a/crypto/echainiv.c
+++ b/crypto/echainiv.c
@@ -64,7 +64,7 @@ static int echainiv_encrypt(struct aead_request *req)

     memcpy(&nseqno, info + ivsize - 8, 8);
     seqno = be64_to_cpu(nseqno);
-    memset(info, 0, ivsize);
+    memzero_explicit(info, ivsize);

     scatterwalk_map_and_copy(info, req->dst, req->assoclen, ivsize, 1);

--

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ