Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Copy link
Copy link
@LongTengDao

Description

@LongTengDao
Issue body actions

Version

v18.12.0

Platform

No response

Subsystem

crypto

What steps will reproduce the bug?

try {
    require('crypto')
    .createCipheriv('aes-128-gcm', Buffer.alloc(16), Buffer.alloc(12))
    .update(Buffer.allocUnsafeSlow(2**31-1));
}
catch (error) {
    console.error(error);
}

How often does it reproduce? Is there a required condition?

Every time.

What is the expected behavior?

Throw a normal catchable error like size>=2**31 do, or work right like size<=2**31.

What do you see instead?

Only size===2**31-1 will cause an uncatchable process crash.

Additional information

No response

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.cryptoIssues and PRs related to the crypto subsystem.Issues and PRs related to the crypto subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.