-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crypto issues on Ubuntu 22.04 - Assertion `errors->Empty()' failed #42919
Comments
potentially related (similar error output) #38883 |
@nodejs/crypto |
@Koulwa can you try with the node binary from https://nodejs.org/ instead of the nodesource build? edit: please post the stack trace it prints, assuming it also fails. |
Sure thing. Same setup as before (Docker 22.04 jammy) Heres's that output.
|
Thanks. This indeed seems to be related to #38883. The fix from #38913 was applied to the CBC and GCM code paths but not CTR. This check looks defective to me: node/src/crypto/crypto_cipher.h Lines 261 to 262 in ec1c616
It's saying "EITHER we have output and no errors OR no output and one or more errors" but there can be both output and errors, e.g., if if the final block isn't properly padded. @nodejs/crypto do you concur? |
any solution? |
I ran into this error on previously working code and found this issue. @Koulwa's cryptoTest.js script unfortunately crashes with the same Assertion `errors->Empty()' error for me on Windows 10 with node v16.15.1. Here is my stack trace if it helps:
|
Any update on this? |
I haven't been able to reproduce this on Ubuntu 20.04 or Ubuntu 22.04. Could you please post the output of |
@xkid1 Please try again with the latest v16.x release. |
I will try node:16.17.0, then wait for may feedback |
@bnoordhuis node 16.17.0 is now working |
Cool, good to hear. I'll close this then. |
Oh, @tniessen, what are your thoughts on #42919 (comment)? |
Version
v16.15.0
Platform
Linux 99eba3b487e3 5.13.0-27-generic #29~20.04.1-Ubuntu SMP Fri Jan 14 00:32:30 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
crypto/crypto_cipher.h:262:v8::Maybe node::crypto::CipherJob::ToResult(v8::Localv8::Value, v8::Localv8::Value)
What steps will reproduce the bug?
Test Script: <some_dir>/test/cryptoTest.js
Steps to setup:
How often does it reproduce? Is there a required condition?
Reproducible only on Ubuntu 22.04, confirmed via host OS hard install and in docker for ubuntu 22.04 Jammy
What is the expected behavior?
When run in 20.04 (host OS and docker confirmed)
What do you see instead?
When run in 22.04 (host OS and docker confirmed)
Additional information
A quick mini example is based off:
https://stackoverflow.com/questions/25725596/use-window-crypto-in-nodejs-code
This issue was found in production code dealing with subtle, decrypt. The toy example is just to make the issue more concrete and easier to test. We are seeing this issue with other methods, AES-CTR, AES-GCM
The text was updated successfully, but these errors were encountered: