Skip to content

Commit 966a923

Browse files
Camelronjslobodzian
authored andcommitted
reaper: Add patch to address reaper CVE-2024-42459, CVE-2024-42460, CVE-2024-42461 (#10195)
1 parent 15f2e79 commit 966a923

File tree

4 files changed

+66
-1
lines changed

4 files changed

+66
-1
lines changed

SPECS/reaper/CVE-2024-42459.patch

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
From accb61e9c1a005e5c8ff96a8b33893100bb42d11 Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?Markus=20Schifferm=C3=BCller?=
3+
4+
Date: Tue, 13 Aug 2024 22:21:52 -0400
5+
Subject: [PATCH] lib: DER signature decoding correction
6+
7+
---
8+
lib/elliptic/ec/signature.js | 10 ++++++++++
9+
lib/elliptic/eddsa/signature.js | 1 +
10+
2 files changed, 11 insertions(+)
11+
12+
diff --git a/src/ui/node_modules/elliptic/lib/elliptic/ec/signature.js b/src/ui/node_modules/elliptic/lib/elliptic/ec/signature.js
13+
index 539df6a2..48e3a26f 100644
14+
--- a/src/ui/node_modules/elliptic/lib/elliptic/ec/signature.js
15+
+++ b/src/ui/node_modules/elliptic/lib/elliptic/ec/signature.js
16+
@@ -38,6 +38,10 @@ function getLength(buf, p) {
17+
return false;
18+
}
19+
20+
+ if(buf[p.place] === 0x00) {
21+
+ return false;
22+
+ }
23+
+
24+
var val = 0;
25+
for (var i = 0, off = p.place; i < octetLen; i++, off++) {
26+
val <<= 8;
27+
@@ -86,6 +90,9 @@ Signature.prototype._importDER = function _importDER(data, enc) {
28+
if (rlen === false) {
29+
return false;
30+
}
31+
+ if ((data[p.place] & 128) !== 0) {
32+
+ return false;
33+
+ }
34+
var r = data.slice(p.place, rlen + p.place);
35+
p.place += rlen;
36+
if (data[p.place++] !== 0x02) {
37+
@@ -98,6 +105,9 @@ Signature.prototype._importDER = function _importDER(data, enc) {
38+
if (data.length !== slen + p.place) {
39+
return false;
40+
}
41+
+ if ((data[p.place] & 128) !== 0) {
42+
+ return false;
43+
+ }
44+
var s = data.slice(p.place, slen + p.place);
45+
if (r[0] === 0) {
46+
if (r[1] & 0x80) {
47+
diff --git a/src/ui/node_modules/elliptic/lib/elliptic/eddsa/signature.js b/src/ui/node_modules/elliptic/lib/elliptic/eddsa/signature.js
48+
index 30ebc920..b224ad1c 100644
49+
--- a/src/ui/node_modules/elliptic/lib/elliptic/eddsa/signature.js
50+
+++ b/src/ui/node_modules/elliptic/lib/elliptic/eddsa/signature.js
51+
@@ -21,6 +21,7 @@ function Signature(eddsa, sig) {
52+
sig = parseBytes(sig);
53+
54+
if (Array.isArray(sig)) {
55+
+ assert(sig.length === eddsa.encodingLength * 2, 'Signature has invalid size');
56+
sig = {
57+
R: sig.slice(0, eddsa.encodingLength),
58+
S: sig.slice(eddsa.encodingLength),
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Addressed as part of CVE-2024-42459.patch
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Addressed as part of CVE-2024-42459.patch

SPECS/reaper/reaper.spec

Lines changed: 6 additions & 1 deletion
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: 10%{?dist}
9+
Release: 11%{?dist}
1010
License: ASL 2.0
1111
Vendor: Microsoft Corporation
1212
Distribution: Mariner
@@ -35,6 +35,7 @@ Source7: reaper-local-n-%{version}-%{local_n_release}.tar.gz
3535
Patch0: CVE-2024-37890.patch
3636
Patch1: CVE-2023-42282.patch
3737
Patch2: CVE-2017-18214.patch
38+
Patch3: CVE-2024-42459.patch
3839
BuildRequires: git
3940
BuildRequires: javapackages-tools
4041
BuildRequires: maven
@@ -171,6 +172,10 @@ fi
171172
%{_unitdir}/cassandra-%{name}.service
172173

173174
%changelog
175+
* Tue Aug 20 2024 Cameron Baird <[email protected]> - 3.1.1-11
176+
- Introduce DER-signature-decoding-correction.patch to address CVE-2024-42459,
177+
- CVE-2024-42460, CVE-2024-42461
178+
174179
* Tue Jul 09 2024 Pawel Winogrodzki <[email protected]> - 3.1.1-10
175180
- Patching CVE-2024-37890, CVE-2023-42282, and CVE-2017-18214.
176181

0 commit comments

Comments
 (0)