[dm-crypt] Memory leak when using openssl backend
per.x.johansson at axis.com
Tue Oct 11 10:58:59 CEST 2016
I have found a memory leak when using openssl backend. I don't know if
this is the proper way to report it.
The problem is that crypt_hash_init() and crypt_hash_restart() calls
EVP_DigestInit() but crypt_hash_final() calls EVP_DigestFinal_ex().
This results in that the context struct is zeroed when
crypt_hash_restart() calls EVP_DigestInit(), and the memory allocated by
the previous call to EVP_DigestInit() is lost. The version of openssl we
use is 1.0.2g. This leak might not occur in later versions of openssl
that has changed how those functions work.
I have attached a suggested fix that only uses the _ex versions of the
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1203 bytes
Desc: not available
More information about the dm-crypt