Skip to content

Fix a possible memleak in eckey_priv_encode - #22007

Closed
bernd-edlinger wants to merge 4 commits into
openssl:OpenSSL_1_1_1-stablefrom
bernd-edlinger:fix_memleak_in_eckey_priv_encode
Closed

bernd-edlinger wants to merge 4 commits into
openssl:OpenSSL_1_1_1-stablefrom
bernd-edlinger:fix_memleak_in_eckey_priv_encode

Conversation

@bernd-edlinger

Copy link
Copy Markdown
Member

Additionally use OPENSSL_clear_free on the private key data in case of error.

master has the memory leak already fixed, just the clear free on the private key is missing.

Additionally use OPENSSL_clear_free on the private
key data in case of error.
@bernd-edlinger bernd-edlinger added the branch: 1.1.1 Applies to OpenSSL_1_1_1-stable branch (EOL) label Sep 7, 2023
That seems to be only an issue for RSA-PSS with parameters.
Spotted by code review, so it looks like there is no test coverage for this.
@t8m t8m added approval: review pending This pull request needs review by a committer approval: otc review pending triaged: bug The issue/pr is/fixes a bug tests: exempted The PR is exempt from requirements for testing labels Sep 8, 2023

@t8m t8m left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

OK, if you promise to create the patch for master.

@t8m
t8m requested a review from a team September 8, 2023 07:18
@t8m

t8m commented Sep 8, 2023

Copy link
Copy Markdown
Member

It needs review from committers ASAP if it should get into 1.1.1

@hlandau hlandau added approval: done This pull request has the required number of approvals and removed approval: review pending This pull request needs review by a committer labels Sep 8, 2023
@openssl-machine openssl-machine added approval: ready to merge The 24 hour grace period has passed, ready to merge and removed approval: done This pull request has the required number of approvals labels Sep 9, 2023
@openssl-machine

Copy link
Copy Markdown
Collaborator

This pull request is ready to merge

@bernd-edlinger

Copy link
Copy Markdown
Member Author

Merged to 1.1.1 branch. Thanks!

openssl-machine pushed a commit that referenced this pull request Sep 9, 2023
Additionally use OPENSSL_clear_free on the private
key data in case of error.

Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Hugo Landau <[email protected]>
(Merged from #22007)
openssl-machine pushed a commit that referenced this pull request Sep 9, 2023
That seems to be only an issue for RSA-PSS with parameters.
Spotted by code review, so it looks like there is no test coverage for this.

Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Hugo Landau <[email protected]>
(Merged from #22007)
wanghao75 pushed a commit to openeuler-mirror/openssl that referenced this pull request Sep 18, 2023
Additionally use OPENSSL_clear_free on the private
key data in case of error.

Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Hugo Landau <[email protected]>
(Merged from openssl/openssl#22007)

Signed-off-by: Huiyue Xu <[email protected]>
wanghao75 pushed a commit to openeuler-mirror/openssl that referenced this pull request Sep 18, 2023
That seems to be only an issue for RSA-PSS with parameters.
Spotted by code review, so it looks like there is no test coverage for this.

Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Hugo Landau <[email protected]>
(Merged from openssl/openssl#22007)

Signed-off-by: Huiyue Xu <[email protected]>
a-kromm-rogii pushed a commit to a-kromm-rogii/openssl that referenced this pull request Mar 14, 2025
Additionally use OPENSSL_clear_free on the private
key data in case of error.

Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Hugo Landau <[email protected]>
(Merged from openssl#22007)
a-kromm-rogii pushed a commit to a-kromm-rogii/openssl that referenced this pull request Mar 14, 2025
That seems to be only an issue for RSA-PSS with parameters.
Spotted by code review, so it looks like there is no test coverage for this.

Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Hugo Landau <[email protected]>
(Merged from openssl#22007)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval: ready to merge The 24 hour grace period has passed, ready to merge branch: 1.1.1 Applies to OpenSSL_1_1_1-stable branch (EOL) tests: exempted The PR is exempt from requirements for testing triaged: bug The issue/pr is/fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants