-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Memory leak in cert_write example program #1422
Labels
Comments
ARM Internal Ref: IOTSSL-2152 |
hanno-becker
pushed a commit
to hanno-becker/mbedtls
that referenced
this issue
Oct 5, 2018
* The variables `csr` and `issuer_crt` are initialized but not freed. * The variable `entropy` is unconditionally freed in the cleanup section but there's a conditional jump to that section before its initialization. This cmmot Moves it to the other initializations happening before the first conditional jump to the cleanup section. Fixes Mbed-TLS#1422.
hanno-becker
pushed a commit
to hanno-becker/mbedtls
that referenced
this issue
Oct 5, 2018
* The variables `csr` and `issuer_crt` are initialized but not freed. * The variable `entropy` is unconditionally freed in the cleanup section but there's a conditional jump to that section before its initialization. This cmmot Moves it to the other initializations happening before the first conditional jump to the cleanup section. Fixes Mbed-TLS#1422.
hanno-becker
pushed a commit
to hanno-becker/mbedtls
that referenced
this issue
Oct 5, 2018
* The variables `csr` and `issuer_crt` are initialized but not freed. * The variable `entropy` is unconditionally freed in the cleanup section but there's a conditional jump to that section before its initialization. This cmmot Moves it to the other initializations happening before the first conditional jump to the cleanup section. Fixes Mbed-TLS#1422.
This was referenced Oct 5, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue: The programs/x509/cert_write example program doesn't free the CSR and issuer CRT structures
csr
resp.issuer_crt
after use. Their initialization happens here and here, but the cleanup section omits them.This leads to a memory leak when running
programs/x509/cert_write
with either therequest_file
or theissuer_crt
argument set, as witnessed by a run with address sanitizer enabled.The text was updated successfully, but these errors were encountered: