Dear Sir,
        Memory leak is found in EVP sign & verify functions

Self test report generated by make report
------------------------------------------
OpenSSL self-test report:

OpenSSL version:  0.9.8b
Last change:      When applying a cipher rule check to see if string matc...
Options:           no-gmp no-krb5 no-mdc2 no-rc5 no-shared no-zlib 
no-zlib-dynamic
OS (uname):       Linux lxdev21.cern.ch 2.4.21-40.EL.cernsmp #1 SMP Fri 
Mar 17 00:53:42 CET 2006 i686 i686 i386 GNU/Linux
OS (config):      i686-whatever-linux2
Target (default): linux-elf
Target:           dist
Compiler:         Configured with: ../configure --prefix=/usr 
--mandir=/usr/share/man --infodir=/usr/share/info --enable-shared 
--enable-threads=posix --disable-checking --with-system-zlib 
--enable-__cxa_atexit --host=i386-redhat-linux
Thread model: posix
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-54)

Test passed.

Application details
-------------------
openssl-0.9.8b/demos/sign/sign.c

Problem description:
--------------------
Upon observing memory leak in one of my applications (signature & 
verification test programs) I compiled the program 
openssl-0.9.8b/demos/sign/sign.c program and run using valgrind to 
confirm the same. Valgrind gave following memory leak report

==2542== 3,113 (292 direct, 2,821 indirect) bytes in 3 blocks are 
definitely lost in loss record 2 of 5
==2542==    at 0x401A639: malloc (vg_replace_malloc.c:149)
==2542==    by 0x80504A6: default_malloc_ex (in 
/root/openssl-0.9.8b/demos/sign/sign)
==2542==    by 0x8050902: CRYPTO_malloc (in 
/root/openssl-0.9.8b/demos/sign/sign)
==2542==    by 0x8049625: EVP_DigestInit_ex (in 
/root/openssl-0.9.8b/demos/sign/sign)
==2542==    by 0x8049506: EVP_DigestInit (in 
/root/openssl-0.9.8b/demos/sign/sign)
==2542==    by 0x80490D7: main (sign.c:109)
==2542==
==2542== LEAK SUMMARY:
==2542==    definitely lost: 292 bytes in 3 blocks.
==2542==    indirectly lost: 2,821 bytes in 115 blocks.
==2542==      possibly lost: 0 bytes in 0 blocks.
==2542==    still reachable: 22,124 bytes in 1,482 blocks.
==2542==         suppressed: 0 bytes in 0 blocks.
==2542== Reachable blocks (those to which a pointer was found) are not 
shown.

Stack Trace:
None


regards
murthy
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to