FS#18548 - [samba] [smbclient] mount.cifs (samba 3.5.0) seg fault during mount

Attached to Project: Arch Linux
Opened by Alexander Drozdov (adrozdov) - Wednesday, 03 March 2010, 16:08 GMT
Last edited by Tobias Powalowski (tpowa) - Thursday, 18 March 2010, 07:39 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Tobias Powalowski (tpowa)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

Details

Description:
Missing ptr check in mount.cifs.c at line 1566, so on my systen withour ipv6 it segfault when I try to mount samba shares.

I think that patch that I publish below should be included to build rule and pkg update will be required.

Patch, that solve this issue is atteched to this report.

Additional info:
* package version(s): smbclient 3.5.0-1, kernel26 2.6.32.9-1, glibc 2.11.1-1
* config and/or log files etc: default configs


Steps to reproduce:
1. disable ipv6
1.1. network without ipv6 hosts
2. run command similar to:
sudo mount.cifs //GAZ/torrents /home/hatred/smb4k/GAZ/torrents -o uid=1000,gid=101,port=445,rw,file_mode=0644,dir_mode=0755,perm,nosetuids,noserverino,nomapchars,iocharset=utf8,domain=GAZHOME,ip=192.168.1.2,guest

Upstream bugreport: https://bugzilla.samba.org/show_bug.cgi?id=7205
This task depends upon

Closed by  Tobias Powalowski (tpowa)
Thursday, 18 March 2010, 07:39 GMT
Reason for closing:  Fixed
Additional comments about closing:  added to 3.5.1-1
Comment by Andrea Scarpino (BaSh) - Wednesday, 03 March 2010, 17:57 GMT
I do not know if this is already fixed in 3.5.0-2, assigned to dev.
Comment by Tobias Powalowski (tpowa) - Friday, 05 March 2010, 18:03 GMT
your patch is not accepted upstream yet, so i will not inlcude it.
Comment by Alexander Drozdov (adrozdov) - Sunday, 07 March 2010, 17:34 GMT
Currently samba is unusable in some cases, so, I think this is good idea to review my patch and include it in PKGBUILD or return to old samba version during upstream fixing this issue.

Currently I was tested patched version of samba on up-to-date Arch machines on i686 and x86_64 archs.
Comment by azure (azure) - Wednesday, 10 March 2010, 11:47 GMT
i faced this problem too
in fstab I have
//d09l2163/1 /mnt/vinnikov cifs guest,user=Guest,ip=10.9.121.63,users,iocharset=utf8,noauto,file_mode=0666 0 0

"mount /mnt/vinnikov" results in a moint.cifs segfault. Will search now how to apply this patch and compile a samba
Comment by Alexander Drozdov (adrozdov) - Thursday, 11 March 2010, 07:05 GMT
azure, you can follow next steps:
1. from root do 'abs'
2. cp -a /var/abs/extra/samba /tmp/
3. download and save patch to /tmp/samba/
4. edit PKGBUILD and add next line before ./configure (with brackets!)
(cd ../client/; patch -p0 < ${startdir}/mount.cifs.segfault.fix.diff)
5. save and exit
6. do 'makepkg'
7. install packge 'smbclient' with 'pacman'

Comment by azure (azure) - Monday, 15 March 2010, 10:53 GMT
Thanks, this instructions helped me. I have also a smbclient installed, and it has /sbin/mount.cifs (samba has /usr/sbin/mount.cifs) and smbclient's mount.cifs is called first. So i overwritten the smbclients mount helper and now everything is ok. Thanks once more for instructions.
Comment by Alexander Drozdov (adrozdov) - Tuesday, 16 March 2010, 07:52 GMT
you're welcome :-)

/usr/sbin/mount.cifs is present... I think, that this is bug - duplicate of programms. If maintainer thinks that this is issue too new bug report is needed.

Loading...