gvfsd-smb crashed with SIGSEGV in strlen()

Bug #264943 reported by Shawn vega
144
This bug affects 8 people
Affects Status Importance Assigned to Milestone
samba
Fix Released
Critical
samba (Debian)
Fix Released
Unknown
samba (Ubuntu)
Fix Released
Medium
Chuck Short
Intrepid
Fix Released
Undecided
Unassigned
Jaunty
Fix Released
Medium
Chuck Short

Bug Description

Binary package hint: gvfs

Description: Ubuntu intrepid (development branch)
Release: 8.10
$ uname -a
Linux ubuntu 2.6.27-2-generic #1 SMP Thu Aug 28 17:20:02 UTC 2008 i686 GNU/Linux

I just tried to open a network folder in nautilus by typing smb://192.168.1.100 then gvfs crashed

ProblemType: Crash
Architecture: i386
DistroRelease: Ubuntu 8.10
ExecutablePath: /usr/lib/gvfs/gvfsd-smb
NonfreeKernelModules: nvidia
Package: gvfs-backends 0.99.6-0ubuntu3
ProcAttrCurrent: unconfined
ProcCmdline: /usr/lib/gvfs/gvfsd-smb --spawner :1.79 /org/gtk/gvfs/exec_spaw/3
ProcEnviron:
 SHELL=/bin/bash
 PATH=/home/User Name/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LANG=en_US.UTF-8
Signal: 11
SourcePackage: gvfs
StacktraceTop:
 strlen () from /lib/tls/i686/cmov/libc.so.6
 strdup () from /lib/tls/i686/cmov/libc.so.6
 ?? () from /usr/lib/libsmbclient.so.0
 ?? () from /usr/lib/libsmbclient.so.0
 ?? () from /usr/lib/libsmbclient.so.0
Title: gvfsd-smb crashed with SIGSEGV in strlen()
Uname: Linux 2.6.27-2-generic i686
UserGroups: adm admin cdrom dialout fuse lpadmin plugdev sambashare

Related branches

Revision history for this message
Shawn vega (svega85-gmail) wrote :
Revision history for this message
Apport retracing service (apport) wrote : Symbolic stack trace

StacktraceTop:strlen () from /lib/tls/i686/cmov/libc.so.6
strdup () from /lib/tls/i686/cmov/libc.so.6
cli_list_new () from /usr/lib/libsmbclient.so.0
cli_list () from /usr/lib/libsmbclient.so.0
SMBC_opendir_ctx () from /usr/lib/libsmbclient.so.0

Revision history for this message
Apport retracing service (apport) wrote : Symbolic threaded stack trace
Changed in gvfs:
importance: Undecided → Medium
Revision history for this message
Sebastien Bacher (seb128) wrote :

the crash is a libsmbclient one

Revision history for this message
Tomek Bury (tomek-bury) wrote :

100% reproducable here.

Changed in samba:
status: New → Confirmed
Revision history for this message
Richard Wooding (m-launchpad-richardwooding-com) wrote :

I suspect bug 284572 is a duplicate of this bug.

Revision history for this message
Tomek Bury (tomek-bury) wrote :

Yes, it is.

But I'm not sure which way to merge them. Bug 284572 has most of the data while this one has already 4 duplicates and seems to be the target for automatically generated bug reports. Any suggestions?

Cheers,
Tomek

Revision history for this message
Thierry Carrez (ttx) wrote :

Marking bug 284572 as a duplicate of this one. tomek.bury: you can add a comment here linking to the most relevant comments from the other bug.

Revision history for this message
Tomek Bury (tomek-bury) wrote :

Well, this bug causes crash in libsmbclient accessed through nautilus while bug 284572 does the same through smbclient. The smbclient gives some extra hints: weird domain/os/server - probably some parsing error, info level 1 is, I guess, type of package received from landrive:

$ smbclient //nas/PUBLIC -N
Domain=[ȇ] OS=[] Server=[??????]
smb: \> ls
cli_list_new: Error: unable to parse name from info level 1
Segmentation fault (core dumped)

For some more examples see:
https://bugs.launchpad.net/ubuntu/+source/samba/+bug/284572/comments/5
https://bugs.launchpad.net/ubuntu/+source/samba/+bug/284572/comments/7

Perhaps NAS drive tells fibs (package with wrong info level, ommisions, aditions, mistakes?

LAN drive models reported so far include Iomega Home Network Harddrive: http://www.iomega-europe.com/section?SID=86c57e53b9aa65a3d50a6a655559f6727dd:4745&secid=76622 and LanDrive: http://www.usbex.com/landrive/

I've made a simple patch that stops libsmblient from crashing (and nothing more than that):
https://bugs.launchpad.net/ubuntu/+source/samba/+bug/284572/comments/11

The patch revealed another problem - lots of the files became invisible when I'm trying to access them via samba, but I still can access them when I plug the drive directly in using USB cable.

Cheers,
Tomek

Revision history for this message
Marcus Schmitz (schmidtbaer) wrote :

I tracked down the problem to the following lines in "clilist.c" function "interpret_long_filename".
Here the following lines causes that "finfo->name" contains a null-pointer (as the function returns before setting finfo->name):

approx. line 90 of clilist.c (samba-3.2.5)

---

if (p + len + 1 > pdata_end) {
    return pdata_end - base;
   }

---

As this was added as some special requirement for OS/2 (which is not running on my NAS) and it was also not present in previous versions of "clilist.c" I commented out those line, after which smbclient worked just fine again ;)

Have fun
Marcus

Revision history for this message
^_Pepe_^ (jose-angel-fernandez-freire) wrote :

Hi!

Same problem here with a Conceptronic CH3DNAS NAS disk. Please could someone give a workaroud?

Thanks
^_Pepe_^

Revision history for this message
^_Pepe_^ (jose-angel-fernandez-freire) wrote :

Hi!

In https://bugs.launchpad.net/ubuntu/+source/samba/+bug/284572 (duplicate bug), someone indicates that with smbmount

sudo smbmount \\\\192.168.1.102\\video video

it seem to work, but not in my case.

papa@maggi:~$ sudo smbmount \\\\192.168.1.11\\public donwload
mount error: can not change directory into mount target donwload

Any help please? I have all my information in the NAS disc so I'm completely lost here. Even FTP protocol doesn't work fine with folders that have special characters (ñ, á,...)

Thanks for help!

Regards,
^_Pepe_^

Revision history for this message
Thierry Carrez (ttx) wrote :

Following advice in comment 10, I rollbacked the changes made in clilist.c and built a new package for Intrepid...

Could people affected by this bug test the samba-2:3.2.3-1ubuntu3.4~ppa1 package in my PPA:
https://launchpad.net/~tcarrez/+archive

and report success/failure/adverse side-effects.

Revision history for this message
^_Pepe_^ (jose-angel-fernandez-freire) wrote :

I'm terribly sorry to ask some information about patch.

1st. Could you publish a mini (really mini) HowTo? Any to uninstall first???
2nd. Could you please what could kind side-effects are expected to appear, and how to reverse samba situation to actual "as is". I guess that reinstalling smbclient and smbfs will be enough.

I'm very greateful for your help.

Regards,
^_Pepe_^

Revision history for this message
Tomek Bury (tomek-bury) wrote :

I've upgraded all of my samba packages using the new versions from https://launchpad.net/~tcarrez/+archive
but iit didn't work for me:

$ smbclient //nas/PUBLIC
Enter tomek's password:
Domain=[ȇ] OS=[] Server=[���]
smb: \> ls
Segmentation fault

Comparing to previous version the line:

cli_list_new: Error: unable to parse name from info level 1

has disappeared.

Cheers,
Tomek

Revision history for this message
Thierry Carrez (ttx) wrote :

I'll do a simpler patch just removing the offset check Marcus talks about in comment 10. Apparently the affected NAS use info level 1 (which is usually used by OS/2) !? Stay tuned.

Changed in samba:
status: Unknown → Confirmed
Revision history for this message
Thierry Carrez (ttx) wrote :

Please try samba - 2:3.2.3-1ubuntu3.4~ppa2 from https://launchpad.net/~tcarrez/+archive

Revision history for this message
Shawn vega (svega85-gmail) wrote :

your samba from your ppa works well without crashing

Revision history for this message
Tobias Weßel (tobias-wessel) wrote : Re: [Bug 264943] Re: gvfsd-smb crashed with SIGSEGV in strlen()

Seems to work fine and without crashes so far.

Regards

Tobias

Am 08.12.2008, 20:26 Uhr, schrieb Thierry Carrez
<email address hidden>:

> Please try samba - 2:3.2.3-1ubuntu3.4~ppa2 from
> https://launchpad.net/~tcarrez/+archive
>

Revision history for this message
rossjenkins (rossawjenkins-gmail) wrote :

I hate to be wet blanket, but I still have problems with samba/smbfs under Intrepid. I installed the samba files from Thierry's ppa repository. Nautilus indeed now lets me see and list the contents of my Iomega 500 GB Home Network Hard Drive and copy files from the drive to my Intrepid desktop. However, I can't write any files to the drive using Nautilus and SMB/CIFS or via ftp. I tried using smbclient in a terminal to "put" a test file onto the NAS drive and this is the output:

ross@ubuntu-test:~$ smbclient //192.168.0.198/ubuntu
Enter ross's password:
Domain=[MSHOME] OS=[R] Server=[R]
smb: \> put /home/ross/Desktop/test.file test.file
Error writing file: ERRHRD - 39 putting file /home/ross/Desktop/test.file as \test.file Receiving SMB: Server stopped responding Call returned zero bytes (EOF) closing remote file \test.file
smb: \>

The same test under Hardy from a laptop results in this successful output:

ross@ross-laptop:~$ smbclient //192.168.0.198/ubuntu
Password:
Domain=[MSHOME] OS=[R] Server=[R]
smb: \> put /home/ross/Desktop/test.file test.file
putting file /home/ross/Desktop/test.file as \test.file (135.9 kb/s) (average 135.9 kbs)
smb: \>

So something is still wrong with Samba, at least on my Intrepid desktop. I am going to revert back to release Samba package for Intrepid and see what smbclient does and see if I can at least get ftp to the NAS working again.

Any thoughts? BTW, the Nautilus error that gets thrown up when I try to write a file with the new Samba installed is:

Error while copying "test.file".
There was an error copying the file into smb://192.168.0.198/ubuntu/.
V Show more details
No space left on device.

Maybe that is how Nautilus interprets ERRHRD -39 ? The NAS disk is 500GB with lots of room.

Ideas?

Revision history for this message
Kai Blin (kai.blin) wrote :

I would be wary to remove the offset check. I'm not really into that code, but removing it will break offsets when there actually is no name in that Info1 struct. Can anybody provide a tcpdump/wireshark capture file of a smb connection that causes mentioned segfault?

Revision history for this message
Thierry Carrez (ttx) wrote :

Kai Blin:
Removing the check is clearly not a permanent solution, I figured it could help in pointing out where the problem is and maybe serve as band-aid for those affected, waiting for the proper fix. Unfortunately I don't own the affected hardware so I can't reproduce the problem, and I'm left with trial and error :)

Affected users:
Could you please follow instructions given on http://wiki.samba.org/index.php/Capture_Packets and post the corresponding trace for the Samba developers to look at it ? If not installed already, tcpdump can be installed by just running "sudo apt-get install tcpdump".

Revision history for this message
Shawn vega (svega85-gmail) wrote :

should I capture packets for the broken samba or the one from your ppa that works.

Revision history for this message
hir0pr0tagoni3t (hir0pr0tagoni3t) wrote :

Hi all,

Here is a capture from my box, running Ubuntu Ibex, 2.6.27-9-generic #1 SMP i686 GNU/Linux.
Samba is 3.2.3, using Iomega Network Hard Drive 350 GB with latest firmware. I remember this worked with Gutsy, I believe the samba version was 3.0.something, unfortunately can't remember what it was.
The wireshark capture is for a simple smbclient, logon using blank password, then trying an 'ls' command.
Please let me know if you need more info.

hiro

Revision history for this message
Thierry Carrez (ttx) wrote :

@Shawn: the one that fails, preferably.

Revision history for this message
Philippe Vanhaesendonck (philippe-vanhaesendonck) wrote :

For what this is worth:

- I confirm it woked in 8.04 and is now broken after upgrade in 8.10

- I works in Debian Etch (3.0.24-6etch10) but is broken as well in Debian Lenny (2:3.2.4-1)

- As already mentionned somewhere, mounting the device (mount -t cifs) works, so if really needed there is a workaround

Revision history for this message
Kai Blin (kai.blin) wrote :

I'll look into this some more tomorrow. This seems to be an issue introduced in Samba 3.2.x. I should be able to write a test case using the network trace.

Changed in samba:
status: Confirmed → Invalid
Revision history for this message
Kai Blin (kai.blin) wrote :

This is tracked in a different Samba bug.

Changed in samba:
status: Invalid → Unknown
Changed in samba:
status: Unknown → Confirmed
Revision history for this message
Kai Blin (kai.blin) wrote :

Seems like Jeremy Allison pushed a fix for that to git on 2008-12-08 already.

However, the reporter of the samba bug is experiencing the same issues as rossjenkins. I'll follow up on that.

Revision history for this message
rossjenkins (rossawjenkins-gmail) wrote :

OK, attached are some files.

First a pdf file showing how my network is laid out (1 picture worth 1000 words etc.). Next is a text file of the network capture on eth0 between my Linux comp (ubuntu-test) at ip 192.168.0.100 and my IOmega 500 GB NAS aka "Home Network Hard Drive" via a DLink 615 router. The IOmega NAS is at 192.168.0.195. I used Wireshark for the capture. The last file is the same information but in the Wireshark proprietary format.

I am using Samba 2:3.2.3-1ubuntu3.3. I tried to connect to smb://192.168.0.195/PUBLIC/ from Nautilus and it momentarily connects but then Nautilus reverts to displaying my home folder as previous posters have mentioned.

The IOmega NAS uses an embedded Linux server of some kind to serve requests. ftp works OK.

Revision history for this message
rossjenkins (rossawjenkins-gmail) wrote :
Revision history for this message
rossjenkins (rossawjenkins-gmail) wrote :
Revision history for this message
Kai Blin (kai.blin) wrote :

The pcap dump (i.e. the binary data, not the text file) was pretty much what I needed. Thanks alot.

Could anyone try the attached patch on top of current v3-2-test git?

Revision history for this message
Shawn vega (svega85-gmail) wrote :

I'll try it if you tell me how to do it.

Revision history for this message
Thierry Carrez (ttx) wrote :

Kai Blin: thanks for the patch, I'll build a new package in my PPA for Intrepid with this patch in, for easier user testing.

Revision history for this message
Thierry Carrez (ttx) wrote :

samba - 2:3.2.3-1ubuntu3.4~ppa3 from https://launchpad.net/~tcarrez/+archive is compiled with the patch from Kai Blin on comment 33, for those interested in testing.

Revision history for this message
rossjenkins (rossawjenkins-gmail) wrote :

Thierry and Kai:

Preliminary tests with the most recent patch (2:3.2.3-1ubuntu3.4~ppa3) of samba shows the following:
Read access to my NAS works as expected in Nautilus and read access using smclient in a terminal works. However, a put access (ie write access) using smbclient still returns an ERRHD -39 error as seen in the message below.

ross@ubuntu-test:~$ smbclient //192.168.0.195/public
Enter ross's password:
Domain=[MSHOME] OS=[R] Server=[R]
smb: \> put /home/ross/Desktop/disk_layout.png disk_layout.png
Error writing file: ERRHRD - 39
putting file /home/ross/Desktop/disk_layout.png as \disk_layout.png Receiving SMB: Server stopped responding
Call returned zero bytes (EOF) closing remote file \disk_layout.png
smb: \>

Also, attempting a write access by dragging a file into the smb:// Nautilus window generates the disk full error message as seen in the attachment. In other words, the latest patch has produced about the same result as the 2:3.2.3-1ubuntu3.4~ppa2 patch.

What is common to both smbclient write access and Nautilus write access during a write to a NAS device? Is there any other capture I can do that might help to pinpoint that area? Any idea what ERRHRD -39 might point towards?

So, in summary, with the latest patch, read access is OK, write access is still FUBAR.

Revision history for this message
^_Pepe_^ (jose-angel-fernandez-freire) wrote :

Hi everyone.

same behavior as last comment with my Conceptronic NAS disk. with patch (only smbclient and smbfs installed) I can now read, but not write.

Anyway it's a huge enhancement for me! :-D

Thanks for all.

^_Pepe_^

Revision history for this message
Kai Blin (kai.blin) wrote :

Hm, our initial guess is that these NAS disks all run the same CIFS server, which doesn't handle what our smbclient is sending and dies, giving back a "disk full" error. It should be unrelated to the segfault this bug is about, though. I'm still trying to contact the person who initially added that OS/2 offset check my patch changes, just to make sure I don't break smbclient for OS/2. Once that's sorted out, I can push a patch for this issue. I think it would make sense to track the write error in a separate bug report, as I'm not totally convinced it's a Samba bug at all. :)

Revision history for this message
Richard Wooding (m-launchpad-richardwooding-com) wrote :

Hi,

I tested the latest patch (2:3.2.3-1ubuntu3.4~ppa3), my NAS is an Iomega Home Network HD 500gb ( Previewed URL: http://is.gd/bQv1- ).

Reading of the hard disk is now working.

When writing I get a "No space left on device" error.

I can provide more details if necessary.

My NAS is firmware upgradable I have tried unsuccessfully to contact Iomega to have a look at this issue.

Regards
Richard Wooding

Changed in samba:
status: Confirmed → In Progress
29 comments hidden view all 109 comments
Revision history for this message
rossjenkins (rossawjenkins-gmail) wrote :

Kai & Thierry:

Volker Lendecke's patch seems to have done the trick!

Both a write using an smbclient 'put' as well as a drag and drop via Nautilus now work as expected. The visual side effect in Nautilus I noted five messages above is still present but since it doesn't seem to have a bearing on file writing functionality to the NAS I think it can be ignored for now.

Using 'get' in smbclient continues to work just fine as well.

Good work! And Happy Holidays to all...

Changed in samba:
status: In Progress → Fix Released
Revision history for this message
^_Pepe_^ (jose-angel-fernandez-freire) wrote :

Hi everyone!

Worked for me, for read AND write into my Conceptronic NAS disk!

Good job guys!

Thanks for all to everyone

Regards

Revision history for this message
Tomek Bury (tomek-bury) wrote :

Works for me too.

Good work!

Thanks,
Tomek

2008/12/28 ^_Pepe_^ <email address hidden>

> Hi everyone!
>
> Worked for me, for read AND write into my Conceptronic NAS disk!
>
> Good job guys!
>
> Thanks for all to everyone
>
> Regards
>
> --
> gvfsd-smb crashed with SIGSEGV in strlen()
> https://bugs.launchpad.net/bugs/264943
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Wutnubu (wutnubu) wrote :

For me too,

Great work

Thanks

Willem

Op maandag 29-12-2008 om 01:56 uur [tijdzone +0000], schreef tomek.bury:
> Works for me too.
>
> Good work!
>
> Thanks,
> Tomek
>
>
> 2008/12/28 ^_Pepe_^ <email address hidden>
>
> > Hi everyone!
> >
> > Worked for me, for read AND write into my Conceptronic NAS disk!
> >
> > Good job guys!
> >
> > Thanks for all to everyone
> >
> > Regards
> >
> > --
> > gvfsd-smb crashed with SIGSEGV in strlen()
> > https://bugs.launchpad.net/bugs/264943
> > You received this bug notification because you are a direct subscriber
> > of the bug.
> >
>

Revision history for this message
Kai Blin (kai.blin) wrote :

This is now fixed in the Samba git trees, will be in the next 3.2. bugfix release and in 3.3.0

Revision history for this message
Christian Perrier (bubulle) wrote :

Quoting Kai Blin (<email address hidden>):
> This is now fixed in the Samba git trees, will be in the next 3.2.
> bugfix release and in 3.3.0

Could you post the final patch ?

I think I could convince my co-maintainers and Debian release managers
to have this patch in Debian lenny while we will not have post-3.2.5
versions.

That will also avoid having Ubuntu-specific changes as I think this
patch will very probably be used in Ubuntu whatever we're doing in
Debian.

Revision history for this message
Kai Blin (kai.blin) wrote :

As requested by Christian, here's a patch for the v3-2-stable tree, applies to both 3.2.5 and 3.2.6 without any problems.

Revision history for this message
Daniel Eckl (daniel-eckl) wrote :

darn, the samba update from Jan 05 (http://www.ubuntu.com/usn/USN-702-1) overwrites Thierrys PPA :-S

So atm I can't tell if this patch fixes this problem with my Iomega Home Network Harddrive, but I guess it would :}

I so hope this patch can be included into the normal ubuntu packages soon...

Revision history for this message
geolr (rudolf-maurer) wrote :

Same thing for me, I am sorry to say.

Packard Bell Netstore 3500, 8.10 amd64

Similar behaviour as ever:
Nautilus bounces back to /home/user
smbclient on the commandline gives errormessages.
i.e.
"""
tree connect failed: ERRSRV - ERRaccess (The requester does not have
the necessary access rights within the specified context for the
requested function. The context is defined by the TID or the UID.)
"""

or at smbclient -L :
"""
Domain=[ȇ] OS=[] Server=[���]
"""

So long
Rudy

2009/1/6 Daniel Eckl <email address hidden>:
> darn, the samba update from Jan 05 (http://www.ubuntu.com/usn/USN-702-1)
> overwrites Thierrys PPA :-S
>
> So atm I can't tell if this patch fixes this problem with my Iomega Home
> Network Harddrive, but I guess it would :}
>
> I so hope this patch can be included into the normal ubuntu packages
> soon...
>
> --
> gvfsd-smb crashed with SIGSEGV in strlen()
> https://bugs.launchpad.net/bugs/264943
> You received this bug notification because you are a direct subscriber
> of a duplicate bug.
>
> Status in Samba: Fix Released
> Status in "samba" source package in Ubuntu: Confirmed
> Status in "samba" source package in Debian: Unknown
>
> Bug description:
> Binary package hint: gvfs
>
> Description: Ubuntu intrepid (development branch)
> Release: 8.10
> $ uname -a
> Linux ubuntu 2.6.27-2-generic #1 SMP Thu Aug 28 17:20:02 UTC 2008 i686 GNU/Linux
>
> I just tried to open a network folder in nautilus by typing smb://192.168.1.100 then gvfs crashed
>
> ProblemType: Crash
> Architecture: i386
> DistroRelease: Ubuntu 8.10
> ExecutablePath: /usr/lib/gvfs/gvfsd-smb
> NonfreeKernelModules: nvidia
> Package: gvfs-backends 0.99.6-0ubuntu3
> ProcAttrCurrent: unconfined
> ProcCmdline: /usr/lib/gvfs/gvfsd-smb --spawner :1.79 /org/gtk/gvfs/exec_spaw/3
> ProcEnviron:
> SHELL=/bin/bash
> PATH=/home/User Name/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
> LANG=en_US.UTF-8
> Signal: 11
> SourcePackage: gvfs
> StacktraceTop:
> strlen () from /lib/tls/i686/cmov/libc.so.6
> strdup () from /lib/tls/i686/cmov/libc.so.6
> ?? () from /usr/lib/libsmbclient.so.0
> ?? () from /usr/lib/libsmbclient.so.0
> ?? () from /usr/lib/libsmbclient.so.0
> Title: gvfsd-smb crashed with SIGSEGV in strlen()
> Uname: Linux 2.6.27-2-generic i686
> UserGroups: adm admin cdrom dialout fuse lpadmin plugdev sambashare
>

Revision history for this message
rossjenkins (rossawjenkins-gmail) wrote :

The latest official Ubuntu Samba update regresses the one in Thierry's ppa repository. I used Synaptic Package Manager to force the Samba packages back to the ones from Thierry's ppa and then used Synaptic again to lock those versions so they won't be "upgraded" via Intrepid-Updates again. You might want to do the same.

Revision history for this message
Christian Perrier (bubulle) wrote :

Quoting rossjenkins (<email address hidden>):
> The latest official Ubuntu Samba update regresses the one in Thierry's
> ppa repository. I used Synaptic Package Manager to force the Samba
> packages back to the ones from Thierry's ppa and then used Synaptic
> again to lock those versions so they won't be "upgraded" via Intrepid-
> Updates again. You might want to do the same.

I'm not in the Ubuntu hype but I'd advise folks to seriously think
twice before doing this. I very much suspect that the latest package
with the 'regression' includes the security fix from samba 3.2.7,
backported.

So, this is a balance between security and fixing an important bug (at
least in some situations).

So, indeed, while I understand that one want to go back to the
unofficial version with the fix for LP#364943, I would strongly advise
against locking to this verson.

Revision history for this message
Daniel Eckl (daniel-eckl) wrote :

Ross, this would make your system more insecure, since Thierrys packages don't include the security fixes for the USN mentioned in my comment above.
Maybe you still want to do the same, but when posting workarounds, you should always mention the drawbacks.

Revision history for this message
Kai Blin (kai.blin) wrote :

The real solution would be to finally get this fix included in Ubuntu. I'm not sure who's feeling responsible for Samba packages on the Ubuntu side of things. Given that intrepid is on 3.2.3, the patch would have to be backported anyway, so there's no need to wait for the next 3.2 bugfix release.

I'm aware that the write patch is kind of large, but at least the segfault is an easy target.

Revision history for this message
Daniel Eckl (daniel-eckl) wrote :

> I'm aware that the write patch is kind of large, but at least the segfault is an easy target.

Well, yes, but not anymore, the work has been done now..
Since Thierry already made version 3.2.3 packages with this fix included, the Ubuntu Maintainers "just" need to take his patchset and include it into their packages.

Revision history for this message
Kai Blin (kai.blin) wrote :

That's not what I'm talking about. the bigger the patches you pull in, the bigger the risk of regressing other things that used to work. I doubt Thierry's patches have been tested by many people not affected by this bug. While I personally doubt there's a problem for standard setups, I can understand the package maintainer's point of view.

Revision history for this message
Daniel Eckl (daniel-eckl) wrote :

Well the patches are from the Samba developer Volker Lendecke, but for version 3.2.5 (or 3.2.6 or such) and have been backported to 3.2.3 by Thierry.
So you think that the backporting would cause regressions?

As I'm no developer, I have to cope with your opinion here, so thank you for this info.

Revision history for this message
Thierry Carrez (ttx) wrote :

I'm kinda busy those days, but I'll refresh my PPA tomorrow with a 2:3.2.3-1ubuntu3.5~ppa1 that builds on the recent security release.

Concerning the official intrepid update, I'll file a SRU report and let the ubuntu-sru powers decide if the fix is worth the regression risk, as this is definitely a complex patch. I welcome Samba developers comments on it though, so as to better describe the regression potential for it.

Revision history for this message
Christian Perrier (bubulle) wrote :

Quoting Thierry Carrez (<email address hidden>):
> I'm kinda busy those days, but I'll refresh my PPA tomorrow with a
> 2:3.2.3-1ubuntu3.5~ppa1 that builds on the recent security release.
>
> Concerning the official intrepid update, I'll file a SRU report and let
> the ubuntu-sru powers decide if the fix is worth the regression risk, as
> this is definitely a complex patch. I welcome Samba developers comments

Indeed, when I saw the patch sent by Kai to Debian bug #500129, I was
a little bit scared....:-)

I initially intended to have the patch in Debian lenny but its size
makes me hesitate (the policy for lenny as of now is not as strict as
the polocy to update Debian stable....but, still, we're quite close
to the release and our release managers ask all Debian maintainers to
be very careful about patches fixing no release-crtical bugs.

I think that, for Debian, I'll finally balance to include the patch,
putting confidence in the work of two Samba Team
developers...:-)...but that will not be an update for a stable version
and I would not push it if it was for Debian stable.

I suspect that Ubuntu's policy is about the same and, as Kai
mentioned, it would be perfectly understandable if the patch is not
accepted.

Revision history for this message
rossjenkins (rossawjenkins-gmail) wrote :

Replying to Christian Perrier & Daniel Eckl:

Sorry guys, I didn't mean to sound like I was recommending that everyone lock in Thierry's ppa Samba patches without the most recent security fixes. It is a balance between usability and security and in my specific case the usability aspect trumps the security one. I will check out any new updates as they are made available from Intrepid - Updates but if they break my NAS access I will go back to the ppa fixes - I need a functional NAS and I don't want the fuss of going back to Ubuntu 8.04 to get it.

Revision history for this message
Thierry Carrez (ttx) wrote :

samba_3.2.3-1ubuntu3.5~ppa1 should be (if it builds) in my PPA in a few minutes for those wanting to test it.
It's using the complete patch from Kai Blin posted on comment 76.

The SRU will be based on it if successful.

Revision history for this message
Daniel Eckl (daniel-eckl) wrote :

Used your new version now for about 1 hour and have not seen any problem so far.
Thank you so much for your work!

Revision history for this message
rossjenkins (rossawjenkins-gmail) wrote :

Ditto for me as well - new ppa version working OK as far as I can tell.

Revision history for this message
Christian Perrier (bubulle) wrote : Please help testing *Debian* packages fixing these bugs in samba

To Ubuntu Intrepid users experiencing these bugs:

For Debian, I prepared samba 3.2.5 packages that supposedly fix them:

  * Fix segfault whan accessign some NAS devices running old versions of Samba
    Closes: #500129
  * Fix process crush when using gethostbyname_r in several threads
    Closes: #509101, #510450

It would help a lot if you could test these packages. I suppose they
will work properly on Ubuntu Intrepid but I haven't check this in
reality.

These packages are apt-get'able:

deb http://pkg-samba.alioth.debian.org/packages-prospective/ ./
deb-src http://pkg-samba.alioth.debian.org/packages-prospective/ ./

Please note that using this source will upgrade any existing samba
binary package on your systems. No *other* package should be upgraded
by this operation.

If you use aptitude, I recommend you "simpulate" the upgrade:

aptitude update
aptitude -s upgrade

Please also note that reverting back to official Ubuntu packages would
be recommended after this test, otherwise you might be later left
with packages for which no more security updates will come.

Still, if some of you could test and report if issues are fixed, that
would help greatly to improve samba packages in Debian, which in turn
will participate to the improvement of samba packages in Ubuntu.

Revision history for this message
rossjenkins (rossawjenkins-gmail) wrote :

Christian:

I installed your packages with the patches for Debian in Ubuntu 8.10 using the Synaptic front end for apt without any problems. I did not change my smb.conf file. The following tests to my IOmega 500 GB Home Network Harddrive (NAS) worked without any problems.

1. Created a test file "test.txt" and using smbclient via a terminal "put" the file into the /public folder of the NAS.

2. Using smbclient, used the "get" command to retrieve "test.txt" and rename it and put it on my desktop as "testret.txt".

3. Using Nautilus under the Gnome desktop opened (mounted) the /public folder on the NAS and dragged the "test.txt" file into it.

4. Deleted the "test.txt" file from the NAS via the Nautilus window.

5. Copied a 700.1 MB avi file from the /public folder of the NAS to the Gnome desktop via Nautilus "drag & drop".

All these tests worked OK. I will keep your Samba version for a couple of days to give it some more of a workout, but so far it seems to work the same as the one in Thierry's latest ppa for Ubuntu.

Revision history for this message
Daniel Eckl (daniel-eckl) wrote :

Tried these packages as well and so far they are really working great.
I tried the following on my IOMega NAS:
Using the share with KDE's smb:// kio plugin, uploaded, downloaded, renamed, deleted files from the share.
Using it with smbnetfs (based on fuse, it's using libsmbclient.so)
So far I found no problem and I have the feeling as if I would have a more stable transfer rate as with 3.2.3, but this might be just a wish ;)

Revision history for this message
Grobot (grobottom) wrote :

I have tried the smbclient and samba packages and everything seems to be working great thanks.

I seem to get odd messages saying the connection does not exist but you click on it a second time and off it goes.
I will try and be more precise if needed.
I now need to find out how I can make a samba file system connection as seamless as connecting to directory on the computer. The joys of Linux and having so much freedom to play.

Thankyou for all your hardwork.

Regards
Gary

Revision history for this message
Daniel Eckl (daniel-eckl) wrote :

> I now need to find out how I can make a samba file system connection as seamless as connecting to directory on the computer.

I mentioned smbnetfs above.

http://smbnetfs.sourceforge.net/
sudo apt-get install smbnetfs
man smbnetfs

Enjoy!

Revision history for this message
^_Pepe_^ (jose-angel-fernandez-freire) wrote :

Hi everyone.

New patch tested in my Conceptronic NAS Disk (CH3DNAS).

it works perfectly.

[off topic] P.S.: Very interested in smbnetfs. I've installed it, googled information so far, but I guess I need an example or a fool-proof howto...

Regards,
^_Pepe_^
Spain

Revision history for this message
Daniel Eckl (daniel-eckl) wrote :

I don't want to discuss this here since this is absolutely off-topic for this bug. I will write you an email.
If anyone wants more infos about this, too, feel free to contact me.
https://launchpad.net/~daniel-eckl/+contactuser

Revision history for this message
Martin Pitt (pitti) wrote :

Accepted samba into intrepid-proposed, please test and give feedback here. Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Revision history for this message
Martin Pitt (pitti) wrote :

Please fix ASAP in Jaunty. Thanks!

Changed in samba:
assignee: nobody → zulcss
status: New → Fix Committed
Revision history for this message
Steve Langasek (vorlon) wrote :

FWIW, this bug is fixed in Debian version 3.2.5-4, so a straightforward merge should take care of it for jaunty.

Revision history for this message
Tomek Bury (tomek-bury) wrote :

Hi all,

It works!

I've just disabled Thierry's ppa and installed samba related packages from intrepid proposed repository - it's all yummy. I can read and write to NAS drive.

Could anyone else check the intrepid-proposed version of samba?

Thanks,
Tomek

Revision history for this message
Daniel Eckl (daniel-eckl) wrote :

I can confirm that a first try works very well.
I will update in case I notice any flaws.

Thanks to all participants!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package samba - 2:3.2.5-4ubuntu1

---------------
samba (2:3.2.5-4ubuntu1) jaunty; urgency=low

  * Merge from Debian unstable, remaining changes:
    + debian/patches/VERSION.patch:
      - setup SAMBA_VERSION_SUFFIX to Ubuntu.
    + debian/smb.conf:
      - add "(Samba, Ubuntu)" to server string.
      - comment out the default [homes] share, and add a comment about
        "valid users = %S" to show users how to restrict access to
        \\server\username to only username.
      - Set 'usershare allow guests', so that usershare admins are
        allowed to create public shares in addition to authenticated
        ones.
      - add map to guest = Bad user, maps bad username to guest access.
    + debian/samba.postinst:
      - When populating the new samabshare group, it is not an error
        if the user simply does not exist; test for this case and let
        the install continue instead of aborting.
    + debian/samba-common.config:
      - Do not change priority to high if dhclient3 is installed.
      - Use priority medium instead of high for the workgroup question.
    + debian/mksambapasswd.awk:
      - Do not add user with UID less than 1000 to smbpasswd.
    + debian/control:
      - Depend on lsb-base >= 3.2-14, which has the status_of_proc()
        function.
      - Make libpam-smbpasswd depend on libpam-runtime to allow
        libpam-smbpasswd for auto-configuration.
      - Make libwbclient0 replace/conflict with hardy's likewise-open.
    + debian/samba.init:
      - Add a 'status' action.
    + debian/libpam-smbpass.pam-config, debian/libpam-smbpass.postinst,
      debian/libpam-smbpass.prerm, debian/libpam-smbpass.files,
      debian/rules:
      - Provide a config block for the new PAM framework to auto-configure
        itself
    + debian/rules:
      - enable "native" PIE hardening.
    + Add ufw integration:
      - Created debian/samba.uwf.profile
      - debian/rules, debian/samba.dirs, debian/samba.files: install
        profile
      - debian/control: have samba suggest ufw
    + debian/patches/last-char-truncation.patch:
      - Fix compatibility issue with NAS boxes still using Samba 2.2 and
        earlier.
    + debian/winbind.files:
      - include additional files
    + debian/winbind.init:
      - Add a PID variable and a 'status' action.
  * Dropped changes:
    - don't worry about handling upgrades from feisty or edgy, since
      users should have upgraded to the hardy version first so this
      transition is now finished.
  * Fixes LP: #264943 and LP: #286119.

samba (2:3.2.5-4) unstable; urgency=low

  * Fix segfault whan accessign some NAS devices running old versions of Samba
    Closes: #500129
  * Fix process crush when using gethostbyname_r in several threads
    Closes: #509101, #510450

 -- Steve Langasek <email address hidden> Wed, 28 Jan 2009 02:35:42 +0000

Changed in samba:
status: Confirmed → Fix Released
Revision history for this message
^_Pepe_^ (jose-angel-fernandez-freire) wrote :

Hi everyone.

I've installed a 9.04 Alpha-3 version onto a VMWare Windows-based-machine, and my NAS disk worked fine with the software just out-of-the-box.

Good news!!!

Regards,
^_Pepe_^

Revision history for this message
JrBenito (jrbenito) wrote :

Hi,

This is my first post to this bug so let me summarize my situation:

-NAS ViPower (Software/Hardware Pleiades - firmware NAS-BASIC48B6, LOADER 70,2007-8-15)
-I have same problem with 8.10

Now I tested intrepid-proposed package and now it is working again in nautilus and smbclient. Guys, please submit this to Intrepid official.

Thank you all for this effort.

Regards,
Benito.

Revision history for this message
JrBenito (jrbenito) wrote :

Hi,

I forgot to mention about my test environment. I am using Ubuntu version 8.10 (64bits) on a AMD Turion X2.
The package was installed from intrepid-propose and test did with ViPower NAS transferring (to and from) a file from about 4GB over wired network and another file (~2MB) over wireless network (the NAS is connected to mey wireless router by cable, off course). I do also edited a .txt file with gedit direct from NAS using nautilus to find it, open (double click), alter and save (gedit).

Thanks again.

Regards,

Revision history for this message
Thierry Carrez (ttx) wrote :

Thanks ! I guess we are done with verification here, fix publication is waiting on confirmation that bug 286119 is also fixed by the update.

Changed in samba:
status: Unknown → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package samba - 2:3.2.3-1ubuntu3.5

---------------
samba (2:3.2.3-1ubuntu3.5) intrepid-proposed; urgency=low

  * debian/patches/fix-libnss-sigabrt.patch: Fix sigabort when using
    wins client. Taken from upstream. (LP: #286119)
  * debian/patches/ Fix sigsev when using old NAS devices. Taken
    from upstream. Thanks to Thierry Carrez for tracking this down.
    (LP: #264943)

 -- Chuck Short <email address hidden> Mon, 12 Jan 2009 13:40:17 -0500

Changed in samba (Ubuntu Intrepid):
status: Fix Committed → Fix Released
Changed in samba:
importance: Unknown → Critical
Displaying first 40 and last 40 comments. View all 109 comments or add a comment.