smbspool segmentation fault

Bug #39662 reported by mannheim
14
Affects Status Importance Assigned to Milestone
samba (Ubuntu)
In Progress
High
Soren Hansen

Bug Description

The version of smbspool in the package smbclient-3.0.22-1ubuntu1 (dapper) fails with a segmentation fault. To reproduce the bug, in the terminal:

$ DEVICE_URI="smb://user:secret@GROUP/MYPC/Canon"
$ export DEVICE_URI
$ echo something | smbspool 99 me test 1 ""
Segmentation fault

This is 100% reproducible on my two machines. Reverting to the older copy of smbspool from the older package smbclient-3.0.21b-1ubuntu1 fixed the problem.

This bug shows up as a failure of printing from dapper via cups and samba to shared printers. This bug was previously reported as Bug #39484, attributed to the package "cups". Since the user interface of launchpad doesn't let me change the attribution to "smbclient", I am filing this duplicate bug.

mannheim (kronheim)
description: updated
Revision history for this message
Eli Goshorn (techeli) wrote :

Confirmed on AMD64, so it most probably is a problem upstream. Set severity to major because _many_ people need to print to printers hooked up to Windows machines.

Changed in samba:
status: Unconfirmed → Confirmed
Revision history for this message
casualprogrammer (casualprogrammer) wrote :

I get the same problem after having installed Ubuntu 6.06 flight 6 on another PC ( i386 ). I created a network printer to connect to a Windows XP workstation ( Canon PIXMA iP4000 ) and it worked fine.

After applying all actual updates, the printer fails to work.

The cups error log shows:

E [17/Apr/2006:06:44:17 +0200] cupsdAuthorize: Local authentication certificate not found!
E [17/Apr/2006:06:44:17 +0200] cupsdAuthorize: Local authentication certificate not found!
E [17/Apr/2006:06:44:21 +0200] cupsdAuthorize: Local authentication certificate not found!
E [17/Apr/2006:06:44:21 +0200] Resume-Printer: Unauthorized
E [17/Apr/2006:06:44:21 +0200] PID 6113 crashed on signal 11!

I am not using certificates,so why cups would ask for them is over my head.

Revision history for this message
Bazon (bazonbloch) wrote :

Is it usefull to edit a bug which has been marked as a duplicate?
Maybe you should write comments/change status in the other entry:

https://launchpad.net/distros/ubuntu/+source/samba/+bug/39484
(that one has still status "normal" eg. ...)

Anyway, if you want a quick solution look here:
http://ubuntuforums.org/showthread.php?p=922871#post922871
(replace /usr/bin/smbspool by an older version...)

Revision history for this message
Soren Hansen (soren) wrote : ubuntu-setlocale.patch

I've located the error. It's due to the ubuntu-setlocale.patch that was applied in version 3.0.22-1ubuntu1. That patch uses a table which is filled in at initialisation time to look up the uppercase version of all unicode letters. If this table is not yet initialised, it will result in a segfault.

I think the proper way to fix this is to always check if a certain initialisation function has been called before allowing anything at all to happen, but I suppose that decision is up to the samba developers. For now this patch which just adds a call to load_case_tables() in the beginning of smbspool.c, will probably do just fine. This approach is also used by smbclient and smbmount.

The attached file replaces the current ubuntu-setlocale.patch currently present in debian/patches in the samba source package.

Changed in samba:
assignee: nobody → shawarma
status: Confirmed → In Progress
Revision history for this message
brettatoms (brettatoms) wrote :

Has this patch made it into the samba packages? I'm still getting crashes.

Revision history for this message
brettatoms (brettatoms) wrote :

Sorry for the spam. I just read the answer in #39484.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.