GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — crypto: fix CipherBase Update int32 overflow by marco-ippolito · Pull Request #45769 · nodejs/node

Conversation

@marco-ippolito

@marco-ippolito marco-ippolito commented Dec 7, 2022

Copy link
Copy Markdown
Member

resolves: #45757
I've followed @bnoordhuis solution and added a test
Now will throw the default error:
ThrowCryptoError(env, ERR_get_error(), "Trying to add data in unsupported state");

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bricss reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@marco-ippolito
crypto: fix CipherBase Update int32 overflow
f439605
@nodejs-github-bot

nodejs-github-bot commented Dec 7, 2022

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/crypto
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. crypto Issues and PRs related to the crypto subsystem. needs-ci PRs that need a full CI run. labels Dec 7, 2022
addaleax
addaleax approved these changes Dec 7, 2022
View reviewed changes
@addaleax addaleax added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Dec 7, 2022
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Dec 7, 2022
@nodejs-github-bot

This comment was marked as outdated.

Sign in to view
@nodejs-github-bot

This comment was marked as outdated.

Sign in to view
panva
panva approved these changes Dec 7, 2022
View reviewed changes
@panva panva added author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue PRs queued for automated landing through the Commit Queue. and removed author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue PRs queued for automated landing through the Commit Queue. labels Dec 7, 2022
@panva

panva commented Dec 7, 2022

Copy link
Copy Markdown
Member

There are builds that do not end up with the correct error that need to be handled before this can land.

node:assert:636
      throw err;
      ^

AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected

  Comparison {
+   name: 'RangeError'
-   name: 'Error'
  }
    at Object.<anonymous> (/home/iojs/build/workspace/node-test-commit-arm/test/parallel/test-crypto-cipheriv-decipheriv.js:221:10)
    at Module._compile (node:internal/modules/cjs/loader:1218:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
    at Module.load (node:internal/modules/cjs/loader:1081:32)
    at Module._load (node:internal/modules/cjs/loader:922:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:82:12)
    at node:internal/main/run_main_module:23:47 {
  generatedMessage: true,
  code: 'ERR_ASSERTION',
  actual: RangeError [ERR_INVALID_ARG_VALUE]: The argument 'size' is invalid. Received 2147483647
      at Function.allocUnsafeSlow (node:buffer:393:3)
      at assert.throws.name (/home/iojs/build/workspace/node-test-commit-arm/test/parallel/test-crypto-cipheriv-decipheriv.js:222:18)
      at getActual (node:assert:757:5)
      at Function.throws (node:assert:903:24)
      at Object.<anonymous> (/home/iojs/build/workspace/node-test-commit-arm/test/parallel/test-crypto-cipheriv-decipheriv.js:221:10)
      at Module._compile (node:internal/modules/cjs/loader:1218:14)
      at Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
      at Module.load (node:internal/modules/cjs/loader:1081:32)
      at Module._load (node:internal/modules/cjs/loader:922:12)
      at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:82:12) {
    code: 'ERR_INVALID_ARG_VALUE'
  },
  expected: { name: 'Error' },
  operator: 'throws'
}
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

panva
panva reviewed Dec 7, 2022
View reviewed changes
Comment thread test/parallel/test-crypto-cipheriv-decipheriv.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

@panva
Update test/parallel/test-crypto-cipheriv-decipheriv.js
e9c81a8
@panva panva added author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue PRs queued for automated landing through the Commit Queue. commit-queue-squash PRs the Commit Queue should land as one squashed commit. request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. labels Dec 7, 2022
panva
panva approved these changes Dec 7, 2022
View reviewed changes
@marco-ippolito

marco-ippolito commented Dec 7, 2022

Copy link
Copy Markdown
Member Author

probably on some builds it exceeds the kMaxLength I'll look into it

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@panva

panva commented Dec 7, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

probably on some builds it exceeds the kMaxLength I'll look into it

already done, this is good to go 👍

marco-ippolito reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Dec 7, 2022
@nodejs-github-bot

nodejs-github-bot commented Dec 7, 2022

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/48324/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

lpinca
lpinca approved these changes Dec 7, 2022
View reviewed changes
bnoordhuis
bnoordhuis approved these changes Dec 7, 2022
View reviewed changes
Comment thread test/parallel/test-crypto-cipheriv-decipheriv.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

ShogunPanda
ShogunPanda approved these changes Dec 9, 2022
View reviewed changes

@ShogunPanda ShogunPanda left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Dec 9, 2022
@nodejs-github-bot
nodejs-github-bot merged commit 5fe0795 into nodejs:main Dec 9, 2022
@nodejs-github-bot

nodejs-github-bot commented Dec 9, 2022

Copy link
Copy Markdown
Collaborator

Landed in 5fe0795

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

targos pushed a commit that referenced this pull request Dec 12, 2022
@marco-ippolito @targos
crypto: fix CipherBase Update int32 overflow
556b270
PR-URL: #45769
Fixes: #45757
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Paolo Insogna <[email protected]>
@targos targos mentioned this pull request Dec 12, 2022
v19.3.0 release proposal #45831
Merged
targos pushed a commit that referenced this pull request Dec 13, 2022
@marco-ippolito @targos
crypto: fix CipherBase Update int32 overflow
2e4d37e
PR-URL: #45769
Fixes: #45757
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Paolo Insogna <[email protected]>
@danielleadams danielleadams mentioned this pull request Dec 30, 2022
v18.13.0 release proposal #46025
Merged
danielleadams pushed a commit that referenced this pull request Dec 30, 2022
@marco-ippolito @danielleadams
crypto: fix CipherBase Update int32 overflow
64f36d0
PR-URL: #45769
Fixes: #45757
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Paolo Insogna <[email protected]>
danielleadams pushed a commit that referenced this pull request Jan 3, 2023
@marco-ippolito @danielleadams
crypto: fix CipherBase Update int32 overflow
2fbf956
PR-URL: #45769
Fixes: #45757
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Paolo Insogna <[email protected]>
danielleadams pushed a commit that referenced this pull request Jan 5, 2023
@marco-ippolito @danielleadams
crypto: fix CipherBase Update int32 overflow
ae6f377
PR-URL: #45769
Fixes: #45757
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Paolo Insogna <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@panva panva panva approved these changes
@ShogunPanda ShogunPanda ShogunPanda approved these changes
@bnoordhuis bnoordhuis bnoordhuis approved these changes
@addaleax addaleax addaleax approved these changes
@lpinca lpinca lpinca approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. c++ Issues and PRs that require attention from people who are familiar with C++. commit-queue-squash PRs the Commit Queue should land as one squashed commit. crypto Issues and PRs related to the crypto subsystem. needs-ci PRs that need a full CI run.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

crypto: cipher update process crash with input of max int32 length

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@marco-ippolito @nodejs-github-bot @panva @ShogunPanda @bnoordhuis @addaleax @lpinca
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.