Skip to content

Memory leak in EVP_PKEY_decrypt() #153

@andrewhenle

Description

@andrewhenle

Using EVP_PKEY_decrypt() with an RSA private key leaks approximately 1KB of enclave heap for each call.

A zip file with a simple enclave application that demonstrates the leak is attached. Note line 304 of rsaencryption.c:

// set this to 1, and the leak disappears
#if 0
    int result = 1;
#else
    int result =  EVP_PKEY_decrypt( pkeyCtx, plaintext, &bytesDecrypted, ciphertext, ciphertextLen );
#endif

RSALeak.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions