From 5376dfbcfb7004bec8552aa0c505f49cd3f87357 Mon Sep 17 00:00:00 2001 From: Jacob Wang Date: Fri, 16 May 2025 10:53:48 +0800 Subject: [PATCH 1/3] [CVE]update to redis-6.2.18-1 to #IC871U update to redis-6.2.18-1 for CVE-2025-21605 Project: TC2024080204 Signed-off-by: Jacob Wang --- 1000-anolis-redis-add-loongarch-support.patch | 45 ------------------- 1001-anolis-redis-add-sw.patch | 41 ----------------- download | 2 +- redis.spec | 19 ++------ 4 files changed, 5 insertions(+), 102 deletions(-) delete mode 100644 1000-anolis-redis-add-loongarch-support.patch delete mode 100644 1001-anolis-redis-add-sw.patch diff --git a/1000-anolis-redis-add-loongarch-support.patch b/1000-anolis-redis-add-loongarch-support.patch deleted file mode 100644 index 6ff25b5..0000000 --- a/1000-anolis-redis-add-loongarch-support.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff --git a/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h b/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h -index 1b750b1..780627d 100644 ---- a/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h -+++ b/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h -@@ -107,6 +107,9 @@ typedef int malloc_cpuid_t; - # ifdef __tile__ - # define LG_QUANTUM 4 - # endif -+# ifdef __loongarch__ -+# define LG_QUANTUM 4 -+# endif - # ifdef __le32__ - # define LG_QUANTUM 4 - # endif ---- redis-5.0.3.orig/deps/jemalloc/build-aux/config.guess 2021-11-16 19:51:58.136000000 +0800 -+++ redis-5.0.3.new/deps/jemalloc/build-aux/config.guess 2021-11-16 20:23:58.472000000 +0800 -@@ -915,6 +915,9 @@ - UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; -+ loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) -+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" -+ exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; -diff -Nur redis-5.0.3.orig/deps/jemalloc/build-aux/config.sub redis-5.0.3.new/deps/jemalloc/build-aux/config.sub ---- redis-5.0.3.orig/deps/jemalloc/build-aux/config.sub 2021-11-16 19:51:58.136000000 +0800 -+++ redis-5.0.3.new/deps/jemalloc/build-aux/config.sub 2021-11-16 20:26:14.956000000 +0800 -@@ -248,6 +248,7 @@ - 1750a | 580 \ - | a29k \ - | aarch64 | aarch64_be \ -+ | loongarch32 | loongarch64 | loongarchx32 \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ -@@ -372,6 +373,7 @@ - 580-* \ - | a29k-* \ - | aarch64-* | aarch64_be-* \ -+ | loongarch32-* | loongarch64-* | loongarchx32-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ diff --git a/1001-anolis-redis-add-sw.patch b/1001-anolis-redis-add-sw.patch deleted file mode 100644 index f0774df..0000000 --- a/1001-anolis-redis-add-sw.patch +++ /dev/null @@ -1,41 +0,0 @@ -From ad5bc2d0dcf5d42491eb1e944ad4c92bd5285f78 Mon Sep 17 00:00:00 2001 -From: wxiat -Date: Tue, 16 May 2023 17:00:11 +0800 -Subject: [PATCH] add sw - -Signed-off-by: wxiat ---- - .../include/jemalloc/internal/jemalloc_internal_types.h | 3 +++ - src/config.h | 2 +- - 2 files changed, 4 insertions(+), 1 deletion(-) - -diff --git a/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h b/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h -index 780627d..203b272 100644 ---- a/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h -+++ b/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h -@@ -64,6 +64,9 @@ typedef int malloc_cpuid_t; - # ifdef __alpha__ - # define LG_QUANTUM 4 - # endif -+# ifdef __sw_64__ -+# define LG_QUANTUM 4 -+# endif - # if (defined(__sparc64__) || defined(__sparcv9) || defined(__sparc_v9__)) - # define LG_QUANTUM 4 - # endif -diff --git a/src/config.h b/src/config.h -index efa9d11..90bb412 100644 ---- a/src/config.h -+++ b/src/config.h -@@ -147,7 +147,7 @@ void setproctitle(const char *fmt, ...); - #if defined(__i386__) || defined(__x86_64__) || defined(__amd64__) || \ - defined(vax) || defined(ns32000) || defined(sun386) || \ - defined(MIPSEL) || defined(_MIPSEL) || defined(BIT_ZERO_ON_RIGHT) || \ -- defined(__alpha__) || defined(__alpha) -+ defined(__alpha__) || defined(__alpha) || defined(__sw_64__) || defined(__sw_64) - #define BYTE_ORDER LITTLE_ENDIAN - #endif - --- -2.31.1 - diff --git a/download b/download index 7d8cfc8..dab75b7 100644 --- a/download +++ b/download @@ -1,2 +1,2 @@ -6eb286c8d89f4728627ae31982612fae redis-6.2.17.tar.gz +6a4016d081dad4758e7df84a5c7a07dd redis-6.2.18.tar.gz 8cbcd27323972181e1604968747fba41 redis-doc-8d4bf9b.tar.gz diff --git a/redis.spec b/redis.spec index 94064a1..e424956 100644 --- a/redis.spec +++ b/redis.spec @@ -1,4 +1,3 @@ -%define anolis_release .0.1 # # RHEL / Fedora spec file for redis # @@ -20,8 +19,8 @@ %global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d) Name: redis -Version: 6.2.17 -Release: 1%{anolis_release}%{?dist} +Version: 6.2.18 +Release: 1%{?dist} Summary: A persistent key-value database # redis, jemalloc, linenoise, lzf, hiredis are BSD # lua is MIT @@ -52,10 +51,6 @@ Patch0003: redis-config.patch # Security patches -Patch1000: 1000-anolis-redis-add-loongarch-support.patch -# add sw support -Patch1001: 1001-anolis-redis-add-sw.patch - BuildRequires: gcc %if %{with tests} BuildRequires: procps-ng @@ -139,9 +134,6 @@ mv ../%{name}-doc-%{doc_commit} doc %patch -P0001 -p1 %patch -P0003 -p1 -b .rev -%patch1000 -p1 -%patch1001 -p1 - mv deps/lua/COPYRIGHT COPYRIGHT-lua mv deps/jemalloc/COPYING COPYING-jemalloc mv deps/hiredis/COPYING COPYING-hiredis @@ -162,8 +154,6 @@ fi %global make_flags DEBUG="" V="echo" LDFLAGS="%{?__global_ldflags}" CFLAGS+="%{optflags} -fPIC" INSTALL="install -p" PREFIX=%{buildroot}%{_prefix} BUILD_WITH_SYSTEMD=yes BUILD_TLS=yes %build -%_update_config_sub -%_update_config_guess make %{?_smp_mflags} %{make_flags} all %install @@ -291,9 +281,8 @@ exit 0 %changelog -* Thu Jan 23 2025 Liwei Ge - 6.2.17-1.0.1 -- Support loongarch64 platform -- cherry-pick `add sw patch $cbad809d90a96439e196e8610d5b1868bcca5d3d`. (nijie@wxiat.com) +* Thu Apr 24 2025 Remi Collet - 6.2.18-1 +- rebase to 6.2.18 for CVE-2025-21605 * Mon Jan 13 2025 Remi Collet - 6.2.17-1 - rebase to 6.2.17 for CVE-2024-46981 -- Gitee From 232877bb5d1bfc75991c7994d9166e70f94d90fd Mon Sep 17 00:00:00 2001 From: Liwei Ge Date: Tue, 16 Nov 2021 17:06:02 +0800 Subject: [PATCH 2/3] build: support loongarch64 platform Signed-off-by: Liwei Ge --- 1000-anolis-redis-add-loongarch-support.patch | 45 +++++++++++++++++++ redis.spec | 10 ++++- 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 1000-anolis-redis-add-loongarch-support.patch diff --git a/1000-anolis-redis-add-loongarch-support.patch b/1000-anolis-redis-add-loongarch-support.patch new file mode 100644 index 0000000..6ff25b5 --- /dev/null +++ b/1000-anolis-redis-add-loongarch-support.patch @@ -0,0 +1,45 @@ +diff --git a/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h b/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h +index 1b750b1..780627d 100644 +--- a/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h ++++ b/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h +@@ -107,6 +107,9 @@ typedef int malloc_cpuid_t; + # ifdef __tile__ + # define LG_QUANTUM 4 + # endif ++# ifdef __loongarch__ ++# define LG_QUANTUM 4 ++# endif + # ifdef __le32__ + # define LG_QUANTUM 4 + # endif +--- redis-5.0.3.orig/deps/jemalloc/build-aux/config.guess 2021-11-16 19:51:58.136000000 +0800 ++++ redis-5.0.3.new/deps/jemalloc/build-aux/config.guess 2021-11-16 20:23:58.472000000 +0800 +@@ -915,6 +915,9 @@ + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; ++ loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) ++ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" ++ exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; +diff -Nur redis-5.0.3.orig/deps/jemalloc/build-aux/config.sub redis-5.0.3.new/deps/jemalloc/build-aux/config.sub +--- redis-5.0.3.orig/deps/jemalloc/build-aux/config.sub 2021-11-16 19:51:58.136000000 +0800 ++++ redis-5.0.3.new/deps/jemalloc/build-aux/config.sub 2021-11-16 20:26:14.956000000 +0800 +@@ -248,6 +248,7 @@ + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ ++ | loongarch32 | loongarch64 | loongarchx32 \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ +@@ -372,6 +373,7 @@ + 580-* \ + | a29k-* \ + | aarch64-* | aarch64_be-* \ ++ | loongarch32-* | loongarch64-* | loongarchx32-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ diff --git a/redis.spec b/redis.spec index e424956..384f4ba 100644 --- a/redis.spec +++ b/redis.spec @@ -1,3 +1,4 @@ +%define anolis_release .0.1 # # RHEL / Fedora spec file for redis # @@ -20,7 +21,7 @@ Name: redis Version: 6.2.18 -Release: 1%{?dist} +Release: 1%{anolis_release}%{?dist} Summary: A persistent key-value database # redis, jemalloc, linenoise, lzf, hiredis are BSD # lua is MIT @@ -51,6 +52,8 @@ Patch0003: redis-config.patch # Security patches +Patch1000: 1000-anolis-redis-add-loongarch-support.patch + BuildRequires: gcc %if %{with tests} BuildRequires: procps-ng @@ -134,6 +137,8 @@ mv ../%{name}-doc-%{doc_commit} doc %patch -P0001 -p1 %patch -P0003 -p1 -b .rev +%patch1000 -p1 + mv deps/lua/COPYRIGHT COPYRIGHT-lua mv deps/jemalloc/COPYING COPYING-jemalloc mv deps/hiredis/COPYING COPYING-hiredis @@ -281,6 +286,9 @@ exit 0 %changelog +* Fri May 16 2025 Liwei Ge - 6.2.18-1.0.1 +- Support loongarch64 platform + * Thu Apr 24 2025 Remi Collet - 6.2.18-1 - rebase to 6.2.18 for CVE-2025-21605 -- Gitee From e561ccd3789285f005b464199bfb8c621e242867 Mon Sep 17 00:00:00 2001 From: wxiat Date: Tue, 16 May 2023 17:06:02 +0800 Subject: [PATCH 3/3] cherry-pick `add sw patch $cbad809d90a96439e196e8610d5b1868bcca5d3d`. Signed-off-by: wxiat Signed-off-by: Weisson --- 1001-anolis-redis-add-sw.patch | 41 ++++++++++++++++++++++++++++++++++ redis.spec | 6 +++++ 2 files changed, 47 insertions(+) create mode 100644 1001-anolis-redis-add-sw.patch diff --git a/1001-anolis-redis-add-sw.patch b/1001-anolis-redis-add-sw.patch new file mode 100644 index 0000000..f0774df --- /dev/null +++ b/1001-anolis-redis-add-sw.patch @@ -0,0 +1,41 @@ +From ad5bc2d0dcf5d42491eb1e944ad4c92bd5285f78 Mon Sep 17 00:00:00 2001 +From: wxiat +Date: Tue, 16 May 2023 17:00:11 +0800 +Subject: [PATCH] add sw + +Signed-off-by: wxiat +--- + .../include/jemalloc/internal/jemalloc_internal_types.h | 3 +++ + src/config.h | 2 +- + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h b/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h +index 780627d..203b272 100644 +--- a/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h ++++ b/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h +@@ -64,6 +64,9 @@ typedef int malloc_cpuid_t; + # ifdef __alpha__ + # define LG_QUANTUM 4 + # endif ++# ifdef __sw_64__ ++# define LG_QUANTUM 4 ++# endif + # if (defined(__sparc64__) || defined(__sparcv9) || defined(__sparc_v9__)) + # define LG_QUANTUM 4 + # endif +diff --git a/src/config.h b/src/config.h +index efa9d11..90bb412 100644 +--- a/src/config.h ++++ b/src/config.h +@@ -147,7 +147,7 @@ void setproctitle(const char *fmt, ...); + #if defined(__i386__) || defined(__x86_64__) || defined(__amd64__) || \ + defined(vax) || defined(ns32000) || defined(sun386) || \ + defined(MIPSEL) || defined(_MIPSEL) || defined(BIT_ZERO_ON_RIGHT) || \ +- defined(__alpha__) || defined(__alpha) ++ defined(__alpha__) || defined(__alpha) || defined(__sw_64__) || defined(__sw_64) + #define BYTE_ORDER LITTLE_ENDIAN + #endif + +-- +2.31.1 + diff --git a/redis.spec b/redis.spec index 384f4ba..1e5fb84 100644 --- a/redis.spec +++ b/redis.spec @@ -53,6 +53,8 @@ Patch0003: redis-config.patch # Security patches Patch1000: 1000-anolis-redis-add-loongarch-support.patch +# add sw support +Patch1001: 1001-anolis-redis-add-sw.patch BuildRequires: gcc %if %{with tests} @@ -138,6 +140,7 @@ mv ../%{name}-doc-%{doc_commit} doc %patch -P0003 -p1 -b .rev %patch1000 -p1 +%patch1001 -p1 mv deps/lua/COPYRIGHT COPYRIGHT-lua mv deps/jemalloc/COPYING COPYING-jemalloc @@ -159,6 +162,8 @@ fi %global make_flags DEBUG="" V="echo" LDFLAGS="%{?__global_ldflags}" CFLAGS+="%{optflags} -fPIC" INSTALL="install -p" PREFIX=%{buildroot}%{_prefix} BUILD_WITH_SYSTEMD=yes BUILD_TLS=yes %build +%_update_config_sub +%_update_config_guess make %{?_smp_mflags} %{make_flags} all %install @@ -288,6 +293,7 @@ exit 0 %changelog * Fri May 16 2025 Liwei Ge - 6.2.18-1.0.1 - Support loongarch64 platform +- cherry-pick `add sw patch $cbad809d90a96439e196e8610d5b1868bcca5d3d`. (nijie@wxiat.com) * Thu Apr 24 2025 Remi Collet - 6.2.18-1 - rebase to 6.2.18 for CVE-2025-21605 -- Gitee