Skip to contentSkip to conversation

tpm2 Digest, Vol 26, Issue 12

tpm2 Roberts 1 participant 1 message Aug 26, 2019 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Roberts

#1 lore raw
Quoted 2 lines

Hi Robert,
Thank you for the link, as calling those functions resolved my leaks.

+ list the question here is if the ESAPI Esys_Finalize() call should be doing this?

I would say yes, what do you say Andreas?

Quoted 155 lines

Timothy

On 8/23/19, 10:47 AM, "Roberts, William C" <william.c.roberts(a)intel.com> wrote:

I haven't seen that one, however it's well described here:

https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.ope
nssl.org%2Findex.php%2FLibrary_Initialization&amp;data=02%7C01%7Cleti%40v mware.com%7Cabe28bc870f24e301f0808d727f1eaec%7Cb39138ca3cee4b4aa4d6 cd83d9dd62f0%7C0%7C0%7C637021792310174248&amp;sdata=00apxqzEEjUKrov mkRcS3gzQmnBcmJAIeCmxDKgT2zQ%3D&amp;reserved=0

    I'm not seeing any calls to ENGINE_cleanup() or other OSSL teardowns,
    So on program exit you may see these.

    I can say with ASAN, I don't see them when running the tools. All the tests
    are run asan enabled and run cleanly and the tools use ESYS.

    Bill

    > -----Original Message-----
    > From: tpm2 [mailto:tpm2-bounces(a)lists.01.org] On Behalf Of Timothy Le
    > Sent: Friday, August 23, 2019 12:38 PM
    > To: tpm2(a)lists.01.org
    > Subject: Re: [tpm2] tpm2 Digest, Vol 26, Issue 12
    >
    > Hi,
    > Sorry to bother, but just following up if anyone has encountered this memory
    > leak. For reference, the valgrind output is:
    >
    > ==14825== 24 bytes in 1 blocks are still reachable in loss record 518 of 545
    > ==14825==    at 0x4C2DB8F: malloc (in

/usr/lib/valgrind/vgpreload_memcheck-

Quoted 4 lines

amd64-linux.so)
==14825== by 0x5969E77: CRYPTO_malloc (in /lib/x86_64-linux-
gnu/libcrypto.so.1.0.0)
==14825== by 0x5A21F85: lh_insert (in /lib/x86_64-linux-

gnu/libcrypto.so.1.0.0)

Quoted 15 lines

==14825== by 0x596CC54: OBJ_NAME_add (in /lib/x86_64-linux-
gnu/libcrypto.so.1.0.0)
==14825== by 0x5A2C565: EVP_add_digest (in /lib/x86_64-linux-
gnu/libcrypto.so.1.0.0)
==14825== by 0x5A30F4A: OpenSSL_add_all_digests (in /lib/x86_64-linux-
gnu/libcrypto.so.1.0.0)

==14825==    by 0x50CC9FE: iesys_cryptossl_init (esys_crypto_ossl.c:1118)
==14825==    by 0x50BDE5B: iesys_initialize_crypto (esys_crypto.c:537)
==14825==    by 0x50BB474: Esys_Initialize (esys_context.c:81)

Thank you

On 8/21/19, 2:58 PM, "tpm2 on behalf of tpm2-request(a)lists.01.org" <tpm2- bounces(a)lists.01.org on behalf of tpm2-request(a)lists.01.org> wrote:

Quoted 7 lines

Send tpm2 mailing list submissions to
tpm2(a)lists.01.org

To subscribe or unsubscribe via the World Wide Web, visit

https://li

sts.01.org%2Fmailman%2Flistinfo%2Ftpm2&amp;data=02%7C01%7Cleti%40vmwa

Quoted 1 line

re.com%7C9cb480a4de6e4c05043208d726699d5e%7Cb39138ca3cee4b4aa4d6cd83

Quoted 1 line

d9dd62f0%7C0%7C0%7C637020107371945259&amp;sdata=qYKbiICh35iXw%2FLFlT

Quoted 27 lines

DebE0csVwZEJ9CaibN0VBCMRI%3D&amp;reserved=0
or, via email, send a message with subject or body 'help' to
tpm2-request(a)lists.01.org

You can reach the person managing the list at
tpm2-owner(a)lists.01.org

When replying, please edit your Subject line so it is more specific than "Re: Contents of tpm2 digest..."

Today's Topics:

1. Re: Memory Leak stemming from Esys_Initialize (Timothy Le)

----------------------------------------------------------------------

Message: 1
Date: Wed, 21 Aug 2019 17:08:52 +0000
From: Timothy Le <leti(a)vmware.com>
To: Tadeusz Struk <tadeusz.struk(a)intel.com>, "tpm2(a)lists.01.org"
<tpm2(a)lists.01.org>
Subject: Re: [tpm2] Memory Leak stemming from Esys_Initialize
Message-ID: <23296169-2F17-4F42-90D3-557623F3BE22(a)vmware.com>
Content-Type: text/plain; charset="utf-8"

Quoted 2 lines

Hi,
Thank you for your e-mail. I have the most recent version of TSS, including

the

Quoted 1 line

changes to the test made yesterday. I still have the same leak (memory

allocated

Quoted 11 lines

in CRYPTO_malloc and also CRYPTO_REALLOC) are not freed.

    ?On 8/19/19, 11:19 AM, "Tadeusz Struk" <tadeusz.struk(a)intel.com> wrote:

        Hi Timothy,
        On 8/16/19 3:33 PM, Timothy Le wrote:
        > It seems that there is memory getting allocated in CRYPO_malloc that

Esys_Finalize is not freeing. I have traced the code, but I don?t have access to EVP_add_digest and the other inner function calls. Would someone be able

to

Quoted 13 lines

give me advice on how to free this memory?

Could you specify what version of TSS are you using? There was number of fixes merged in recently to fix these leaks.

Thanks,
--
Tadeusz

------------------------------

Quoted 8 lines

Subject: Digest Footer

_______________________________________________
tpm2 mailing list
tpm2(a)lists.01.org

https://lists.01.o

rg%2Fmailman%2Flistinfo%2Ftpm2&amp;data=02%7C01%7Cleti%40vmware.com

Quoted 1 line

%7C9cb480a4de6e4c05043208d726699d5e%7Cb39138ca3cee4b4aa4d6cd83d9dd6

Quoted 1 line

2f0%7C0%7C0%7C637020107371945259&amp;sdata=qYKbiICh35iXw%2FLFlTDebE0

Quoted 9 lines

csVwZEJ9CaibN0VBCMRI%3D&amp;reserved=0

    ------------------------------

    End of tpm2 Digest, Vol 26, Issue 12
    ************************************
Quoted 4 lines

_______________________________________________
tpm2 mailing list
tpm2(a)lists.01.org

https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.01.o
rg%2Fmailman%2Flistinfo%2Ftpm2&amp;data=02%7C01%7Cleti%40vmware.com %7Cabe28bc870f24e301f0808d727f1eaec%7Cb39138ca3cee4b4aa4d6cd83d9dd62f 0%7C0%7C0%7C637021792310174248&amp;sdata=n41btLwOcpu7wQGZXbgY8veX zx0I78lIjFnoDs%2FS72U%3D&amp;reserved=0