diff --git a/.gitignore b/.gitignore index 49a89a8..1b30db8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ SOURCES/node-ssl-shim-6fc0b05.tar.gz -SOURCES/node-v12.20.1-stripped.tar.gz +SOURCES/node-v12.21.0-stripped.tar.gz diff --git a/.rh-nodejs12-nodejs.metadata b/.rh-nodejs12-nodejs.metadata index e3ac9b6..7fd6bad 100644 --- a/.rh-nodejs12-nodejs.metadata +++ b/.rh-nodejs12-nodejs.metadata @@ -1,2 +1,2 @@ 9fe6761bd237af8be0e4d26184c5a01e01d7967d SOURCES/node-ssl-shim-6fc0b05.tar.gz -81c75a3ddae01fb409cdbb3c9ef98989f2914cbf SOURCES/node-v12.20.1-stripped.tar.gz +d1a2ba595dc378234691c4c6ce70c8e0ffe1b779 SOURCES/node-v12.21.0-stripped.tar.gz diff --git a/SOURCES/deps-ini-do-not-allow-invalid-hazardous-string-as-section-name.patch b/SOURCES/deps-ini-do-not-allow-invalid-hazardous-string-as-section-name.patch deleted file mode 100644 index b7270a0..0000000 --- a/SOURCES/deps-ini-do-not-allow-invalid-hazardous-string-as-section-name.patch +++ /dev/null @@ -1,99 +0,0 @@ -From cdd56e89bf13b495e5b97cc4416f61638617d7f4 Mon Sep 17 00:00:00 2001 -From: isaacs -Date: Tue, 8 Dec 2020 14:21:50 -0800 -Subject: [PATCH] do not allow invalid hazardous string as section name - -Signed-off-by: rpm-build ---- - deps/npm/node_modules/ini/ini.js | 8 +++++ - deps/npm/node_modules/ini/test/proto.js | 45 +++++++++++++++++++++++++ - 2 files changed, 53 insertions(+) - create mode 100644 deps/npm/node_modules/ini/test/proto.js - -diff --git a/deps/npm/node_modules/ini/ini.js b/deps/npm/node_modules/ini/ini.js -index 590195d..0401258 100644 ---- a/deps/npm/node_modules/ini/ini.js -+++ b/deps/npm/node_modules/ini/ini.js -@@ -80,6 +80,12 @@ function decode (str) { - if (!match) return - if (match[1] !== undefined) { - section = unsafe(match[1]) -+ if (section === '__proto__') { -+ // not allowed -+ // keep parsing the section, but don't attach it. -+ p = {} -+ return -+ } - p = out[section] = out[section] || {} - return - } -@@ -94,6 +100,7 @@ function decode (str) { - // Convert keys with '[]' suffix to an array - if (key.length > 2 && key.slice(-2) === '[]') { - key = key.substring(0, key.length - 2) -+ if (key === '__proto__') return - if (!p[key]) { - p[key] = [] - } else if (!Array.isArray(p[key])) { -@@ -125,6 +132,7 @@ function decode (str) { - var l = parts.pop() - var nl = l.replace(/\\\./g, '.') - parts.forEach(function (part, _, __) { -+ if (part === '__proto__') return - if (!p[part] || typeof p[part] !== 'object') p[part] = {} - p = p[part] - }) -diff --git a/deps/npm/node_modules/ini/test/proto.js b/deps/npm/node_modules/ini/test/proto.js -new file mode 100644 -index 0000000..ab35533 ---- /dev/null -+++ b/deps/npm/node_modules/ini/test/proto.js -@@ -0,0 +1,45 @@ -+var ini = require('../') -+var t = require('tap') -+ -+var data = ` -+__proto__ = quux -+foo = baz -+[__proto__] -+foo = bar -+[other] -+foo = asdf -+[kid.__proto__.foo] -+foo = kid -+[arrproto] -+hello = snyk -+__proto__[] = you did a good job -+__proto__[] = so you deserve arrays -+thanks = true -+` -+var res = ini.parse(data) -+t.deepEqual(res, { -+ foo: 'baz', -+ other: { -+ foo: 'asdf', -+ }, -+ kid: { -+ foo: { -+ foo: 'kid', -+ }, -+ }, -+ arrproto: { -+ hello: 'snyk', -+ thanks: true, -+ }, -+}) -+t.equal(res.__proto__, Object.prototype) -+t.equal(res.kid.__proto__, Object.prototype) -+t.equal(res.kid.foo.__proto__, Object.prototype) -+t.equal(res.arrproto.__proto__, Object.prototype) -+t.equal(Object.prototype.foo, undefined) -+t.equal(Object.prototype[0], undefined) -+t.equal(Object.prototype['0'], undefined) -+t.equal(Object.prototype[1], undefined) -+t.equal(Object.prototype['1'], undefined) -+t.equal(Array.prototype[0], undefined) -+t.equal(Array.prototype[1], undefined) --- -2.29.2 - diff --git a/SPECS/nodejs.spec b/SPECS/nodejs.spec index c4953f0..0b0bdd9 100644 --- a/SPECS/nodejs.spec +++ b/SPECS/nodejs.spec @@ -22,8 +22,8 @@ # feature releases that are only supported for nine months, which is shorter # than a Fedora release lifecycle. %global nodejs_major 12 -%global nodejs_minor 20 -%global nodejs_patch 1 +%global nodejs_minor 21 +%global nodejs_patch 0 %global nodejs_abi %{nodejs_major}.%{nodejs_minor} %global nodejs_version %{nodejs_major}.%{nodejs_minor}.%{nodejs_patch} %global nodejs_release 1 @@ -80,7 +80,7 @@ # npm - from deps/npm/package.json %global npm_major 6 %global npm_minor 14 -%global npm_patch 10 +%global npm_patch 11 %global npm_version %{npm_major}.%{npm_minor}.%{npm_patch} # uvwasi - from deps/uvwasi/include/uvwasi.h @@ -151,7 +151,6 @@ Patch11: tools-test-Replace-malformed-input-from-tests.patch # Backport upstream fixes Patch20: deps-y18n-address-prototype-pollution-issue.patch -Patch21: deps-ini-do-not-allow-invalid-hazardous-string-as-section-name.patch %{?scl:Requires: %{scl}-runtime} @@ -325,8 +324,7 @@ export CFLAGS="%{optflags} ${extra_cflags[*]}" CXXFLAGS="%{optflags} ${extra_cfl --with-dtrace --with-intl=small-icu \ --shared-openssl --openssl-use-def-ca-store --openssl-is-fips \ %{!?el7:--shared-zlib} \ - %{!?with_bootstrap:--shared-http-parser} \ - --debug-nghttp2 + %{!?with_bootstrap:--shared-http-parser} %make_build %{!?with_parallel_build:-j1} @@ -504,7 +502,11 @@ python2 tools/test.py "${RUN_SUITES[@]}" %changelog -* Fri Jan 08 2021 Jan Staněk - 12.20.1-1.fc33~bootstrap +* Tue Feb 23 2021 Jan Staněk - 12.21.0-1 +- Rebase to 12.21.0 +- Resolves: CVE-2021-22883 CVE-2021-22884 + +* Fri Jan 08 2021 Jan Staněk - 12.20.1-1 - Rebase to 12.20.1 - Resolves: CVE-2020-8265 CVE-2020-8287