From bb032f056ecfc6b523d840cb7de4aac4625102f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Sun, 13 Nov 2022 20:02:28 +0100 Subject: [PATCH] New upstream release --- ...-warning-about-truncating-conversion.patch | 29 --------- ...-2-Maj-optimization-proposed-by-Wei-.patch | 63 ------------------- ...allback.c-Fix-OVERRUN-found-by-Covsc.patch | 56 ----------------- ...ing-about-signed-unsigned-conversion.patch | 29 --------- libxcrypt-4.4.30.tar.xz.asc | 16 ----- libxcrypt-4.4.30.tar.xz.sha256sum | 2 - libxcrypt-4.4.31.tar.xz.asc | 16 +++++ libxcrypt-4.4.31.tar.xz.sha256sum | 2 + libxcrypt.spec | 11 ++-- sources | 2 +- 10 files changed, 24 insertions(+), 202 deletions(-) delete mode 100644 0002-Fix-warning-about-truncating-conversion.patch delete mode 100644 0003-alg-sha256.c-SHA-2-Maj-optimization-proposed-by-Wei-.patch delete mode 100644 0004-test-getrandom-fallback.c-Fix-OVERRUN-found-by-Covsc.patch delete mode 100644 0005-Fix-warning-about-signed-unsigned-conversion.patch delete mode 100644 libxcrypt-4.4.30.tar.xz.asc delete mode 100644 libxcrypt-4.4.30.tar.xz.sha256sum create mode 100644 libxcrypt-4.4.31.tar.xz.asc create mode 100644 libxcrypt-4.4.31.tar.xz.sha256sum diff --git a/0002-Fix-warning-about-truncating-conversion.patch b/0002-Fix-warning-about-truncating-conversion.patch deleted file mode 100644 index 10c2e03..0000000 --- a/0002-Fix-warning-about-truncating-conversion.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 239664bf18fc2bc093d8dbaa1fb0a0307651897f Mon Sep 17 00:00:00 2001 -From: Moinak Bhattacharyya -Date: Mon, 7 Nov 2022 03:40:23 -0600 -Subject: [PATCH 2/4] Fix warning about truncating conversion -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Björn Esser ---- - lib/alg-yescrypt-opt.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/alg-yescrypt-opt.c b/lib/alg-yescrypt-opt.c -index 60a6ccd..dacc73b 100644 ---- a/lib/alg-yescrypt-opt.c -+++ b/lib/alg-yescrypt-opt.c -@@ -514,7 +514,7 @@ static volatile uint64_t Smask2var = Smask2; - #define PWXFORM_SIMD(X) { \ - uint64_t x; \ - FORCE_REGALLOC_1 \ -- uint32_t lo = x = EXTRACT64(X) & Smask2reg; \ -+ uint32_t lo = (uint32_t)(x = EXTRACT64(X) & Smask2reg); \ - FORCE_REGALLOC_2 \ - uint32_t hi = x >> 32; \ - X = _mm_mul_epu32(HI32(X), X); \ --- -2.38.1 - diff --git a/0003-alg-sha256.c-SHA-2-Maj-optimization-proposed-by-Wei-.patch b/0003-alg-sha256.c-SHA-2-Maj-optimization-proposed-by-Wei-.patch deleted file mode 100644 index 7b5a0ba..0000000 --- a/0003-alg-sha256.c-SHA-2-Maj-optimization-proposed-by-Wei-.patch +++ /dev/null @@ -1,63 +0,0 @@ -From bb1721800932268a537c804a4b7655af8c62d5e8 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= -Date: Mon, 7 Nov 2022 11:32:38 +0100 -Subject: [PATCH 3/4] alg-sha256.c: SHA-2 Maj() optimization proposed by Wei - Dai. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This patch has been cherry-picked from: -https://github.com/openwall/yescrypt/commit/9edf51061b45 - -Signed-off-by: Björn Esser ---- - lib/alg-sha256.c | 12 +++++++++--- - 1 file changed, 9 insertions(+), 3 deletions(-) - -diff --git a/lib/alg-sha256.c b/lib/alg-sha256.c -index f448e4f..f83a4e1 100644 ---- a/lib/alg-sha256.c -+++ b/lib/alg-sha256.c -@@ -1,6 +1,6 @@ - /*- - * Copyright 2005-2016 Colin Percival -- * Copyright 2016-2018 Alexander Peslyak -+ * Copyright 2016-2018,2021 Alexander Peslyak - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without -@@ -65,7 +65,11 @@ static const uint32_t Krnd[64] = { - - /* Elementary functions used by SHA256 */ - #define Ch(x, y, z) ((x & (y ^ z)) ^ z) --#define Maj(x, y, z) ((x & (y | z)) | (y & z)) -+#if 1 /* Explicit caching/reuse of common subexpression between rounds */ -+#define Maj(x, y, z) (y ^ ((x_xor_y = x ^ y) & y_xor_z)) -+#else /* Let the compiler cache/reuse or not */ -+#define Maj(x, y, z) (y ^ ((x ^ y) & (y ^ z))) -+#endif - #define SHR(x, n) (x >> n) - #define ROTR(x, n) ((x >> n) | (x << (32 - n))) - #define S0(x) (ROTR(x, 2) ^ ROTR(x, 13) ^ ROTR(x, 22)) -@@ -77,7 +81,8 @@ static const uint32_t Krnd[64] = { - #define RND(a, b, c, d, e, f, g, h, k) \ - h += S1(e) + Ch(e, f, g) + k; \ - d += h; \ -- h += S0(a) + Maj(a, b, c); -+ h += S0(a) + Maj(a, b, c); \ -+ y_xor_z = x_xor_y; - - /* Adjusted round function for rotating state */ - #define RNDr(S, W, i, ii) \ -@@ -110,6 +115,7 @@ SHA256_Transform(uint32_t state[static restrict 8], - - /* 3. Mix. */ - for (i = 0; i <= 48; i += 16) { -+ uint32_t x_xor_y, y_xor_z = S[(65 - i) % 8] ^ S[(66 - i) % 8]; - RNDr(S, W, 0, i); - RNDr(S, W, 1, i); - RNDr(S, W, 2, i); --- -2.38.1 - diff --git a/0004-test-getrandom-fallback.c-Fix-OVERRUN-found-by-Covsc.patch b/0004-test-getrandom-fallback.c-Fix-OVERRUN-found-by-Covsc.patch deleted file mode 100644 index 25a354b..0000000 --- a/0004-test-getrandom-fallback.c-Fix-OVERRUN-found-by-Covsc.patch +++ /dev/null @@ -1,56 +0,0 @@ -From a2dcf74fce24aeba2a7e191a4b294b8f9622a3a8 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= -Date: Tue, 8 Nov 2022 07:41:00 +0100 -Subject: [PATCH 4/4] test/getrandom-fallback.c: Fix 'OVERRUN' found by - Covscan. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -CWE-119: Out-of-bounds access to a buffer (OVERRUN) - -overrun-buffer-arg: Calling memset with buf and buflen is suspicious -because of the very large index, 9223372036854775807. The index may -be due to a negative parameter being interpreted as unsigned. - -Limiting buflen to INT16_MAX is big enough for our purposes. - -Signed-off-by: Björn Esser ---- - test/getrandom-fallbacks.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/test/getrandom-fallbacks.c b/test/getrandom-fallbacks.c -index bd97667..b124c18 100644 ---- a/test/getrandom-fallbacks.c -+++ b/test/getrandom-fallbacks.c -@@ -77,7 +77,7 @@ __wrap_getrandom (void *buf, size_t buflen, unsigned int ARG_UNUSED(flags)) - } - else - { -- buflen = MIN (buflen, SSIZE_MAX); -+ buflen = MIN (buflen, INT16_MAX); - memset (buf, MOCK_getrandom, buflen); - return (ssize_t)buflen; - } -@@ -130,7 +130,7 @@ __wrap_syscall(long number, ...) - va_start (ap, number); - void *buf = va_arg (ap, void *); - size_t buflen = va_arg (ap, size_t); -- buflen = MIN (buflen, SSIZE_MAX); -+ buflen = MIN (buflen, INT16_MAX); - va_end (ap); - memset (buf, MOCK_sys_getrandom, buflen); - return (ssize_t)buflen; -@@ -205,7 +205,7 @@ __wrap_read (int fd, void *buf, size_t count) - } - else - { -- count = MIN (count, SSIZE_MAX); -+ count = MIN (count, INT16_MAX); - memset (buf, MOCK_urandom, count); - return (ssize_t)count; - } --- -2.38.1 - diff --git a/0005-Fix-warning-about-signed-unsigned-conversion.patch b/0005-Fix-warning-about-signed-unsigned-conversion.patch deleted file mode 100644 index 755051e..0000000 --- a/0005-Fix-warning-about-signed-unsigned-conversion.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 17cf4ce8af5a2a1af4c0f52260019cbae01835b8 Mon Sep 17 00:00:00 2001 -From: Moinak Bhattacharyya -Date: Tue, 8 Nov 2022 04:37:13 -0600 -Subject: [PATCH 5/5] Fix warning about signed->unsigned conversion -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Björn Esser ---- - lib/alg-yescrypt-opt.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/alg-yescrypt-opt.c b/lib/alg-yescrypt-opt.c -index dacc73b..a33c6e4 100644 ---- a/lib/alg-yescrypt-opt.c -+++ b/lib/alg-yescrypt-opt.c -@@ -514,7 +514,7 @@ static volatile uint64_t Smask2var = Smask2; - #define PWXFORM_SIMD(X) { \ - uint64_t x; \ - FORCE_REGALLOC_1 \ -- uint32_t lo = (uint32_t)(x = EXTRACT64(X) & Smask2reg); \ -+ uint32_t lo = (uint32_t)(x = ((uint64_t)EXTRACT64(X)) & Smask2reg); \ - FORCE_REGALLOC_2 \ - uint32_t hi = x >> 32; \ - X = _mm_mul_epu32(HI32(X), X); \ --- -2.38.1 - diff --git a/libxcrypt-4.4.30.tar.xz.asc b/libxcrypt-4.4.30.tar.xz.asc deleted file mode 100644 index c3b4156..0000000 --- a/libxcrypt-4.4.30.tar.xz.asc +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIzBAABCAAdFiEEZ4zj/uQwMRWW24wW9S6YAHWUwh0FAmNhQzIACgkQ9S6YAHWU -wh2Hdg/+Je9PZtLWQi6A+SYHfCxMvgMI0Bd9rV2jbnG6KaLolYZ01o79Ylc6nja0 -ynVOVafDXzOT4JnGRet65pClBt2MJIVsfm2sIUq/Qq8FlbcEqb3+77xbw5NXmrBl -d2IQLiL4XmHv1V5mb+aMQAKcrkSx9HAq/lwiS8ISFSIqtoHYbxOQdDOYAt/8YqeJ -ntVDrEVPHJgi5MpjkqG0ikzWSa5JQCL58xbAJ6LQ2m+NLd2uvZJpXqHx7RXAaKo/ -P5uwiCuz2CyX9eMU+3JfzFNp1ZVddzrz8/UeUDj1y5YsRnzTR0EWsISKn3JbDf8B -NUb3EzWrbEZWxFn+VQz+TFJNFsfEanSOt6oLU471vMiYtdlddWoEEhcrbSnkaDVE -TjqPGLoVsCvZxU7LmQGSkhilx89wwSQDNasj33api6+0c7YKsu4b2pvptoxvAP/p -RwXDstDPzKa7TDUuz+lKnWthXr/BXTL28KdT/DOPJdWZVLZpKYsVms+cFj0BiIn0 -trvf3s6G1Z7noM9sQW+wZgLKQO+fG726bVFVrCNSdiKIlJjEmFfG53EUPJ/vY9wo -28cavU/HSY5sppmuSVGISdvZ+34xN1jwr0Yxu65NmR6U2EuXU/m6sG5QJRSVnreA -vKe3QpziXGYCOgOzidxL+/etKTm2s5QHqkWaxmUL0eYDcu7V878= -=m4+o ------END PGP SIGNATURE----- diff --git a/libxcrypt-4.4.30.tar.xz.sha256sum b/libxcrypt-4.4.30.tar.xz.sha256sum deleted file mode 100644 index 40c3c62..0000000 --- a/libxcrypt-4.4.30.tar.xz.sha256sum +++ /dev/null @@ -1,2 +0,0 @@ -b3667f0ba85daad6af246ba4090fbe53163ad93c8b6a2a1257d22a78bb7ceeba libxcrypt-4.4.30.tar.xz -77f91fbfe867ab88be9ce4be23fc2ec121f5305fc0262cb72eb3a2fd57026f72 libxcrypt-4.4.30.tar.xz.asc diff --git a/libxcrypt-4.4.31.tar.xz.asc b/libxcrypt-4.4.31.tar.xz.asc new file mode 100644 index 0000000..7f3a290 --- /dev/null +++ b/libxcrypt-4.4.31.tar.xz.asc @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCAAdFiEEZ4zj/uQwMRWW24wW9S6YAHWUwh0FAmNxPicACgkQ9S6YAHWU +wh0tnA/9FCJwZGy00gdyJgIAJE/kSAhRpIIFX1/Sjjjt2jgeUCYLViOnbfrBOJ19 +XPECbaq0tFmnBt9KxOF+HDQy7ck/nlbBS0CCnhcKk1oPidmdjQCkKNT/5oNMTDGC +P4mqBfurQtG+iGB0K6HolMu/eerRgoFqhcmvEXNJ/fwgST/VudmZDFfLs+463aze +4c8BEcY7dtf8i2JapddQXcugCbr/tH5jy7OxJdPCT+gX6zxX9geStAMQXlgXdbXx +ZOrQajKkCe95DMcfFi2guZ+h04A62C/Wfy/BrDCG/96lzEXyhfauxvoFTXkOzRlq +7DXwVlV44WicQR7OfpsVthDBbzsHgYBlxqm1FeyLC1LiT8yTWImhpZpfCPQUaZdF +V7jo7tOt41VczC1D2H9shp8k9kJrDFTDpWJG5kHwdQH2b3NJcOnqPHdDlQ8w6+tV +haa+g55ZQVG8d/7nUmf4Ubn2UGMLtzhkP1HMfvR9dDqhSuDQqS0jpc7bwz2jpcW0 +eaD8F6x8gI94OmFJXZ4cZVjtlP/KYuKqdZEH5mzh4UVVpEDkOOQk4C7RJN3JBthe +gLJ6f2OfmrJnpwNpiIyyTcordTn9S/UvVNjfDbV2NZv6OWC8qtnoqohQ1Ynrh0WO +g/WT5W0bPjQb4llQYFGq/oG7cMk0E3SNd6wKGiKsi+l9VVIgYSQ= +=ep7V +-----END PGP SIGNATURE----- diff --git a/libxcrypt-4.4.31.tar.xz.sha256sum b/libxcrypt-4.4.31.tar.xz.sha256sum new file mode 100644 index 0000000..41b87ad --- /dev/null +++ b/libxcrypt-4.4.31.tar.xz.sha256sum @@ -0,0 +1,2 @@ +c0181b6a8eea83850cfe7783119bf71fddbde69adddda1d15747ba433d5c57ba libxcrypt-4.4.31.tar.xz +296af0a04613bf80ab440ddc65129ca29c37ceaa6476da565c99297191f7e5b8 libxcrypt-4.4.31.tar.xz.asc diff --git a/libxcrypt.spec b/libxcrypt.spec index 464c5e5..7cac5ee 100644 --- a/libxcrypt.spec +++ b/libxcrypt.spec @@ -157,8 +157,8 @@ fi \ Name: libxcrypt -Version: 4.4.30 -Release: 3%{?dist} +Version: 4.4.31 +Release: 1%{?dist} Summary: Extended crypt library for descrypt, md5crypt, bcrypt, and others # For explicit license breakdown, see the @@ -171,10 +171,6 @@ Source2: %{url}/releases/download/v%{version}/%{name}-gpgkey.gpg Source3: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.xz.sha256sum # Patch 0000 - 2999: Backported patches from upstream. -Patch0000: 0002-Fix-warning-about-truncating-conversion.patch -Patch0001: 0003-alg-sha256.c-SHA-2-Maj-optimization-proposed-by-Wei-.patch -Patch0002: 0004-test-getrandom-fallback.c-Fix-OVERRUN-found-by-Covsc.patch -Patch0003: 0005-Fix-warning-about-signed-unsigned-conversion.patch # Patch 3000 - 5999: Backported patches from pull requests. @@ -558,6 +554,9 @@ done %changelog +* Sun Nov 13 2022 Björn Esser - 4.4.31-1 +- New upstream release + * Tue Nov 08 2022 Björn Esser - 4.4.30-3 - Backport another upstream patch for a conversion fix diff --git a/sources b/sources index 84d586a..c049384 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libxcrypt-4.4.30.tar.xz) = 259e3d1a7982800f80a79095ba75f95314fc71050e26ffd150c192936086e1f23e363feabc971dbe44251c2e1c8dfdb4399e30f1c6e5d9cf5cca9bb1ad3a719b +SHA512 (libxcrypt-4.4.31.tar.xz) = 4c87cc5299a871d30d492ddfe758295aa306e62cadde188fce7ce00db32da623cfc65394075b9a45e06291237885005591b7987411315740a0e7d29ff105d8ac SHA512 (libxcrypt-gpgkey.gpg) = 723ce5d76676e4366959e03850f8814d5b30f8b20a39629f0ccff61bb2b2bef64223fd78e719ad23d7dd272ca6c0177089749f9b508099d56750a8bb466d006c