Bug 921099 - Memory leak in cyrus-sasl sasl2-sample-server
Summary: Memory leak in cyrus-sasl sasl2-sample-server
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: cyrus-sasl
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Petr Lautrbach
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 852755
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-13 13:29 UTC by Petr Lautrbach
Modified: 2015-03-26 16:36 UTC (History)
5 users (show)

Fixed In Version: cyrus-sasl-2.1.26-22.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of: 852755
Environment:
Last Closed: 2015-03-26 16:36:08 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
proposed dist git patch (1.76 KB, patch)
2015-03-03 13:31 UTC, Jakub Jelen
no flags Details | Diff

Description Petr Lautrbach 2013-03-13 13:29:24 UTC
+++ This bug was initially created as a clone of Bug #852755 +++

Description of problem:
Memory leak in cyrus-sasl sasl2-sample-server, valgrind shows definitely lost: 11 bytes in 1 blocks.

==19720== 11 bytes in 1 blocks are definitely lost in loss record 4 of 37
==19720==    at 0x4A0610C: malloc (vg_replace_malloc.c:195)
==19720==    by 0x3DBF2798E1: strdup (in /lib64/libc-2.5.so)
==19720==    by 0x401580: ??? (in /usr/bin/sasl2-sample-server)
==19720==    by 0x401FB8: ??? (in /usr/bin/sasl2-sample-server)
==19720==    by 0x3DBF21D993: (below main) (in /lib64/libc-2.5.so)


Version-Release number of selected component (if applicable):
cyrus-sasl-2.1.22-7.el5_8.1

How reproducible:
always

Steps to Reproduce:
/etc/sasl2/smtpd.conf

pwcheck_method: auxprop
auxprop_plugin: sasldb
mech_list: DIGEST-MD5

1.saslpasswd2 -c admin
2.valgrind --leak-check=full sasl2-sample-server -p 8000 -s rcmd -m DIGEST-MD5
3.sasl2-sample-client -p 8000 -s rcmd -m DIGEST-MD5 localhost

  
Actual results:
memory leak

Expected results:
no memory leak

Additional info:

Comment 1 Fedora End Of Life 2013-09-16 13:10:05 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 20 development cycle.
Changing version to '20'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora20

Comment 2 Jakub Jelen 2015-03-03 13:31:17 UTC
Created attachment 997537 [details]
proposed dist git patch

This is pretty harmless issue since it is not in the code of cyrus-sasl, but only in example server.

Tracing it with debuginfo, we can get:

==27249== 11 bytes in 1 blocks are definitely lost in loss record 2 of 27
==27249==    at 0x4C28C0F: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==27249==    by 0x62A85D9: strdup (in /usr/lib64/libc-2.21.so)
==27249==    by 0x10A4CB: mysasl_negotiate (server.c:216)
==27249==    by 0x109D65: main (server.c:487)

And using attached patch we can avoid this issue. I think this can be pushed to rawhide. Petr?

Comment 3 Jakub Jelen 2015-03-26 16:36:08 UTC
This issue was fixed by last cyrus-sasl release in f22, but I put here wrong bug id:
https://admin.fedoraproject.org/updates/FEDORA-2015-3857/cyrus-sasl-2.1.26-22.fc22


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