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

Missing context freeing operation at the end of aes_crypt_xts_size #4176

Closed
french7181 opened this issue Feb 25, 2021 · 0 comments · Fixed by #4676
Closed

Missing context freeing operation at the end of aes_crypt_xts_size #4176

french7181 opened this issue Feb 25, 2021 · 0 comments · Fixed by #4676
Labels
bug good-first-issue Good for newcomers help-wanted This issue is not being actively worked on, but PRs welcome.

Comments

@french7181
Copy link

Description

  • Type: Bug
  • Priority: Minor

Bug

OS
Mbed OS|linux|windows|

mbed TLS build:
Version: 2.25.0 / git commit 55d97f2

In function "void aes_crypt_xts_size( int size, int retval )" in tests/suite/test_suite_aes.function the aes_xts context is initialized but never freed. The following lines should be added:
exit:
mbedtls_aes_xts_free(&ctx);

Spotted since in the alternate implementation we have running under ucLinux on an NXP Kinetis K61, which makes usage of the mmcau hardware accelerator, we open a device when the context is initialized and the device was never freed.

@yanesca yanesca added the help-wanted This issue is not being actively worked on, but PRs welcome. label Apr 6, 2021
JoeSubbiani added a commit to JoeSubbiani/mbedtls that referenced this issue Jun 17, 2021
in file tests/suite/test_suite_aes.function, aes_crypt_xts_size()
did not free the context upon the function exit.
The function now frees the context on exit.

Fixes Mbed-TLS#4176
JoeSubbiani added a commit to JoeSubbiani/mbedtls that referenced this issue Jun 17, 2021
in file tests/suite/test_suite_aes.function, aes_crypt_xts_size()
did not free the context upon the function exit.
The function now frees the context on exit.

Fixes Mbed-TLS#4176

Signed-off-by: JoeSubbiani <[email protected]>
JoeSubbiani added a commit to JoeSubbiani/mbedtls that referenced this issue Jun 17, 2021
in file tests/suite/test_suite_aes.function, aes_crypt_xts_size()
did not free the context upon the function exit.
The function now frees the context on exit.

Fixes Mbed-TLS#4176

Signed-off-by: JoeSubbiani <[email protected]>
JoeSubbiani added a commit to JoeSubbiani/mbedtls that referenced this issue Jun 18, 2021
in file tests/suite/test_suite_aes.function, aes_crypt_xts_size()
did not free the context upon the function exit.
The function now frees the context on exit.

Already resolved for 2.x and development - this is a backport for
2.16

Fixes Mbed-TLS#4176

Signed-off-by: JoeSubbiani <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good-first-issue Good for newcomers help-wanted This issue is not being actively worked on, but PRs welcome.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants