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

Fix EVP_MD_meth_dup and EVP_CIPHER_meth_dup #16159

Closed
wants to merge 3 commits into from

Conversation

mattcaswell
Copy link
Member

Make sure the origin is set correctly when duping an EVP_MD or EVP_CIPHER.

Fixes #16157

Make sure the origin is set correctly when duping an EVP_MD or EVP_CIPHER.

Fixes openssl#16157
@mattcaswell mattcaswell added branch: master Merge to master branch approval: review pending This pull request needs review by a committer labels Jul 26, 2021
@mattcaswell mattcaswell added this to the 3.0.0 milestone Jul 26, 2021
@beldmit
Copy link
Member

beldmit commented Jul 26, 2021

@mattcaswell, isn't it worth adding an asan test according to #16157?

Copy link
Member

@beldmit beldmit left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions github-actions bot added the severity: fips change The pull request changes FIPS provider sources label Jul 26, 2021
@beldmit beldmit 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 Jul 26, 2021
@paulidale
Copy link
Contributor

Does this warrant a test case?

Check that EVP_MD_meth_free() and EVP_CIPHER_meth_free() does actually
free the data.
@mattcaswell
Copy link
Member Author

Test case added. Please reconfirm.

@beldmit
Copy link
Member

beldmit commented Jul 27, 2021

no-deprecated failure seems relevant

@mattcaswell
Copy link
Member Author

Fixup pushed to address the no-deprecated problem.

@beldmit
Copy link
Member

beldmit commented Jul 27, 2021

Formal reapprove.

@openssl-machine
Copy link
Collaborator

24 hours has passed since 'approval: done' was set, but as this PR has been updated in that time the label 'approval: ready to merge' is not being automatically set. Please review the updates and set the label manually.

@paulidale
Copy link
Contributor

Merged to master, thanks for this.

@paulidale paulidale closed this Jul 27, 2021
openssl-machine pushed a commit that referenced this pull request Jul 27, 2021
Make sure the origin is set correctly when duping an EVP_MD or EVP_CIPHER.

Fixes #16157

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from #16159)
openssl-machine pushed a commit that referenced this pull request Jul 27, 2021
Check that EVP_MD_meth_free() and EVP_CIPHER_meth_free() does actually
free the data.

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from #16159)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approval: done This pull request has the required number of approvals branch: master Merge to master branch severity: fips change The pull request changes FIPS provider sources
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EVP_MD_meth_dup() on global EVP_MDs leaks memory in OpenSSL 3.0
4 participants