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

Full configuration leads to server side memory errors #2069

Closed
simonbutcher opened this issue Oct 9, 2018 · 4 comments
Closed

Full configuration leads to server side memory errors #2069

simonbutcher opened this issue Oct 9, 2018 · 4 comments

Comments

@simonbutcher
Copy link
Contributor

simonbutcher commented Oct 9, 2018

Description

  • Type: Bug
  • Priority: Major

Bug

OS
Mbed OS|linux|windows|

mbed TLS build:
Version: Commit 0592ea7

With a full configuration, compat.sh fails with multiple memory errors. To reproduce:

  1. ./scripts/config.pl full
  2. make clean; make
  3. cd tests; ./compat.sh --memcheck

The result is a total of 78 server memory errors!

@hanno-becker
Copy link

First test reporting memory errors for me is

./tests/compat.sh --memcheck --filter "ECDH-ECDSA-AES256-SHA" -p OpenSSL -m tls1 -V no -v

@hanno-becker
Copy link

@sbutcher-arm This fails for 2.7 and 2.1, too, so it looks like an old problem going unnoticed so far.

@ciarmcom
Copy link

ciarmcom commented Oct 9, 2018

ARM Internal Ref: IOTSSL-2569

hanno-becker pushed a commit to hanno-becker/mbedtls that referenced this issue Oct 9, 2018
If `MBEDTLS_MEMORY_BUFFER_ALLOC_C` is configured and Mbed TLS'
custom buffer allocator is used for calloc() and free(), the
read buffer used by the server example application is allocated
from the buffer allocator, but freed after the buffer allocator
has been destroyed. If memory backtracing is enabled, this leaves
a memory leak in the backtracing structure allocated for the buffer,
as found by valgrind.

Fixes Mbed-TLS#2069.
hanno-becker pushed a commit to hanno-becker/mbedtls that referenced this issue Oct 9, 2018
If `MBEDTLS_MEMORY_BUFFER_ALLOC_C` is configured and Mbed TLS'
custom buffer allocator is used for calloc() and free(), the
read buffer used by the server example application is allocated
from the buffer allocator, but freed after the buffer allocator
has been destroyed. If memory backtracing is enabled, this leaves
a memory leak in the backtracing structure allocated for the buffer,
as found by valgrind.

Fixes Mbed-TLS#2069.
hanno-becker pushed a commit to hanno-becker/mbedtls that referenced this issue Oct 9, 2018
If `MBEDTLS_MEMORY_BUFFER_ALLOC_C` is configured and Mbed TLS'
custom buffer allocator is used for calloc() and free(), the
read buffer used by the server example application is allocated
from the buffer allocator, but freed after the buffer allocator
has been destroyed. If memory backtracing is enabled, this leaves
a memory leak in the backtracing structure allocated for the buffer,
as found by valgrind.

Fixes Mbed-TLS#2069.
@hanno-becker
Copy link

Fixed by #2070.

@AndrzejKurek AndrzejKurek changed the title Fully configuration leads to server side memory errors Full configuration leads to server side memory errors Oct 10, 2018
simonbutcher added a commit that referenced this issue Oct 30, 2018
The fix for #2069 had accidentally been added to features, not bugfixes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants