Skip to content
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: fix output of privateDecrypt with zero-length data #57575

Merged
merged 3 commits into from
Apr 1, 2025

Conversation

panva
Copy link
Member

@panva panva commented Mar 21, 2025

closes #57553
closes #57572
closes #57558
refs #56653

@panva panva added confirmed-bug Issues with confirmed bugs. crypto Issues and PRs related to the crypto subsystem. webcrypto labels Mar 21, 2025
@panva panva requested a review from jasnell March 21, 2025 13:37
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/crypto
  • @nodejs/security-wg

@nodejs-github-bot nodejs-github-bot added dependencies Pull requests that update a dependency file. needs-ci PRs that need a full CI run. labels Mar 21, 2025
This was referenced Mar 21, 2025
@nodejs-github-bot

This comment was marked as outdated.

Copy link

codecov bot commented Mar 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.22%. Comparing base (afe3909) to head (556183f).
Report is 31 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #57575      +/-   ##
==========================================
- Coverage   90.24%   90.22%   -0.03%     
==========================================
  Files         630      630              
  Lines      185013   185054      +41     
  Branches    36249    36251       +2     
==========================================
- Hits       166969   166961       -8     
- Misses      10996    11030      +34     
- Partials     7048     7063      +15     

see 32 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@panva panva added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Mar 21, 2025
@nodejs-github-bot

This comment was marked as outdated.

@anonrig anonrig added the commit-queue Add this label to land a pull request using GitHub Actions. label Mar 21, 2025
Copy link
Member

@tniessen tniessen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Optional nit: I'd prefer the test to have a less generic name, and ideally a reference to the GitHub issue describing the bug, but this is optional. For example, you could rename to test-crypto-oaep-zero-length and add a comment with a reference to the issue or rename to test-crypto-oaep-issue-57553 or so.

@panva
Copy link
Member Author

panva commented Mar 21, 2025

@tniessen thank you, I will take care of it if CI happens to fail again, otherwise in a followup PR.

@panva panva added request-ci Add this label to start a Jenkins CI on a PR. and removed commit-queue Add this label to land a pull request using GitHub Actions. request-ci Add this label to start a Jenkins CI on a PR. labels Mar 21, 2025
@aduh95 aduh95 removed the request-ci Add this label to start a Jenkins CI on a PR. label Mar 31, 2025
@panva panva added the commit-queue Add this label to land a pull request using GitHub Actions. label Mar 31, 2025
@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Mar 31, 2025
@nodejs-github-bot
Copy link
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/57575
✔  Done loading data for nodejs/node/pull/57575
----------------------------------- PR info ------------------------------------
Title      crypto: fix output of privateDecrypt with zero-length data (#57575)
Author     Filip Skokan <[email protected]> (@panva)
Branch     panva:fix-57553 -> nodejs:main
Labels     confirmed-bug, crypto, author ready, needs-ci, dependencies, webcrypto, commit-queue-squash
Commits    3
 - crypto: fix output of privateDecrypt with zero-length data
 - fixup! crypto: fix output of privateDecrypt with zero-length data
 - fixup! crypto: fix output of privateDecrypt with zero-length data
Committers 1
 - Filip Skokan <[email protected]>
PR-URL: https://github.com/nodejs/node/pull/57575
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/57575
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
--------------------------------------------------------------------------------
   ⚠  Commits were pushed since the last approving review:
   ⚠  - crypto: fix output of privateDecrypt with zero-length data
   ⚠  - fixup! crypto: fix output of privateDecrypt with zero-length data
   ⚠  - fixup! crypto: fix output of privateDecrypt with zero-length data
   ℹ  This PR was created on Fri, 21 Mar 2025 13:37:08 GMT
   ✔  Approvals: 4
   ✔  - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/57575#pullrequestreview-2705979199
   ✔  - Luigi Pinca (@lpinca): https://github.com/nodejs/node/pull/57575#pullrequestreview-2706110397
   ✔  - Yagiz Nizipli (@anonrig) (TSC): https://github.com/nodejs/node/pull/57575#pullrequestreview-2706396429
   ✔  - Tobias Nießen (@tniessen) (TSC): https://github.com/nodejs/node/pull/57575#pullrequestreview-2706526720
   ✔  Last GitHub CI successful
   ℹ  Last Full PR CI on 2025-03-31T18:32:13Z: https://ci.nodejs.org/job/node-test-pull-request/65913/
- Querying data for job/node-test-pull-request/65913/
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/14180649182

@panva panva removed the commit-queue-failed An error occurred while landing this pull request using GitHub Actions. label Mar 31, 2025
Copy link
Member

@RaisinTen RaisinTen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RSLGTM

@panva panva added the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 1, 2025
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 1, 2025
@nodejs-github-bot nodejs-github-bot merged commit 12b81df into nodejs:main Apr 1, 2025
71 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 12b81df

@panva panva deleted the fix-57553 branch April 1, 2025 09:15
aduh95 pushed a commit that referenced this pull request Apr 1, 2025
closes #57553
closes #57572
closes #57558

PR-URL: #57575
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
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. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. confirmed-bug Issues with confirmed bugs. crypto Issues and PRs related to the crypto subsystem. dependencies Pull requests that update a dependency file. needs-ci PRs that need a full CI run. webcrypto
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rsa-oaep decrypt the ciphertext (an empty string) got an unexpected string
8 participants