Bug 458790 - libsmbclient segfaults with more than one SMBCCTX
Summary: libsmbclient segfaults with more than one SMBCCTX
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: samba
Version: 10
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Simo Sorce
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 462403 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-08-12 10:32 UTC by Tim Waugh
Modified: 2009-02-03 18:27 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-02-03 18:27:06 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
testsmbclient.c (289 bytes, text/plain)
2008-08-12 10:32 UTC, Tim Waugh
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Samba Project 5686 0 None None None Never

Description Tim Waugh 2008-08-12 10:32:51 UTC
Created attachment 314082 [details]
testsmbclient.c

Description of problem:
The attached program segfaults.

Version-Release number of selected component (if applicable):
libsmbclient-3.2.1-0.19.fc10.x86_64

How reproducible:
100%

Steps to Reproduce:
make testsmbclient CFLAGS=-g LDFLAGS=-lsmbclient
./testsmbclient
  
Actual results:
Segfaults in smbc_init_context at libsmb/libsmb_context.c:587.

Expected results:
Exits with status code 0.

Additional info:
Works fine in Fedora 9 with libsmbclient-3.2.0-2.17.fc9.x86_64.

Comment 1 Tim Waugh 2008-08-12 15:54:34 UTC
Tracked this down using git bisect to this commit:

commit 7cd553356e3fe10bf4caac23d525df235ad9efce
Author: Andreas Schneider <anschneider>
Date:   Tue Jul 15 14:57:32 2008 +0200

    Release still reachable memory if the smbclient context is freed.
    
    Signed-off-by: Andreas Schneider <anschneider>
    (cherry picked from commit 88c9cf2fdc8f3d704f7f27c25ef6dc6940d451d3)

Comment 2 Tim Waugh 2008-08-12 16:05:47 UTC
Looks to me like that commit is just wrong.  With that change in, when two contexts have been created and one is freed, resources still needed by the second will also be freed.

Comment 3 Tim Waugh 2008-09-22 13:47:26 UTC
*** Bug 462403 has been marked as a duplicate of this bug. ***

Comment 4 Tim Waugh 2008-09-24 15:43:29 UTC
This fix went into 3.2.2 -- is there any way we could get that into the Fedora 10 beta?

Comment 5 Bruno Wolff III 2008-09-25 16:23:03 UTC
I tried samba-3.2.4-0.22.fc10.x86_64 and I am able to connect to Windows printers again.

Comment 6 Bug Zapper 2008-11-26 02:44:54 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

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


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