Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1595203 - valgrind reports leaks on connecting ldaps
Summary: valgrind reports leaks on connecting ldaps
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: openldap
Version: 28
Hardware: x86_64
OS: All
medium
medium
Target Milestone: ---
Assignee: Matus Honek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-06-26 11:08 UTC by Matus Honek
Modified: 2018-07-11 20:20 UTC (History)
3 users (show)

Fixed In Version: openldap-2.4.46-2.fc28
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1575549
Environment:
Last Closed: 2018-07-11 20:20:54 UTC


Attachments (Terms of Use)

Description Matus Honek 2018-06-26 11:08:41 UTC
The following description has been redacted.

+++ This bug was initially created as a clone of Bug #1575549 +++

Description of problem:
Simple program to connect openldap overssl when run under valgrind generates reports showing memory leaks.

==30126== Memcheck, a memory error detector
==30126== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==30126== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==30126== Command: ./OpenLDAPValgrindProblems
==30126==
==30126== Warning: invalid file descriptor -1 in syscall write()
==30126==
==30126== HEAP SUMMARY:
==30126==     in use at exit: 99,497 bytes in 3,092 blocks
==30126==   total heap usage: 139,747 allocs, 136,655 frees, 15,177,222 bytes allocated
==30126==
==30126== 96 bytes in 1 blocks are definitely lost in loss record 262 of 351
==30126==    at 0x4C29C80: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==30126==    by 0x7714F8F: PORT_Alloc_Util (in /usr/lib64/libnssutil3.so)
==30126==    by 0x73EE4ED: CERT_Hexify (in /usr/lib64/libnss3.so)
==30126==    by 0x549E306: tlsmc_hash (tls_mc.c:443)
==30126==    by 0x549E96E: tlsmc_compute_checksum (tls_mc.c:618)
==30126==    by 0x549FACE: tlsmc_convert (tls_mc.c:1160)
==30126==    by 0x54A0020: tlsmc_intercept_initialization (tls_mc.c:1303)
==30126==    by 0x5499FBE: ldap_int_tls_init_ctx (tls2.c:208)
==30126==    by 0x549A29C: ldap_pvt_tls_init_def_ctx (tls2.c:298)
==30126==    by 0x549A32A: alloc_handle (tls2.c:313)
==30126==    by 0x549A40B: ldap_int_tls_connect.isra.2 (tls2.c:362)
==30126==    by 0x549B2C5: ldap_int_tls_start (tls2.c:907)
==30126==
==30126== 123 bytes in 1 blocks are definitely lost in loss record 264 of 351
==30126==    at 0x4C2BFEE: realloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==30126==    by 0x7D46EDF: GrowStuff (prprf.c:1131)
==30126==    by 0x7D471E3: dosprintf (prprf.c:722)
==30126==    by 0x7D480E9: PR_vsmprintf (prprf.c:1184)
==30126==    by 0x7D481C8: PR_smprintf (prprf.c:1162)
==30126==    by 0x549FB1E: tlsmc_convert (tls_mc.c:1178)
==30126==    by 0x54A0020: tlsmc_intercept_initialization (tls_mc.c:1303)
==30126==    by 0x5499FBE: ldap_int_tls_init_ctx (tls2.c:208)
==30126==    by 0x549A29C: ldap_pvt_tls_init_def_ctx (tls2.c:298)
==30126==    by 0x549A32A: alloc_handle (tls2.c:313)
==30126==    by 0x549A40B: ldap_int_tls_connect.isra.2 (tls2.c:362)
==30126==    by 0x549B2C5: ldap_int_tls_start (tls2.c:907)
==30126==
==30126== 123 bytes in 1 blocks are definitely lost in loss record 265 of 351
==30126==    at 0x4C2BFEE: realloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==30126==    by 0x7D46EDF: GrowStuff (prprf.c:1131)
==30126==    by 0x7D471E3: dosprintf (prprf.c:722)
==30126==    by 0x7D480E9: PR_vsmprintf (prprf.c:1184)
==30126==    by 0x7D481C8: PR_smprintf (prprf.c:1162)
==30126==    by 0x549FDFF: tlsmc_convert (tls_mc.c:1245)
==30126==    by 0x54A0020: tlsmc_intercept_initialization (tls_mc.c:1303)
==30126==    by 0x5499FBE: ldap_int_tls_init_ctx (tls2.c:208)
==30126==    by 0x549A29C: ldap_pvt_tls_init_def_ctx (tls2.c:298)
==30126==    by 0x549A32A: alloc_handle (tls2.c:313)
==30126==    by 0x549A40B: ldap_int_tls_connect.isra.2 (tls2.c:362)
==30126==    by 0x549B2C5: ldap_int_tls_start (tls2.c:907)
==30126==
==30126== 123 bytes in 1 blocks are definitely lost in loss record 266 of 351
==30126==    at 0x4C2BFEE: realloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==30126==    by 0x7D46EDF: GrowStuff (prprf.c:1131)
==30126==    by 0x7D471E3: dosprintf (prprf.c:722)
==30126==    by 0x7D480E9: PR_vsmprintf (prprf.c:1184)
==30126==    by 0x7D481C8: PR_smprintf (prprf.c:1162)
==30126==    by 0x549FE58: tlsmc_convert (tls_mc.c:1256)
==30126==    by 0x54A0020: tlsmc_intercept_initialization (tls_mc.c:1303)
==30126==    by 0x5499FBE: ldap_int_tls_init_ctx (tls2.c:208)
==30126==    by 0x549A29C: ldap_pvt_tls_init_def_ctx (tls2.c:298)
==30126==    by 0x549A32A: alloc_handle (tls2.c:313)
==30126==    by 0x549A40B: ldap_int_tls_connect.isra.2 (tls2.c:362)
==30126==    by 0x549B2C5: ldap_int_tls_start (tls2.c:907)
==30126==
==30126== LEAK SUMMARY:
==30126==    definitely lost: 465 bytes in 4 blocks
==30126==    indirectly lost: 0 bytes in 0 blocks
==30126==      possibly lost: 0 bytes in 0 blocks
==30126==    still reachable: 99,032 bytes in 3,088 blocks
==30126==         suppressed: 0 bytes in 0 blocks
==30126== Reachable blocks (those to which a pointer was found) are not shown.
==30126== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==30126==
==30126== For counts of detected and suppressed errors, rerun with: -v
==30126== ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0)


Actual results:
Valgrind shows memory leaks

Expected results:
openldap library should not report leaks.

Comment 2 Fedora Update System 2018-07-04 12:00:20 UTC
openldap-2.4.46-2.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-13bcf869cf

Comment 3 Fedora Update System 2018-07-04 18:22:47 UTC
openldap-2.4.46-2.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-13bcf869cf

Comment 4 Fedora Update System 2018-07-11 20:20:54 UTC
openldap-2.4.46-2.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.