Skip to content

Commit

Permalink
feat: enable v8 sandboxed pointers
Browse files Browse the repository at this point in the history
  • Loading branch information
nornagon committed Jun 23, 2022
1 parent e5f42ed commit bd39f12
Show file tree
Hide file tree
Showing 6 changed files with 373 additions and 308 deletions.
4 changes: 0 additions & 4 deletions build/args/all.gn
Expand Up @@ -45,7 +45,3 @@ enable_cet_shadow_stack = false
# V8 in the browser process.
# Ref: https://source.chromium.org/chromium/chromium/src/+/45fba672185aae233e75d6ddc81ea1e0b30db050:v8/BUILD.gn;l=281
is_cfi = false

# TODO(nornagon): this is disabled until node.js's internals can be made
# compatible with sandboxed pointers.
v8_enable_sandboxed_pointers = false
3 changes: 1 addition & 2 deletions patches/node/.patches
Expand Up @@ -44,5 +44,4 @@ src_update_importmoduledynamically.patch
fix_add_v8_enable_reverse_jsargs_defines_in_common_gypi.patch
json_parse_errors_made_user-friendly.patch
build_define_libcpp_abi_namespace_as_cr_to_align_with_chromium.patch
serdes_allocate_using_the_v8_arraybuffer_allocator.patch
nodearraybufferallocator_uses_v8_arraybuffer_allocator.patch
support_v8_sandboxed_pointers.patch
28 changes: 0 additions & 28 deletions patches/node/fix_crypto_tests_to_run_with_bssl.patch
Expand Up @@ -251,34 +251,6 @@ index 3bbca5b0da395b94c04da7bb7c55b107e41367d8..af62558c4f23aa82804e0077da7b7f3a


//
diff --git a/test/parallel/test-crypto-certificate.js b/test/parallel/test-crypto-certificate.js
index 4a5f1f149fe6c739f7f1d2ee17df6e61a942d621..ffd10deddbffceba1f28a37f54608798e87d5a36 100644
--- a/test/parallel/test-crypto-certificate.js
+++ b/test/parallel/test-crypto-certificate.js
@@ -41,7 +41,10 @@ function copyArrayBuffer(buf) {

function checkMethods(certificate) {

+ /* spkacValid has a md5 based signature which is not allowed in boringssl
+ https://boringssl.googlesource.com/boringssl/+/33d7e32ce40c04e8f1b99c05964956fda187819f
assert.strictEqual(certificate.verifySpkac(spkacValid), true);
+ */
assert.strictEqual(certificate.verifySpkac(spkacFail), false);

assert.strictEqual(
@@ -56,10 +59,12 @@ function checkMethods(certificate) {
);
assert.strictEqual(certificate.exportChallenge(spkacFail), '');

+ /* spkacValid has a md5 based signature which is not allowed in boringssl
const ab = copyArrayBuffer(spkacValid);
assert.strictEqual(certificate.verifySpkac(ab), true);
assert.strictEqual(certificate.verifySpkac(new Uint8Array(ab)), true);
assert.strictEqual(certificate.verifySpkac(new DataView(ab)), true);
+ */
}

{
diff --git a/test/parallel/test-crypto-cipher-decipher.js b/test/parallel/test-crypto-cipher-decipher.js
index 35514afbea92562a81c163b1e4d918b4ab609f71..13098e1acf12c309f2ed6f6143a2c2eeb8a2763d 100644
--- a/test/parallel/test-crypto-cipher-decipher.js
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit bd39f12

Please sign in to comment.