Skip to content

Commit 351ccbc

Browse files
CBL-Mariner-Botsuresh-thelkarPawelWMS
authored
[AUTO-CHERRYPICK] Patch CVE-2024-24806 in nodejs18 - branch main (#8164)
Co-authored-by: suresh-thelkar <suresh.thelkar@yahoo.com> Co-authored-by: Pawel Winogrodzki <pawelwi@microsoft.com>
1 parent d38bc3c commit 351ccbc

2 files changed

Lines changed: 36 additions & 1 deletion

File tree

SPECS/nodejs/CVE-2024-24806.patch

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
From 9c2cf90e5b3952a202a0fb8435470eaa527d3f63 Mon Sep 17 00:00:00 2001
2+
From: Suresh Thelkar <sthelkar@microsoft.com>
3+
Date: Tue, 27 Feb 2024 10:24:03 +0530
4+
Subject: [PATCH] Patch CVE-2024-24806
5+
6+
Upstream patch details are given below.
7+
https://github.com/libuv/libuv/commit/0f2d7e784a256b54b2385043438848047bc2a629
8+
---
9+
deps/uv/src/idna.c | 6 ++++--
10+
1 file changed, 4 insertions(+), 2 deletions(-)
11+
12+
diff --git a/deps/uv/src/idna.c b/deps/uv/src/idna.c
13+
index 93d982ca..197650af 100644
14+
--- a/deps/uv/src/idna.c
15+
+++ b/deps/uv/src/idna.c
16+
@@ -308,8 +308,10 @@ long uv__idna_toascii(const char* s, const char* se, char* d, char* de) {
17+
return rc;
18+
}
19+
20+
- if (d < de)
21+
- *d++ = '\0';
22+
+ if (d >= de)
23+
+ return UV_EINVAL;
24+
+
25+
+ *d++ = '\0';
26+
27+
return d - ds; /* Number of bytes written. */
28+
}
29+
--
30+
2.34.1
31+

SPECS/nodejs/nodejs18.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Name: nodejs18
66
# WARNINGS: MUST check and update the 'npm_version' macro for every version update of this package.
77
# The version of NPM can be found inside the sources under 'deps/npm/package.json'.
88
Version: 18.18.2
9-
Release: 3%{?dist}
9+
Release: 4%{?dist}
1010
License: BSD and MIT and Public Domain and NAIST-2003 and Artistic-2.0
1111
Group: Applications/System
1212
Vendor: Microsoft Corporation
@@ -18,6 +18,7 @@ URL: https://github.com/nodejs/node
1818
Source0: https://nodejs.org/download/release/v%{version}/node-v%{version}.tar.xz
1919
Patch0: disable-tlsv1-tlsv1-1.patch
2020
Patch1: CVE-2023-42282.patch
21+
Patch2: CVE-2024-24806.patch
2122
BuildRequires: brotli-devel
2223
BuildRequires: coreutils >= 8.22
2324
BuildRequires: gcc
@@ -116,6 +117,9 @@ make cctest
116117
%{_datadir}/systemtap/tapset/node.stp
117118

118119
%changelog
120+
* Tue Feb 27 2024 Suresh Thelkar <sthelkar@ieee.org> - 18.18.2-4
121+
- Patch CVE-2024-24806
122+
119123
* Mon Feb 26 2024 Suresh Babu Chalamalasetty <schalam@microsoft.com> - 18.18.2-3
120124
- Patch CVE-2023-42282
121125
- Unit test code is not applicable for this NodeJS version sources

0 commit comments

Comments
 (0)