import UBI nodejs-24.18.0-2.module+el8.10.0+24562+090c6525
This commit is contained in:
parent
ef5f06978a
commit
61a9b8e4b9
159
SOURCES/0001-CVE-2026-13149-Brace-Expansion-DOS.patch
Normal file
159
SOURCES/0001-CVE-2026-13149-Brace-Expansion-DOS.patch
Normal file
@ -0,0 +1,159 @@
|
||||
From 193b73ce0138d3d2d62acd97fe2268bcdfcd8da6 Mon Sep 17 00:00:00 2001
|
||||
From: rpm-build <rpm-build>
|
||||
Date: Tue, 14 Jul 2026 09:01:08 +0000
|
||||
Subject: [PATCH] deps: update brace-expansion to 5.0.7
|
||||
|
||||
A run of non-expanding {} groups expanded post once per group before the
|
||||
early returns that never use it, doubling the work on every group. expand_
|
||||
ran in O(2^n) and blocked for minutes on a ~90 byte input.
|
||||
|
||||
Defer expanding post until a brace set is known to expand, and turn the
|
||||
{a},b} restart into a loop so a long run of {} groups can't exhaust the
|
||||
call stack.
|
||||
|
||||
Backport of upstream fix:
|
||||
https://github.com/juliangruber/brace-expansion/commit/c7e33ec13ac1a684c116720843ce24e208611754
|
||||
|
||||
CVE: CVE-2026-13149
|
||||
---
|
||||
.../brace-expansion/dist/commonjs/index.js | 38 ++++++++++++-------
|
||||
.../brace-expansion/dist/esm/index.js | 38 ++++++++++++-------
|
||||
.../node_modules/brace-expansion/package.json | 2 +-
|
||||
3 files changed, 49 insertions(+), 29 deletions(-)
|
||||
|
||||
diff --git a/deps/npm/node_modules/brace-expansion/dist/commonjs/index.js b/deps/npm/node_modules/brace-expansion/dist/commonjs/index.js
|
||||
index 33063dd..e4e5bd8 100644
|
||||
--- a/deps/npm/node_modules/brace-expansion/dist/commonjs/index.js
|
||||
+++ b/deps/npm/node_modules/brace-expansion/dist/commonjs/index.js
|
||||
@@ -95,19 +95,23 @@ function gte(i, y) {
|
||||
function expand_(str, max, isTop) {
|
||||
/** @type {string[]} */
|
||||
const expansions = [];
|
||||
- const m = (0, balanced_match_1.balanced)('{', '}', str);
|
||||
- if (!m)
|
||||
- return [str];
|
||||
- // no need to expand pre, since it is guaranteed to be free of brace-sets
|
||||
- const pre = m.pre;
|
||||
- const post = m.post.length ? expand_(m.post, max, false) : [''];
|
||||
- if (/\$$/.test(m.pre)) {
|
||||
- for (let k = 0; k < post.length && k < max; k++) {
|
||||
- const expansion = pre + '{' + m.body + '}' + post[k];
|
||||
- expansions.push(expansion);
|
||||
+ // The `{a},b}` rewrite below restarts expansion on a rewritten string with
|
||||
+ // the same `max` and `isTop = true`. Loop instead of recursing so a long run
|
||||
+ // of non-expanding `{}` groups can't exhaust the call stack.
|
||||
+ for (;;) {
|
||||
+ const m = (0, balanced_match_1.balanced)('{', '}', str);
|
||||
+ if (!m)
|
||||
+ return [str];
|
||||
+ // no need to expand pre, since it is guaranteed to be free of brace-sets
|
||||
+ const pre = m.pre;
|
||||
+ if (/\$$/.test(m.pre)) {
|
||||
+ const post = m.post.length ? expand_(m.post, max, false) : [''];
|
||||
+ for (let k = 0; k < post.length && k < max; k++) {
|
||||
+ const expansion = pre + '{' + m.body + '}' + post[k];
|
||||
+ expansions.push(expansion);
|
||||
+ }
|
||||
+ return expansions;
|
||||
}
|
||||
- }
|
||||
- else {
|
||||
const isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
|
||||
const isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
|
||||
const isSequence = isNumericSequence || isAlphaSequence;
|
||||
@@ -116,10 +120,16 @@ function expand_(str, max, isTop) {
|
||||
// {a},b}
|
||||
if (m.post.match(/,(?!,).*\}/)) {
|
||||
str = m.pre + '{' + m.body + escClose + m.post;
|
||||
- return expand_(str, max, true);
|
||||
+ isTop = true;
|
||||
+ continue;
|
||||
}
|
||||
return [str];
|
||||
}
|
||||
+ // Only expand post once we know this brace set actually expands. Computing
|
||||
+ // it before the early returns above expanded post a second time on every
|
||||
+ // non-expanding `{}`, which is what made inputs like `a{},{},{}...` blow up
|
||||
+ // exponentially.
|
||||
+ const post = m.post.length ? expand_(m.post, max, false) : [''];
|
||||
let n;
|
||||
if (isSequence) {
|
||||
n = m.body.split(/\.\./);
|
||||
@@ -195,7 +205,7 @@ function expand_(str, max, isTop) {
|
||||
}
|
||||
}
|
||||
}
|
||||
+ return expansions;
|
||||
}
|
||||
- return expansions;
|
||||
}
|
||||
//# sourceMappingURL=index.js.map
|
||||
\ No newline at end of file
|
||||
diff --git a/deps/npm/node_modules/brace-expansion/dist/esm/index.js b/deps/npm/node_modules/brace-expansion/dist/esm/index.js
|
||||
index 32399e7..b2d2aa9 100644
|
||||
--- a/deps/npm/node_modules/brace-expansion/dist/esm/index.js
|
||||
+++ b/deps/npm/node_modules/brace-expansion/dist/esm/index.js
|
||||
@@ -91,19 +91,23 @@ function gte(i, y) {
|
||||
function expand_(str, max, isTop) {
|
||||
/** @type {string[]} */
|
||||
const expansions = [];
|
||||
- const m = balanced('{', '}', str);
|
||||
- if (!m)
|
||||
- return [str];
|
||||
- // no need to expand pre, since it is guaranteed to be free of brace-sets
|
||||
- const pre = m.pre;
|
||||
- const post = m.post.length ? expand_(m.post, max, false) : [''];
|
||||
- if (/\$$/.test(m.pre)) {
|
||||
- for (let k = 0; k < post.length && k < max; k++) {
|
||||
- const expansion = pre + '{' + m.body + '}' + post[k];
|
||||
- expansions.push(expansion);
|
||||
+ // The `{a},b}` rewrite below restarts expansion on a rewritten string with
|
||||
+ // the same `max` and `isTop = true`. Loop instead of recursing so a long run
|
||||
+ // of non-expanding `{}` groups can't exhaust the call stack.
|
||||
+ for (;;) {
|
||||
+ const m = balanced('{', '}', str);
|
||||
+ if (!m)
|
||||
+ return [str];
|
||||
+ // no need to expand pre, since it is guaranteed to be free of brace-sets
|
||||
+ const pre = m.pre;
|
||||
+ if (/\$$/.test(m.pre)) {
|
||||
+ const post = m.post.length ? expand_(m.post, max, false) : [''];
|
||||
+ for (let k = 0; k < post.length && k < max; k++) {
|
||||
+ const expansion = pre + '{' + m.body + '}' + post[k];
|
||||
+ expansions.push(expansion);
|
||||
+ }
|
||||
+ return expansions;
|
||||
}
|
||||
- }
|
||||
- else {
|
||||
const isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
|
||||
const isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
|
||||
const isSequence = isNumericSequence || isAlphaSequence;
|
||||
@@ -112,10 +116,16 @@ function expand_(str, max, isTop) {
|
||||
// {a},b}
|
||||
if (m.post.match(/,(?!,).*\}/)) {
|
||||
str = m.pre + '{' + m.body + escClose + m.post;
|
||||
- return expand_(str, max, true);
|
||||
+ isTop = true;
|
||||
+ continue;
|
||||
}
|
||||
return [str];
|
||||
}
|
||||
+ // Only expand post once we know this brace set actually expands. Computing
|
||||
+ // it before the early returns above expanded post a second time on every
|
||||
+ // non-expanding `{}`, which is what made inputs like `a{},{},{}...` blow up
|
||||
+ // exponentially.
|
||||
+ const post = m.post.length ? expand_(m.post, max, false) : [''];
|
||||
let n;
|
||||
if (isSequence) {
|
||||
n = m.body.split(/\.\./);
|
||||
@@ -191,7 +201,7 @@ function expand_(str, max, isTop) {
|
||||
}
|
||||
}
|
||||
}
|
||||
+ return expansions;
|
||||
}
|
||||
- return expansions;
|
||||
}
|
||||
//# sourceMappingURL=index.js.map
|
||||
\ No newline at end of file
|
||||
File diff suppressed because one or more lines are too long
@ -3,7 +3,7 @@
|
||||
%{load:%{_sourcedir}/nodejs.srpm.macros}
|
||||
|
||||
# === Versions of any software shipped in the main nodejs tarball
|
||||
%nodejs_define_version node 1:24.18.0-1%{?dist} -p
|
||||
%nodejs_define_version node 1:24.18.0-2%{?dist} -p
|
||||
|
||||
# The following ones are generated via script;
|
||||
# expect anything between the markers to be overwritten on any update.
|
||||
@ -159,6 +159,12 @@ Source101: nodejs.srpm.macros
|
||||
|
||||
Patch0001: 0001-Remove-unused-OpenSSL-config.patch
|
||||
Patch0002: 0002-fips-disable-options.patch
|
||||
# Sourced from:
|
||||
# https://github.com/nodejs/node/commit/fd350185539242b7d383ebf38f6041f10b472b39
|
||||
Patch0003: 0001-CVE-2026-59873-CVE-2026-59874-upgrade-bundled-tar-to-7.5.19.patch
|
||||
# Sourced from:
|
||||
# https://github.com/juliangruber/brace-expansion/commit/c7e33ec13ac1a684c116720843ce24e208611754
|
||||
Patch0004: 0001-CVE-2026-13149-Brace-Expansion-DOS.patch
|
||||
|
||||
%description
|
||||
Node.js is a platform built on Chrome's JavaScript runtime
|
||||
@ -540,6 +546,11 @@ bash '%{SOURCE10}' "${RPM_BUILD_ROOT}%{_bindir}/node" test/ '%{SOURCE11}' || :
|
||||
%{_pkgdocdir}/npm/
|
||||
|
||||
%changelog
|
||||
* Wed Jul 22 2026 Jan Staněk <jstanek@redhat.com> - 1:24.18.0-2
|
||||
- Backport patches for various CVEs
|
||||
Fixes: CVE-2026-59873 CVE-2026-59874 CVE-2026-13149
|
||||
Resolves: RHEL-194176 RHEL-194179 RHEL-208658
|
||||
|
||||
* Tue Jun 30 2026 Jan Staněk <jstanek@redhat.com> - 1:24.18.0-1
|
||||
- Update to version 24.18.0
|
||||
Resolves: RHEL-168744
|
||||
|
||||
Loading…
Reference in New Issue
Block a user