Re: Memory leak when using openssl backend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/11/2016 10:58 AM, Per Johansson wrote:
> I have found a memory leak when using openssl backend. I don't know if 
> this is the proper way to report it.

Hi,

yes, it is one of ways how to report it (you can use gitlab issues as well).

Thanks for report! (I'll handle that patch in upstream git later this week.)

BTW Do you use some automated tool to find such problems or it was random find?

Milan


> 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 
> EVP functions.
> 
> 
> /Per
> 
> 
> 
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@xxxxxxxx
> http://www.saout.de/mailman/listinfo/dm-crypt
> 
_______________________________________________
dm-crypt mailing list
dm-crypt@xxxxxxxx
http://www.saout.de/mailman/listinfo/dm-crypt



[Index of Archives]     [Device Mapper Devel]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux