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
@addaleax addaleax added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels May 26, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label May 26, 2026
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. 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

5 participants