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

There is a memory leak defect on line 134 of /openssl/test/threadpool_test.c. #24104

Closed
LuMingYinDetect opened this issue Apr 11, 2024 · 0 comments
Labels
branch: master Merge to master branch branch: 3.2 Merge to openssl-3.2 branch: 3.3 Merge to openssl-3.3 triaged: bug The issue/pr is/fixes a bug

Comments

@LuMingYinDetect
Copy link

1.On line 103 of the file /openssl/test/threadpool_test.c, a pointer variable named 'cust_ctx' is defined and dynamic memory is allocated for it through the function OSSL_LIB_CTX_new. When the if statement on line 133 returns true, the program will return on line 134, thereby bypassing the release operation on the dynamic memory area pointed to by the 'cust_ctx' pointer on line 239. This constitutes a memory leak defect, as shown in the diagram below:
https://github.com/LuMingYinDetect/openssl_defects/blob/main/openssl_10.png

@LuMingYinDetect LuMingYinDetect added the issue: bug report The issue was opened to report a bug label Apr 11, 2024
@nhorman nhorman added the triaged: bug The issue/pr is/fixes a bug label Apr 11, 2024
coolshrid added a commit to coolshrid/openssl that referenced this issue Apr 28, 2024
coolshrid added a commit to coolshrid/openssl that referenced this issue Apr 28, 2024
@t8m t8m added branch: master Merge to master branch branch: 3.2 Merge to openssl-3.2 branch: 3.3 Merge to openssl-3.3 and removed issue: bug report The issue was opened to report a bug labels Apr 29, 2024
coolshrid added a commit to coolshrid/openssl that referenced this issue Apr 30, 2024
openssl-machine pushed a commit that referenced this issue May 22, 2024
Fixes #24104

Added a goto label for cleanup.

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #24412)

(cherry picked from commit 4dbd492)
openssl-machine pushed a commit that referenced this issue May 22, 2024
Fixes #24104

Added a goto label for cleanup.

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #24412)

(cherry picked from commit 4dbd492)
jvdsn pushed a commit to jvdsn/openssl that referenced this issue Jun 3, 2024
Fixes openssl#24104

Added a goto label for cleanup.

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from openssl#24412)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch: master Merge to master branch branch: 3.2 Merge to openssl-3.2 branch: 3.3 Merge to openssl-3.3 triaged: bug The issue/pr is/fixes a bug
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants