bluetoothd crashed with SIGSEGV in sdp_append_to_buf()

Bug #332119 reported by ASDFASDF
38
This bug affects 3 people
Affects Status Importance Assigned to Milestone
bluez (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: bluez

Crashed when trying to pair with the mobile phone (after accepting and typing the pin on the phone)

ProblemType: Crash
Architecture: i386
DistroRelease: Ubuntu 9.04
ExecutablePath: /usr/sbin/bluetoothd
Package: bluez 4.30-0ubuntu1
ProcAttrCurrent: unconfined
ProcCmdline: /usr/sbin/bluetoothd
ProcEnviron: PATH=(custom, no user)
Signal: 11
SourcePackage: bluez
Stacktrace:
 #0 0xb7ea53ed in sdp_append_to_buf () from /usr/lib/libbluetooth.so.3
 #1 0xb7ea56b2 in sdp_append_to_pdu () from /usr/lib/libbluetooth.so.3
 #2 0x0c0c0c0c in ?? ()
 Backtrace stopped: previous frame inner to this frame (corrupt stack?)
StacktraceTop:
 sdp_append_to_buf () from /usr/lib/libbluetooth.so.3
 sdp_append_to_pdu () from /usr/lib/libbluetooth.so.3
 ?? ()
Title: bluetoothd crashed with SIGSEGV in sdp_append_to_buf()
Uname: Linux 2.6.28-8-generic i686
UserGroups:

Revision history for this message
ASDFASDF (user-487-deactivatedaccount) wrote :
Revision history for this message
Apport retracing service (apport) wrote : Symbolic stack trace

StacktraceTop:sdp_append_to_buf (dst=0xbfbfe520,
sdp_append_to_pdu (pdu=0xbfbfe520, d=0xb9b6d858)
?? ()

Revision history for this message
Apport retracing service (apport) wrote : Symbolic threaded stack trace
Revision history for this message
ASDFASDF (user-487-deactivatedaccount) wrote :

Still 100% reproducible with version 4.32-0ubuntu1

Revision history for this message
Baptiste Mille-Mathias (bmillemathias) wrote :

Igor, could you try with 4.33 which is available in my PPA, and tell me if it still occurs ?

post the crash and bluetoothd log also in debug mode.

thanks a lot

Revision history for this message
ASDFASDF (user-487-deactivatedaccount) wrote :

Hi, I tried the package from your PPA (from 27th March) and I still experience the same issue.
I'm attaching the .crash file from /var/crash and the bluetoothd debug info.

I looked at system logs and I also found this in syslog:
Mar 28 07:05:50 WORKSTATION bluetoothd[6039]: Discovery session 0xb90504b8 with :1.83 activated
Mar 28 07:05:56 WORKSTATION bluetoothd[6039]: link_key_request (sba=00:1A:6B:F0:CC:3A, dba=00:1E:A3:36:8D:29)
Mar 28 07:05:56 WORKSTATION bluetoothd[6039]: pin_code_request (sba=00:1A:6B:F0:CC:3A, dba=00:1E:A3:36:8D:29)
Mar 28 07:06:05 WORKSTATION bluetoothd[6039]: link_key_notify (sba=00:1A:6B:F0:CC:3A, dba=00:1E:A3:36:8D:29, type=0)
Mar 28 07:06:05 WORKSTATION kernel: [ 994.745231] bluetoothd[6039]: segfault at c0c0c0c ip b7f244d3 sp bf8814e0 error 4 in libbluetooth.so.3.2.1[b7f16000+15000]

After logging out and back in I can see that phone appears in the paired devices list and I can browse the files on the phone, however, no device can discover the PC even though I set the option to "always visible".
Bluetooth module is working fine in Win so it's not a hardware malfunction and IIRC 8.04 was the last version of Ubuntu where it worked fine.

Thanks

Revision history for this message
ASDFASDF (user-487-deactivatedaccount) wrote :
Revision history for this message
Johan van Dijk (johanvandijk) wrote :

Looks like I'm experiencing the same bug.
Crashed when trying to pair with my Nokia 6300.

Revision history for this message
ASDFASDF (user-487-deactivatedaccount) wrote :

hmm... I am also trying to pair with Nokia 6300... I will try to reproduce this with another phone later.

Revision history for this message
Harald Schilly (harald-schilly) wrote :

crashed for me, too. nokia 6288

Revision history for this message
Dan (jordanorc) wrote :

Crashed for me too. I'm trying to pair with Nokia 6267. I don't know if it's important, but I'm using ubuntu 9.04 64 bits

Revision history for this message
Unai Uribarri (unaiur) wrote :

Crashed for me too with 4.32-0ubuntu4, when pairing with a Nokia 6161.
It crashed both in the 64 and the 32 bit versions of Ubuntu 9.04.
With a Sony Ericsson K800i pairs perfectly.

Revision history for this message
Unai Uribarri (unaiur) wrote :

A buffer overflow parsing remote data in an daemon run by root. I think that this may be a severe security issue.

Revision history for this message
Unai Uribarri (unaiur) wrote :

It isn't so severe, since the user must initiate/allow the pairing with the pirate device.

Revision history for this message
Unai Uribarri (unaiur) wrote :

I have attached a quick fix for this bug. I've forwarded it and eventually it will be fixed upstream.

Revision history for this message
Vudentz (luiz-dentz-gmail) wrote :

Could someone please test the above patch with the devices which eventually makes bluetoothd to crash?

Thanks Unai to reporting this back to BlueZ community.

Revision history for this message
Baptiste Mille-Mathias (bmillemathias) wrote :

Thanks Vudentz for pushing a fix, sorry I've just seen you attached it.

for any reporter affected by this bug, I made a fix in my ppa https://www.launchpad.net/%7Ebmillemathias/+archive/bmm-jaunty-fix .
Could you test it, and reply here to confirm the patch fixed the problem.

Revision history for this message
Johan van Dijk (johanvandijk) wrote :

Your fix seems to work, I successfully paired my Nokia 6300 and bluetoothd didn't crash.
Thanks.

Revision history for this message
Baptiste Mille-Mathias (bmillemathias) wrote : Re: [Bug 332119] Re: bluetoothd crashed with SIGSEGV in sdp_append_to_buf()

On Sun, Jun 7, 2009 at 5:57 PM, Johan van Dijk<email address hidden> wrote:
> Your fix seems to work, I successfully paired my Nokia 6300 and bluetoothd didn't crash.
> Thanks.
>

Hello,

Can someone else test the package with the fix from vudentz, I would
like to have tested by several people before submitting for a SRU.

Regards

--
Baptiste Mille-Mathias
Les gens heureux ne sont pas pressés

Revision history for this message
ASDFASDF (user-487-deactivatedaccount) wrote :

I can confirm that the bug is fixed using version from your PPA (4.32-0ubuntu4.2 ).
I now successfully paired my laptop with my Nokia 6300.
Thanks Baptiste and Vudentz!

Changed in bluez (Ubuntu):
status: New → Fix Released
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.