Skip to content

Commit 1578639

Browse files
[High] Upgrade reaper for CVE-2025-9288
1 parent f46c600 commit 1578639

File tree

3 files changed

+47
-38
lines changed

3 files changed

+47
-38
lines changed

SPECS/reaper/reaper.signatures.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"Signatures": {
33
"cassandra-reaper-3.1.1.tar.gz": "6efe52195ad4a3c3b7a6f928bafa60d3df011709d9bc918e717033bf86d724d8",
44
"reaper-bower-components-3.1.1-1.tar.gz": "51f5b03b3f56966f5fbfe28a13e0a74003cf33372ff4ba13fd82c6fe79092033",
5-
"reaper-local-lib-node-modules-3.1.1.tar.gz": "8daf9a8726a85ca31b024a5bab60a357fe927f670908955cdd9b106bf9c6bd60",
5+
"reaper-local-lib-node-modules-3.1.1.tar.gz": "043dec92e8d1d07bbcb920f0f10a148d63c600f2101935f3c39f4654d470135d",
66
"reaper-local-n-3.1.1-1.tar.gz": "e60ecf1c982c8cd44b35da02aec6de5b1f8f0df562f290f9bb905d03f9eefa68",
7-
"reaper-m2-cache-3.1.1.tar.gz": "14103df496c6bfd1bf2690b45e6082e3411872f7332f03a68cf5d8e28fc6b27f",
7+
"reaper-m2-cache-3.1.1.tar.gz": "f40a24a31488b35f0c5815d815a9ded70108f53e0140f3c4bddef181a7450f08",
88
"reaper-srcui-node-modules-3.1.1-1.tar.gz": "edd67243e97838657e09513f639a8e7c81fbb813353a19eba3949f79fb9e3e9e"
99
}
1010
}

SPECS/reaper/reaper.spec

Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Summary: Reaper for cassandra is a tool for running Apache Cassandra repairs against single or multi-site clusters.
77
Name: reaper
88
Version: 3.1.1
9-
Release: 19%{?dist}
9+
Release: 20%{?dist}
1010
License: ASL 2.0
1111
Vendor: Microsoft Corporation
1212
Distribution: Mariner
@@ -32,25 +32,14 @@ Source7: reaper-local-n-%{version}-%{local_n_release}.tar.gz
3232
# The src/ui/node_modules/ws/package.json file suggest we're on the
3333
# 6.x version of "ws". Patch for this version taken from here:
3434
# https://github.com/websockets/ws/commit/eeb76d313e2a00dd5247ca3597bba7877d064a63
35-
Patch0: CVE-2024-37890.patch
36-
Patch1: CVE-2023-42282.patch
37-
Patch2: CVE-2017-18214.patch
38-
Patch3: CVE-2024-42459.patch
39-
Patch4: CVE-2024-43796.patch
40-
Patch5: CVE-2024-45296.patch
41-
Patch6: CVE-2024-43799.patch
42-
Patch7: CVE-2024-43800.patch
43-
Patch8: CVE-2024-47764.patch
44-
Patch9: CVE-2024-48949.patch
45-
Patch10: CVE-2024-45590.patch
46-
Patch11: CVE-2024-21538.patch
47-
Patch12: CVE-2020-28458.patch
48-
Patch13: CVE-2024-52798.patch
49-
Patch14: CVE-2020-24025.patch
50-
Patch15: CVE-2024-28863.patch
51-
Patch16: CVE-2024-12905.patch
52-
Patch17: CVE-2024-6484.patch
53-
Patch18: CVE-2025-48387.patch
35+
Patch0: CVE-2023-42282.patch
36+
Patch1: CVE-2017-18214.patch
37+
Patch2: CVE-2020-28458.patch
38+
Patch3: CVE-2020-24025.patch
39+
Patch4: CVE-2024-28863.patch
40+
Patch5: CVE-2024-12905.patch
41+
Patch6: CVE-2024-6484.patch
42+
Patch7: CVE-2025-48387.patch
5443

5544
BuildRequires: git
5645
BuildRequires: javapackages-tools
@@ -108,15 +97,15 @@ ln -sf ../lib/node_modules/npm/bin/npx-cli.js bin/npx
10897
cp n/versions/node/14.18.0/bin/node bin
10998
popd
11099

111-
%autopatch -p1 -M 14
100+
%autopatch -p1 -M 3
112101

113102
pushd $tmp_local_dir/lib/node_modules/
114-
%autopatch -p1 15
103+
%autopatch -p1 4
115104
popd
116105
pushd $tmp_local_dir/n/versions/node/14.18.0/lib/node_modules/
117-
%autopatch -p1 15
106+
%autopatch -p1 4
118107
popd
119-
%autopatch -p1 -m 16
108+
%autopatch -p1 -m 5
120109

121110
# Removed for CVE-2024-6484.patch as they are unused and contain
122111
# vulnerabilities that are not easily patched out.
@@ -199,6 +188,10 @@ fi
199188
%{_unitdir}/cassandra-%{name}.service
200189

201190
%changelog
191+
* Wed Sep 03 2025 Durga Jagadeesh Palli <[email protected]> - 3.1.1-20
192+
- Upgrade the sha.js from v2.4.11 to v2.4.12 to address CVE-2025-9288
193+
- Fix the reaper_build_script.sh error to generate the new cache tar bal
194+
202195
* Thu Jun 05 2025 Jyoti Kanase <[email protected]> - 3.1.1-19
203196
- Patch CVE-2024-6484 and CVE-2025-48387
204197

SPECS/reaper/reaper_build_caches.sh

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -62,21 +62,37 @@ function checkInternet {
6262
function installNodeModules {
6363
echo "Installing node modules."
6464
sudo tdnf install -y nodejs
65-
npm config set cache "$homeCacheDir/.npm" --global
66-
# Default node/npm versions in Mariner fails to build dependency node module versions due to known
67-
# incompatibilities.
68-
# Backward compatible with [email protected]
69-
# When installing modules via npm to default prefix='/usr/local' in mariner, the permissions for 'others'
70-
# is incoorectly set that causes 'which' to still point to older path, as access/newfstatat fail with -ENOPERM
71-
# Setting a new global npm folder for fixing permission issues.
72-
# (works well with id=0, but reaper build will fail.)
73-
mkdir --mode 0777 $homeCacheDir/.npm-global
65+
66+
# Set up npm to use only user-writable directories
67+
export NPM_CONFIG_USERCONFIG="$homeCacheDir/.npmrc"
68+
mkdir -p "$homeCacheDir/.npm"
69+
mkdir -p "$homeCacheDir/.npm-global"
70+
npm config set cache "$homeCacheDir/.npm"
7471
npm config set prefix "$homeCacheDir/.npm-global"
75-
export PATH="$homeCacheDir/.npm-global/bin":$PATH
72+
export PATH="$homeCacheDir/.npm-global/bin:$PATH"
73+
export NPM_CONFIG_PREFIX="$homeCacheDir/.npm-global"
74+
export NPM_CONFIG_CACHE="$homeCacheDir/.npm"
75+
export XDG_CACHE_HOME="$homeCacheDir/.cache"
76+
77+
echo "npm config list:"
78+
npm config list
79+
echo "env | grep -i npm:"
80+
env | grep -i npm
81+
82+
# Install and use Node.js v14.18.0 with n
7683
npm install -g n
7784
export N_PREFIX="$homeCacheDir/.npm-global"
7885
n 14.18.0
79-
export XDG_CACHE_HOME=$homeCacheDir/.cache
86+
87+
# Ensure the shell uses the new node and npm
88+
export PATH="$homeCacheDir/.npm-global/bin:$PATH"
89+
hash -r
90+
echo "After n:"
91+
which node
92+
which npm
93+
node -v
94+
npm -v
95+
8096
npm install -g bower
8197
# Clear bash hash tables for node/npm paths
8298
hash -r
@@ -147,7 +163,7 @@ buildReaperSources
147163

148164
createCacheTars
149165

150-
mkdir "$HOME/reaper_caches"
166+
mkdir -p $HOME/reaper_caches
151167

152168
cp -a ${reaperCacheDir} "$HOME/reaper_caches"
153169

0 commit comments

Comments
 (0)