Bug 458790 - libsmbclient segfaults with more than one SMBCCTX
libsmbclient segfaults with more than one SMBCCTX
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: samba (Show other bugs)
10
All Linux
medium Severity medium
: ---
: ---
Assigned To: Simo Sorce
Fedora Extras Quality Assurance
:
: 462403 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-12 06:32 EDT by Tim Waugh
Modified: 2009-02-03 13:27 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-02-03 13:27:06 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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


External Trackers
Tracker ID Priority Status Summary Last Updated
Samba Project 5686 None None None Never

  None (edit)
Description Tim Waugh 2008-08-12 06:32:51 EDT
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 11:54:34 EDT
Tracked this down using git bisect to this commit:

commit 7cd553356e3fe10bf4caac23d525df235ad9efce
Author: Andreas Schneider <anschneider@suse.de>
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@suse.de>
    (cherry picked from commit 88c9cf2fdc8f3d704f7f27c25ef6dc6940d451d3)
Comment 2 Tim Waugh 2008-08-12 12:05:47 EDT
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 09:47:26 EDT
*** Bug 462403 has been marked as a duplicate of this bug. ***
Comment 4 Tim Waugh 2008-09-24 11:43:29 EDT
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 12:23:03 EDT
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-25 21:44:54 EST
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.