From: Colin Beckingham <colbec@start.ca>
To: Peter Hurley <peter@hurleysoftware.com>
Cc: linux-bluetooth <linux-bluetooth@vger.kernel.org>
Subject: Re: Permission denied (13) on Samsung WEP475 headset?
Date: Mon, 08 Aug 2011 10:01:43 -0400 [thread overview]
Message-ID: <4E3FEC47.3040000@start.ca> (raw)
In-Reply-To: <1312811593.2202.64.camel@THOR>
On 08/08/2011 09:53 AM, Peter Hurley wrote:
> On Mon, 2011-08-08 at 09:31 -0400, Colin Beckingham wrote:
>>
>> On 08/08/2011 08:38 AM, Peter Hurley wrote:
>>> On Sat, 2011-08-06 at 13:22 -0400, Colin Beckingham wrote:
>>>> On 08/06/2011 12:50 PM, Peter Hurley wrote:
>>>>> On Sat, 2011-08-06 at 11:33 -0400, Colin Beckingham wrote:
>>>>>> Hi Peter:
>>>>>>
>>>>> ...<snip>...
>>>>>> I ran # hciconfig hci0 sspmode 1 to force the adapter into a secure attempt.
>>>>>>
>>>>>> I downloaded and installed the latest hcidump which identifies itself
>>>>>> (hcidump -v) as 2.0 even though it is marked as 2.1 version on the webpage.
>>>>>>
>>>>>> Made another attempt to connect, here is the syslog
>>>>>>
>>>>>> # tail -n 100 /var/log/messages | grep bluetoothd
>>>>>> Aug 6 05:15:39 linux-c96h bluetoothd[1246]: Audio connection got
>>>>>> disconnected
>>>>>> Aug 6 11:23:29 linux-c96h bluetoothd[1246]: Rejecting request: remote
>>>>>> device can't provide MITM
>>>>>> Aug 6 11:23:56 linux-c96h bluetoothd[1246]: Discovery session
>>>>>> 0x7f801d0a6ca0 with :1.4178 activated
>>>>>> Aug 6 11:24:01 linux-c96h bluetoothd[1246]: Stopping discovery
>>>>>> Aug 6 11:24:13 linux-c96h bluetoothd[1246]: Permission denied (13)
>>>>>>
>>>>>> and a binary hcidump is attached.
>>>>>
>>>>> Hi Colin,
>>>>>
>>>>> That makes a lot more sense!
>>>>>
>>>>> Would you please repeat the experiment with bluetoothd in debug mode,
>>>>> though? That would give me a lot more information to work with about how
>>>>> bluetoothd got to that point.
>>>>>
>>>>> As before, please capture hcidump binary at the same time. Also please
>>>>> include every bluetoothd syslog message starting from the start of the
>>>>> experiment.
>>>>>
>>>>> I appreciate your patience helping me to track down this bug.
>>>>>
>>>>> Regards,
>>>>> Peter Hurley
>>>>
>>>> Sorry, forgot to set bluetoothd in debug mode.
>>>>
>>>> Attached are my latest logs, 2 files, wep475a.*. Note in the syslog that
>>>> the first entry is timestamped way before the experiment was launched,
>>>> so the log should have everything that bluetoothd wrote for the current
>>>> experiment.
>>>
>>> Hi Colin,
>>>
>>> Well, the new logs did not recreate the "Rejecting request: remote
>>> device can't provide MITM". However, they did show 2 things:
>>>
>>> 1. The host controller has a race condition bug which has been seen
>>> before (see this thread
>>> http://comments.gmane.org/gmane.linux.bluez.kernel/14286 for the really
>>> technical discussion)
>>>
>>> That's why the initial attempt by the device at connecting an RFCOMM
>>> channel is rejected (@ 13:13:02.533713).
>>>
>>> Nevertheless, the headset is found anyway and Bluez connects to the
>>> headset. After establishing an insecure SDP link, Bluez attempts to open
>>> an RFCOMM channel to the device, and
>>>
>>> 2. the kernel attempts to connect the RFCOMM channel prior to the link
>>> being encrypted, so the device rejects the connection.
>>>
>>> There were some last minute changes to 3.0 final that directly impacts
>>> how this is supposed to work. However, even with those changes it's
>>> unclear to me how #2 is happening.
>>>
>>> Would you be willing to run the same experiment as before but with the
>>> kernel bluetooth module enabled for debug output? If your kernel is
>>> configured for dynamic debug (Kernel hacking/Enable dynamic printk()
>>> support => Y), doing this is trivial:
>>> # sudo su
>>> # echo -n "module bluetooth +p"
>>> > /sys/kernel/debug/dynamic_debug/control
>>> < perform experiment>
>>> # echo -n "module bluetooth -p"
>>> > /sys/kernel/debug/dynamic_debug/control
>>>
>>> Regards,
>>> Peter Hurley
>>
>> Peter, before I do this, let me just verify that my kernel is set up
>> right. I checked for dynamic printk and I am not clear that I have the
>> setting needed. Here is what my .config tells me for dynamic and printk
>> separately.
>>
>> > cat .config | grep DYNAMIC
>> CONFIG_NETCONSOLE_DYNAMIC=y
>> CONFIG_DVB_DYNAMIC_MINORS=y
>> CONFIG_SND_DYNAMIC_MINORS=y
>> # CONFIG_USB_DYNAMIC_MINORS is not set
>> CONFIG_HAVE_DYNAMIC_FTRACE=y
>> CONFIG_DYNAMIC_DEBUG=y
> ^^^^^^^^
>
> This is the one and it's set correctly.
>
>> > cat .config | grep PRINTK
>> CONFIG_PRINTK=y
>> CONFIG_SND_VERBOSE_PRINTK=y
>> CONFIG_PRINTK_TIME=y
>> # CONFIG_BOOT_PRINTK_DELAY is not set
>> CONFIG_EARLY_PRINTK=y
>> CONFIG_EARLY_PRINTK_DBGP=y
>>
>> Could you confirm that I am ok to go?
>
> BTW, I just figured out how the kernel does the wrong thing now. If you
> want to wait on running this experiment, that's fine with me. I can
> contact you if someone wants proof that this happens.
>
> ~Peter
OK, Peter, I will put a hold on this. Let me know if you need further input.
--
---
Colin Beckingham
prev parent reply other threads:[~2011-08-08 14:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-04 11:10 Permission denied (13) on Samsung WEP475 headset? Colin Beckingham
2011-08-04 11:30 ` Colin Beckingham
2011-08-04 12:17 ` Johan Hedberg
2011-08-04 13:22 ` Colin Beckingham
2011-08-04 14:54 ` Peter Hurley
2011-08-06 14:36 ` Peter Hurley
2011-08-06 15:33 ` Colin Beckingham
2011-08-06 16:50 ` Peter Hurley
2011-08-06 17:22 ` Colin Beckingham
2011-08-08 12:38 ` Peter Hurley
2011-08-08 13:31 ` Colin Beckingham
2011-08-08 13:53 ` Peter Hurley
2011-08-08 14:01 ` Colin Beckingham [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E3FEC47.3040000@start.ca \
--to=colbec@start.ca \
--cc=linux-bluetooth@vger.kernel.org \
--cc=peter@hurleysoftware.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.