From 77bd2341db4ae856c05cea8922a718c8fe4aef0b Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Oct 06 2021 05:32:22 +0000 Subject: import nodejs-14.17.5-1.module+el8.4.0+12247+e2879e58 --- diff --git a/.gitignore b/.gitignore index 86e0b6d..ef831e8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -SOURCES/icu4c-67_1-src.tgz -SOURCES/node-v14.15.4-stripped.tar.gz +SOURCES/icu4c-69_1-src.tgz +SOURCES/node-v14.17.5-stripped.tar.gz diff --git a/.nodejs.metadata b/.nodejs.metadata index 24b324b..7f1e486 100644 --- a/.nodejs.metadata +++ b/.nodejs.metadata @@ -1,2 +1,2 @@ -6822a4a94324d1ba591b3e8ef084e4491af253c1 SOURCES/icu4c-67_1-src.tgz -5defcd39ec57a7d529ae6343b9022f2c0e5e6e5f SOURCES/node-v14.15.4-stripped.tar.gz +620a71c84428758376baa0fb81a581c3daa866ce SOURCES/icu4c-69_1-src.tgz +cdb2e0bdf9693d85a58d7b8576a4595618e0909e SOURCES/node-v14.17.5-stripped.tar.gz diff --git a/SOURCES/0003-yarn-not-installable-on-aarch64.patch b/SOURCES/0003-yarn-not-installable-on-aarch64.patch deleted file mode 100644 index dd4a3bb..0000000 --- a/SOURCES/0003-yarn-not-installable-on-aarch64.patch +++ /dev/null @@ -1,92 +0,0 @@ - From d4d05ceb418c525b0d07e76b81b8694ac2f5b309 Mon Sep 17 00:00:00 2001 -From: Daniel Bevenius -Date: Wed, 16 Sep 2020 06:12:54 +0200 -Subject: [PATCH] [deps] V8: cherry-pick 71736859756b2bd0444bdb0a87a - -Original commit message: - - [heap] Add large_object_threshold to AllocateRaw - - This commit adds a check in Heap::AllocateRaw when setting the - large_object variable, when the AllocationType is of type kCode, to - take into account the size of the CodeSpace's area size. - - The motivation for this change is that without this check it is - possible that size_in_bytes is less than 128, and hence not considered - a large object, but it might be larger than the available space - in code_space->AreaSize(), which will cause the object to be created - in the CodeLargeObjectSpace. This will later cause a segmentation fault - when calling the following chain of functions: - - if (!large_object) { - MemoryChunk::FromHeapObject(heap_object) - ->GetCodeObjectRegistry() - ->RegisterNewlyAllocatedCodeObject(heap_object.address()); - } - - We (Red Hat) ran into this issue when running Node.js v12.16.1 in - combination with yarn on aarch64 (this was the only architecture that - this happed on). - - Bug: v8:10808 - Change-Id: I0c396b0eb64bc4cc91d9a3be521254f3130eac7b - Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2390665 - Commit-Queue: Ulan Degenbaev - Reviewed-by: Ulan Degenbaev - Cr-Commit-Position: refs/heads/master@{#69876} - -Refs: https://github.com/v8/v8/commit/71736859756b2bd0444bdb0a87a61a0b090cbba2 ---- - deps/v8/src/heap/heap-inl.h | 13 +++-- - deps/v8/src/heap/heap.h | 6 ++- - 4 files changed, 83 insertions(+), 6 deletions(-) - -diff --git a/deps/v8/src/heap/heap-inl.h b/deps/v8/src/heap/heap-inl.h -index 39f5ec6c66e..b56ebc03d58 100644 ---- a/deps/v8/src/heap/heap-inl.h -+++ b/deps/v8/src/heap/heap-inl.h -@@ -192,7 +192,12 @@ AllocationResult Heap::AllocateRaw(int size_in_bytes, AllocationType type, - IncrementObjectCounters(); - #endif - -- bool large_object = size_in_bytes > kMaxRegularHeapObjectSize; -+ size_t large_object_threshold = -+ AllocationType::kCode == type -+ ? std::min(kMaxRegularHeapObjectSize, code_space()->AreaSize()) -+ : kMaxRegularHeapObjectSize; -+ bool large_object = -+ static_cast(size_in_bytes) > large_object_threshold; - - HeapObject object; - AllocationResult allocation; -@@ -225,10 +230,10 @@ AllocationResult Heap::AllocateRaw(int size_in_bytes, AllocationType type, - allocation = old_space_->AllocateRaw(size_in_bytes, alignment, origin); - } - } else if (AllocationType::kCode == type) { -- if (size_in_bytes <= code_space()->AreaSize() && !large_object) { -- allocation = code_space_->AllocateRawUnaligned(size_in_bytes); -- } else { -+ if (large_object) { - allocation = code_lo_space_->AllocateRaw(size_in_bytes); -+ } else { -+ allocation = code_space_->AllocateRawUnaligned(size_in_bytes); - } - } else if (AllocationType::kMap == type) { - allocation = map_space_->AllocateRawUnaligned(size_in_bytes); -diff --git a/deps/v8/src/heap/heap.h b/deps/v8/src/heap/heap.h -index 888d174c02f..0165fa6970f 100644 ---- a/deps/v8/src/heap/heap.h -+++ b/deps/v8/src/heap/heap.h -@@ -1404,8 +1404,10 @@ class Heap { - // Heap object allocation tracking. ========================================== - // =========================================================================== - -- void AddHeapObjectAllocationTracker(HeapObjectAllocationTracker* tracker); -- void RemoveHeapObjectAllocationTracker(HeapObjectAllocationTracker* tracker); -+ V8_EXPORT_PRIVATE void AddHeapObjectAllocationTracker( -+ HeapObjectAllocationTracker* tracker); -+ V8_EXPORT_PRIVATE void RemoveHeapObjectAllocationTracker( -+ HeapObjectAllocationTracker* tracker); - bool has_heap_object_allocation_tracker() const { - return !allocation_trackers_.empty(); - } diff --git a/SOURCES/0004-CVE-2020-7774-nodejs-y18n-prototype-pollution-vulnerability.patch b/SOURCES/0004-CVE-2020-7774-nodejs-y18n-prototype-pollution-vulnerability.patch deleted file mode 100644 index 88a9d75..0000000 --- a/SOURCES/0004-CVE-2020-7774-nodejs-y18n-prototype-pollution-vulnerability.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/deps/npm/node_modules/y18n/index.js b/deps/npm/node_modules/y18n/index.js -index d720681628..727362aac0 100644 ---- a/deps/npm/node_modules/y18n/index.js -+++ b/deps/npm/node_modules/y18n/index.js -@@ -11,7 +11,7 @@ function Y18N (opts) { - this.fallbackToLanguage = typeof opts.fallbackToLanguage === 'boolean' ? opts.fallbackToLanguage : true - - // internal stuff. -- this.cache = {} -+ this.cache = Object.create(null) - this.writeQueue = [] - } - diff --git a/SOURCES/0004-always-available-fips-options.patch b/SOURCES/0004-always-available-fips-options.patch new file mode 100644 index 0000000..26d4853 --- /dev/null +++ b/SOURCES/0004-always-available-fips-options.patch @@ -0,0 +1,624 @@ +From 7c7f5159fcc71d915dfcc5f97ab18d5f8912f1b5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Tue, 25 Aug 2020 14:04:54 +0200 +Subject: [PATCH] crypto: make FIPS related options always awailable +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +There is no reason to hide FIPS functionality behind build flags. +OpenSSL always provide the information about FIPS availability via +`FIPS_mode()` function. + +This makes the user experience more consistent, because the OpenSSL +library is always queried and the `crypto.getFips()` always returns +OpenSSL settings. + +Fixes #34903 + +PR-URL: https://github.com/nodejs/node/pull/36341 +Reviewed-By: Anna Henningsen +Reviewed-By: Michael Dawson +Reviewed-By: Daniel Bevenius +Signed-off-by: Jan Staněk +Signed-off-by: rpm-build +--- + doc/api/cli.md | 8 +-- + lib/crypto.js | 22 ++---- + node.gypi | 3 - + src/node.cc | 6 +- + src/node_config.cc | 2 - + src/node_crypto.cc | 45 +++++++----- + src/node_options.cc | 2 - + src/node_options.h | 2 - + test/parallel/test-cli-node-print-help.js | 7 +- + test/parallel/test-crypto-fips.js | 71 +++++++++---------- + ...rocess-env-allowed-flags-are-documented.js | 11 +-- + 11 files changed, 74 insertions(+), 105 deletions(-) + +diff --git a/doc/api/cli.md b/doc/api/cli.md +index a8ef339..c41bd49 100644 +--- a/doc/api/cli.md ++++ b/doc/api/cli.md +@@ -182,8 +182,8 @@ code from strings throw an exception instead. This does not affect the Node.js + added: v6.0.0 + --> + +-Enable FIPS-compliant crypto at startup. (Requires Node.js to be built with +-`./configure --openssl-fips`.) ++Enable FIPS-compliant crypto at startup. (Requires Node.js to be built ++against FIPS-compatible OpenSSL.) + + ### `--enable-source-maps` + + + Load an OpenSSL configuration file on startup. Among other uses, this can be +-used to enable FIPS-compliant crypto if Node.js is built with +-`./configure --openssl-fips`. ++used to enable FIPS-compliant crypto if Node.js is built ++against FIPS-enabled OpenSSL. + + ### `--pending-deprecation` +