Skip to content

openssl: bail out early on bignum OOM in ssh2_rsa_new(), ssh2_dsa_new() with OpenSSL 3+ - #2566

Closed
vszakats wants to merge 1 commit into
libssh2:masterfrom
vszakats:ossl-oom-rsa-dsa-new
Closed

vszakats wants to merge 1 commit into
libssh2:masterfrom
vszakats:ossl-oom-rsa-dsa-new

Conversation

@vszakats

@vszakats vszakats commented Aug 29, 2026 •

Copy link
Copy Markdown
Member

Also: delete stray unused session suppression.

Reported by Copilot
Bug: #2564 (comment)
Bug: #2564 (comment)
Follow-up to b0ab005 #1207

…new()`

Also: delete stray unused `session` suppression.

Reported by Copilot
Bug: libssh2#2564 (comment)
Bug: libssh2#2564 (comment)
@vszakats
vszakats requested a balanced review from Copilot August 29, 2026 00:38
@vszakats vszakats changed the title openssl: bail out early on bignum OOM in ssh2_rsa_new(), ssh2_dsa_new() openssl: bail out early on bignum OOM in ssh2_rsa_new(), ssh2_dsa_new() with OpenSSL 3+ Aug 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Prevents RSA/DSA constructors from continuing after bignum buffer allocation failures.

Changes:

  • Adds early cleanup on OpenSSL 3 allocation failures.
  • Initializes output contexts before fallible operations.
  • Removes an obsolete unused-parameter suppression.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@vszakats vszakats closed this in eabe683 Aug 29, 2026
@vszakats
vszakats deleted the ossl-oom-rsa-dsa-new branch August 29, 2026 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants