Skip to content

crypto: handle cipher context allocation failures#63542

Open
Herrtian wants to merge 1 commit into
nodejs:mainfrom
Herrtian:guard-openssl-alloc-failures
Open

crypto: handle cipher context allocation failures#63542
Herrtian wants to merge 1 commit into
nodejs:mainfrom
Herrtian:guard-openssl-alloc-failures

Conversation

@Herrtian
Copy link
Copy Markdown

Fixes: #62774

Handle failed cipher context allocation without hitting CHECK() in crypto/webcrypto paths. The WebCrypto helpers now return FAILED and CipherBase reports a crypto operation error.

No dedicated regression test because this requires forcing OpenSSL allocation failure.

Checks:

  • py -3 tools\cpplint.py --quiet src\crypto\crypto_aes.cc src\crypto\crypto_chacha20_poly1305.cc src\crypto\crypto_cipher.cc
  • git diff --check

Signed-off-by: Herrtian <70463940+Herrtian@users.noreply.github.com>
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/crypto

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels May 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

crypto,quic: missing NULL checks for OpenSSL allocation functions

3 participants