| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Sorry, something went wrong.
|
I’m guessing this test failure is not unrelated? https://ci.nodejs.org/job/node-test-commit-linux-containered/21411/nodes=ubi81_sharedlibs_openssl111fips_x64/testReport/junit/(root)/test/parallel_test_crypto_dh/ internal/crypto/diffiehellman.js:178
this[kHandle].setPublicKey(toBuf(key, encoding));
^
Error: Failed to convert Buffer to EC_POINT
at ECDH.setPublicKey (internal/crypto/diffiehellman.js:178:17)
at Object.<anonymous> (/home/iojs/build/workspace/node-test-commit-linux-containered/test/parallel/test-crypto-dh.js:316:9)
at Module._compile (internal/modules/cjs/loader.js:1250:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1271:10)
at Module.load (internal/modules/cjs/loader.js:1099:32)
at Function.Module._load (internal/modules/cjs/loader.js:964:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
at internal/main/run_main_module.js:17:47
|
Sorry, something went wrong.
|
I ran the test about 100,000 times locally without errors, so the error seems to be platform-specific. CI stress test: https://ci.nodejs.org/job/node-stress-single-test/167/
10:56:17 not ok 1 parallel/test-crypto-dh 10:56:17 --- 10:56:17 duration_ms: 1.313 10:56:17 severity: crashed 10:56:17 exitcode: -11 10:56:17 stack: |- 10:56:17 ...
11:15:26 not ok 1 parallel/test-crypto-dh 11:15:26 --- 11:15:26 duration_ms: 2.214 11:15:26 severity: fail 11:15:26 exitcode: 1 11:15:26 stack: |- 11:15:26 internal/crypto/diffiehellman.js:178 11:15:26 this[kHandle].setPublicKey(toBuf(key, encoding)); 11:15:26 ^ 11:15:26 11:15:26 Error: Failed to convert Buffer to EC_POINT 11:15:26 at ECDH.setPublicKey (internal/crypto/diffiehellman.js:178:17) 11:15:26 at Object.<anonymous> (C:\workspace\node-stress-single-test\nodes\win10-vs2019\test\parallel\test-crypto-dh.js:316:9) 11:15:26 at Module._compile (internal/modules/cjs/loader.js:1252:30) 11:15:26 at Object.Module._extensions..js (internal/modules/cjs/loader.js:1273:10) 11:15:26 at Module.load (internal/modules/cjs/loader.js:1101:32) 11:15:26 at Function.Module._load (internal/modules/cjs/loader.js:966:14) 11:15:26 at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12) 11:15:26 at internal/main/run_main_module.js:17:47 11:15:26 ... 11:43:04 not ok 1 parallel/test-crypto-dh
11:43:04 ---
11:43:04 duration_ms: 2.113
11:43:04 severity: fail
11:43:04 exitcode: 1
11:43:04 stack: |-
11:43:04 internal/crypto/diffiehellman.js:127
11:43:04 throw new ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY();
11:43:04 ^
11:43:04
11:43:04 Error [ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY]: Public key is not valid for specified curve
11:43:04 at new NodeError (internal/errors.js:253:15)
11:43:04 at ECDH.dhComputeSecret [as computeSecret] (internal/crypto/diffiehellman.js:127:11)
11:43:04 at Object.<anonymous> (C:\workspace\node-stress-single-test\nodes\win10-vs2019\test\parallel\test-crypto-dh.js:360:28)
11:43:04 at Module._compile (internal/modules/cjs/loader.js:1252:30)
11:43:04 at Object.Module._extensions..js (internal/modules/cjs/loader.js:1273:10)
11:43:04 at Module.load (internal/modules/cjs/loader.js:1101:32)
11:43:04 at Function.Module._load (internal/modules/cjs/loader.js:966:14)
11:43:04 at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
11:43:04 at internal/main/run_main_module.js:17:47 {
11:43:04 code: 'ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY'
11:43:04 }
11:43:04 ...
New stress test with a few more platforms: https://ci.nodejs.org/job/node-stress-single-test/168/
Seems like a memory-related bug. Can reproduce in valgrind on Ubuntu. |
Sorry, something went wrong.
The previous code changed the private key of the ECDH object, but removed the public key if deriving it from the private key failed. Instead, if deriving the public key fails, neither the private nor the public key stored in the ECDH object should be updated.
Sorry, something went wrong.
|
Landed in 4a9e312, thanks for reviewing. |
Sorry, something went wrong.
The previous code changed the private key of the ECDH object, but removed the public key if deriving it from the private key failed. Instead, if deriving the public key fails, neither the private nor the public key stored in the ECDH object should be updated. PR-URL: #34302 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
The previous code changed the private key of the ECDH object, but removed the public key if deriving it from the private key failed. Instead, if deriving the public key fails, neither the private nor the public key stored in the ECDH object should be updated. PR-URL: #34302 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
The previous code changed the private key of the ECDH object, but removed the public key if deriving it from the private key failed. Instead, if deriving the public key fails, neither the private nor the public key stored in the ECDH object should be updated. PR-URL: #34302 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
The previous code changed the private key of the ECDH object, but removed the public key if deriving it from the private key failed. Instead, if deriving the public key fails, neither the private nor the public key stored in the ECDH object should be updated. PR-URL: #34302 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
The previous code changed the private key of the ECDH object, but removed the public key if deriving it from the private key failed. Instead, if deriving the public key fails, neither the private nor the public key stored in the ECDH object should be updated. PR-URL: #34302 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
| Back | FazBrowse Home | New Git URL |
The previous code changed the private key of the ECDH object, but removed the public key if deriving it from the private key failed. Instead, if deriving the public key fails, neither the private nor the public key stored in the ECDH object should be updated.
Checklist