···11-From 4bfac4471f53c4f74c8d81020beb938f92d84ca5 Mon Sep 17 00:00:00 2001
22-From: Bernd Edlinger <bernd.edlinger@hotmail.de>
33-Date: Tue, 22 Aug 2023 16:07:30 +0200
44-Subject: [PATCH] Avoid clobbering non-volatile XMM registers
55-66-This affects some Poly1305 assembler functions
77-which are only used for certain CPU types.
88-99-Remove those functions for Windows targets,
1010-as a simple interim solution.
1111-1212-Fixes #21522
1313-1414-Reviewed-by: Tomas Mraz <tomas@openssl.org>
1515-Reviewed-by: Paul Dale <pauli@openssl.org>
1616-(Merged from https://github.com/openssl/openssl/pull/21808)
1717-1818-(cherry picked from commit 7b8e27bc2e02238986d89ef0ece067ec1b48e165)
1919----
2020- crypto/poly1305/asm/poly1305-x86_64.pl | 4 ++--
2121- 1 file changed, 2 insertions(+), 2 deletions(-)
2222-2323-diff --git a/crypto/poly1305/asm/poly1305-x86_64.pl b/crypto/poly1305/asm/poly1305-x86_64.pl
2424-index fa9bfb7a7b81..24bab9d0bcf9 100755
2525---- a/crypto/poly1305/asm/poly1305-x86_64.pl
2626-+++ b/crypto/poly1305/asm/poly1305-x86_64.pl
2727-@@ -195,7 +195,7 @@ sub poly1305_iteration {
2828- bt \$`5+32`,%r9 # AVX2?
2929- cmovc %rax,%r10
3030- ___
3131--$code.=<<___ if ($avx>3);
3232-+$code.=<<___ if ($avx>3 && !$win64);
3333- mov \$`(1<<31|1<<21|1<<16)`,%rax
3434- shr \$32,%r9
3535- and %rax,%r9
3636-@@ -2724,7 +2724,7 @@ sub poly1305_iteration {
3737- .cfi_endproc
3838- .size poly1305_blocks_avx512,.-poly1305_blocks_avx512
3939- ___
4040--if ($avx>3) {
4141-+if ($avx>3 && !$win64) {
4242- ########################################################################
4343- # VPMADD52 version using 2^44 radix.
4444- #
+2-5
pkgs/development/libraries/openssl/default.nix
···236236 # the permitted insecure version to ensure it gets cached for our users
237237 # and backport this to stable release (23.05).
238238 openssl_1_1 = common {
239239- version = "1.1.1v";
240240- sha256 = "sha256-1ml+KHHncjhGBALpNi1H0YOCsV758karpse9eA04prA=";
239239+ version = "1.1.1w";
240240+ sha256 = "sha256-zzCYlQy02FOtlcCEHx+cbT3BAtzPys1SHZOSUgi3asg=";
241241 patches = [
242242 ./1.1/nix-ssl-cert-file.patch
243243-244244- # https://www.openssl.org/news/secadv/20230908.txt
245245- ./1.1/CVE-2023-4807.patch
246243247244 (if stdenv.hostPlatform.isDarwin
248245 then ./use-etc-ssl-certs-darwin.patch
+1-1
pkgs/top-level/release.nix
···2626 # for no real reason.
2727 # Remove them for 23.11.
2828 "nodejs-16.20.2"
2929- "openssl-1.1.1v"
2929+ "openssl-1.1.1w"
3030 ];
3131 }; }
3232}: