FS#18653 - SIGSEGV in libsmbclient.so.0 when trying to access my Asus router with Nautilus

Attached to Project: Arch Linux
Opened by ilya (leniviy) - Friday, 12 March 2010, 15:25 GMT
Last edited by Tobias Powalowski (tpowa) - Monday, 31 May 2010, 19:27 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Tobias Powalowski (tpowa)
Architecture All
Severity Low
Priority Normal
Reported Version 3.3.3
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 6
Private No

Details

After upgrade to smbclient-3.5.0-2, I can't connect to my Asus router with Nautilus. (There's some older samba 3 on that router). It lists shares, but can't mount any of them. Shows a message box: "_russian_text_...DBus error org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus)..._russian_text_".

At the same time I can access shares on XP laptop.

I downgraded to smbclient-3.4.5-1 and now it works.

logged message:
Mar 12 18:19:00 IL kernel: gvfsd-smb[15470]: segfault at c35dec79 ip b7661068 sp b65bfb40 error 5 in libsmbclient.so.0[b71f9000+5a2000]

Built smbclient with "-g -O0". Here's the gdb backtrace after SIGSEGV caught:
#0 0xb76d9f28 in talloc_get_name () from /usr/lib/libsmbclient.so.0
#1 0xb76dd2ac in _talloc_get_type_abort () from /usr/lib/libsmbclient.so.0
#2 0xb71a5c8c in cli_smb_req_send (req=0xb77098ee) at libsmb/async_smb.c:527
#3 0xb716d882 in cli_tcon_andx_send (mem_ctx=0x8c72ad8, ev=0x8c72f78, cli=0x8c51830, share=0xb7709876 "IPC$", dev=0xb77098f5 "IPC", pass=0x0, passlen=0)
at libsmb/cliconnect.c:1458
#4 0xb716db52 in cli_tcon_andx (cli=0x8c51830, share=0xb7709876 "IPC$", dev=0xb77098f5 "IPC", pass=0x0, passlen=0) at libsmb/cliconnect.c:1537
#5 0xb719a8f7 in cli_check_msdfs_proxy (ctx=0x8c501d8, cli=0x8c51830, sharename=0x8c4d9b0 "share$", pp_newserver=0xb645eeec, pp_newshare=0xb645eee8, force_encrypt=false,
username=0x8c50590 "il", password=0x8bc16f0 "", domain=0x8c505c8 "WORKGROUP") at libsmb/clidfs.c:1019
#6 0xb70c5031 in SMBC_server_internal (ctx=0x8c501d8, context=0x8c4f998, connect_if_not_found=true, server=0x8c4d970 "my.router", share=0x8c4d9b0 "share$",
pp_workgroup=0xb645f134, pp_username=0xb645f13c, pp_password=0xb645f138, in_cache=0xb645f0b7) at libsmb/libsmb_server.c:536
#7 0xb70c579a in SMBC_server (ctx=0x8c501d8, context=0x8c4f998, connect_if_not_found=true, server=0x8c4d970 "my.router", share=0x8c4d9b0 "share$",
pp_workgroup=0xb645f134, pp_username=0xb645f13c, pp_password=0xb645f138) at libsmb/libsmb_server.c:670
#8 0xb70c6726 in SMBC_stat_ctx (context=0x8c4f998, fname=0x8c50180 "smb://my.router/share%24", st=0xb645f19c) at libsmb/libsmb_stat.c:168
This task depends upon

This task blocks these from closing
 FS#18908 - [nautilus] can't access windows/samba shares 
Closed by  Tobias Powalowski (tpowa)
Monday, 31 May 2010, 19:27 GMT
Reason for closing:  Fixed
Comment by ilya (leniviy) - Friday, 12 March 2010, 15:33 GMT
samba version on router is 3.2.8. But this looks like a race condition and may be caused by laggy router replies rather than the samba version.
Comment by Peter Avramucz (muczyjoe) - Monday, 15 March 2010, 10:54 GMT
This also affects me, however here is a patch: https://bugzilla.samba.org/show_bug.cgi?id=7205
Comment by ilya (leniviy) - Monday, 15 March 2010, 12:34 GMT
PA> This also affects me, however here is a patch: https://bugzilla.samba.org/show_bug.cgi?id=7205
Peter, are you sure about this? I had ipv6 enabled when my segfault popped
Comment by Peter Avramucz (muczyjoe) - Monday, 15 March 2010, 12:37 GMT
Nope, I couldn't understand samba PKGBUILD, so I couldn't apply this patch yet.
Comment by ilya (leniviy) - Monday, 15 March 2010, 13:03 GMT
that's easy:
* append to source array
"mount.cifs.segfault.fix.diff::https://bugzilla.samba.org/attachment.cgi?id=5448&action=view"

* append to md5sums array
'469893125e3b4ce6316e0f92ed9cad80'

* in build() function put the following line after "cd ${srcdir}/${pkgbase}-${_realver}/source3":
( cd ../client && patch -p0 -i ${srcdir}/mount.cifs.segfault.fix.diff ) || return 1

so it looks like this:
*************************************
...
build() {
cd ${srcdir}/${pkgbase}-${_realver}/source3
( cd ../client && patch -p0 -i ${srcdir}/mount.cifs.segfault.fix.diff ) || return 1
./configure --prefix=/usr \
...
*************************************
Comment by ilya (leniviy) - Monday, 15 March 2010, 13:22 GMT
Nah, this patch not helps me. P.A., what segfault message did you get? In libsmbclient.so.0 or mount.cifs ?
Comment by Peter Avramucz (muczyjoe) - Monday, 15 March 2010, 20:00 GMT
I got libsmbclient.so.0 segfault when using gvfs-mount e.g.
Comment by ilya (leniviy) - Tuesday, 16 March 2010, 07:11 GMT Comment by ilya (leniviy) - Friday, 09 April 2010, 07:35 GMT Comment by Maks Verver (maksverver) - Friday, 16 April 2010, 22:10 GMT
I can confirm the presence of this problem in Samba 3.5, and that the patch Ilya mentioned solves it. It would be nice to add the patch to the PKGBUILD for 3.5.2. (Ilya: thanks for investigating!)
Comment by Peter Avramucz (muczyjoe) - Saturday, 22 May 2010, 13:33 GMT
Patch found by leniviy works for me too.
Thanks!
Comment by Ionut Biru (wonder) - Monday, 31 May 2010, 12:02 GMT
what's the status using samba 3.5.3?
Comment by Brian Johnson (alienvenom) - Monday, 31 May 2010, 16:10 GMT
Fixed for me in 3.5.3.

Loading...