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-next>] [day] [month] [year] [list]
Date:   Fri, 30 Jul 2021 19:11:55 +0530
From:   Shreyansh Chouhan <chouhan.shreyansh630@...il.com>
To:     herbert@...dor.apana.org.au, davem@...emloft.net,
        tglx@...utronix.de, mingo@...hat.com, bp@...en8.de, x86@...nel.org,
        hpa@...or.com
Cc:     Shreyansh Chouhan <chouhan.shreyansh630@...il.com>,
        linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
        syzbot+20191dc583eff8602d2d@...kaller.appspotmail.com
Subject: [PATCH] crypto: add missing kernel_fpu_end() call

xts_crypt() code doesn't call kernel_fpu_end() after calling
kernel_fpu_begin() if walk.nbytes is 0. Add a call to kernel_fpu_end()
for this case.

Reported-by: syzbot+20191dc583eff8602d2d@...kaller.appspotmail.com
Signed-off-by: Shreyansh Chouhan <chouhan.shreyansh630@...il.com>
---
 arch/x86/crypto/aesni-intel_glue.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/x86/crypto/aesni-intel_glue.c b/arch/x86/crypto/aesni-intel_glue.c
index 2144e54a6c89..bd55a0cd7bde 100644
--- a/arch/x86/crypto/aesni-intel_glue.c
+++ b/arch/x86/crypto/aesni-intel_glue.c
@@ -894,6 +894,9 @@ static int xts_crypt(struct skcipher_request *req, bool encrypt)
 			kernel_fpu_begin();
 	}
 
+	if (walk.nbytes == 0)
+		kernel_fpu_end();
+
 	if (unlikely(tail > 0 && !err)) {
 		struct scatterlist sg_src[2], sg_dst[2];
 		struct scatterlist *src, *dst;
-- 
2.31.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ