Re: [PATCH] Revert "Bluetooth: Align minimum encryption key size for LE and BR/EDR connections"

2019-06-13 Thread Greg Kroah-Hartman
On Tue, Jun 11, 2019 at 12:56:02PM -0700, Vasily Khoruzhick wrote:
> Greg,
> 
> Can we get this revert merged into stable branches? Bluetooth HID has
> been broken for many devices for quite a while now and RFC patch that
> fixes the breakage hasn't seen any movement for almost a month.

Now reverted as the bluetooth developers seem to be moving pretty slowly
on this :(

greg k-h


Re: [PATCH] Revert "Bluetooth: Align minimum encryption key size for LE and BR/EDR connections"

2019-06-12 Thread Johan Hedberg
Hi,

On 12 Jun 2019, at 12.38, Bastien Nocera  wrote:
> 
> On Wed, 2019-06-12 at 09:07 +0200, Greg Kroah-Hartman wrote:
>> On Tue, Jun 11, 2019 at 11:36:26PM +0200, Marcel Holtmann wrote:
>>> Hi Vasily,
>>> 
 Can we get this revert merged into stable branches? Bluetooth HID
 has
 been broken for many devices for quite a while now and RFC patch
 that
 fixes the breakage hasn't seen any movement for almost a month.
>>> 
>>> lets send the RFC patch upstream since it got enough feedback that
>>> it fixes the issue.
>> 
>> According to Hans, the workaround did not work.
> 
> Is it possible that those folks were running Fedora, and using a
> version of bluetoothd without a fix for using dbus-broker as the D-Bus
> daemon implementation?
> 
> I backported the fix in an update last week:
> https://bugzilla.redhat.com/show_bug.cgi?id=1711594

I don’t know if that’s the case, but at least based on the comment here:

https://bugzilla.kernel.org/show_bug.cgi?id=203643#c10

it looks like there’s still a race with controllers that do support reading the 
encryption key size. The peer device may send an L2CAP Connect Request before 
we’ve completed reading the key size, in which case we’d still reject the 
request. For making this work again I’m not aware of any other quick solution 
than a revert.

Johan



Re: [PATCH] Revert "Bluetooth: Align minimum encryption key size for LE and BR/EDR connections"

2019-06-12 Thread Bastien Nocera
On Wed, 2019-06-12 at 09:07 +0200, Greg Kroah-Hartman wrote:
> On Tue, Jun 11, 2019 at 11:36:26PM +0200, Marcel Holtmann wrote:
> > Hi Vasily,
> > 
> > > Can we get this revert merged into stable branches? Bluetooth HID
> > > has
> > > been broken for many devices for quite a while now and RFC patch
> > > that
> > > fixes the breakage hasn't seen any movement for almost a month.
> > 
> > lets send the RFC patch upstream since it got enough feedback that
> > it fixes the issue.
> 
> According to Hans, the workaround did not work.

Is it possible that those folks were running Fedora, and using a
version of bluetoothd without a fix for using dbus-broker as the D-Bus
daemon implementation?

I backported the fix in an update last week:
https://bugzilla.redhat.com/show_bug.cgi?id=1711594

> So can we just get this reverted so that people's machines go back to
> working?
> 
> thanks,
> 
> greg k-h



Re: [PATCH] Revert "Bluetooth: Align minimum encryption key size for LE and BR/EDR connections"

2019-06-12 Thread Greg Kroah-Hartman
On Tue, Jun 11, 2019 at 11:36:26PM +0200, Marcel Holtmann wrote:
> Hi Vasily,
> 
> > Can we get this revert merged into stable branches? Bluetooth HID has
> > been broken for many devices for quite a while now and RFC patch that
> > fixes the breakage hasn't seen any movement for almost a month.
> 
> lets send the RFC patch upstream since it got enough feedback that it fixes 
> the issue.

According to Hans, the workaround did not work.

So can we just get this reverted so that people's machines go back to
working?

thanks,

greg k-h


Re: [PATCH] Revert "Bluetooth: Align minimum encryption key size for LE and BR/EDR connections"

2019-06-11 Thread Marcel Holtmann
Hi Vasily,

> Can we get this revert merged into stable branches? Bluetooth HID has
> been broken for many devices for quite a while now and RFC patch that
> fixes the breakage hasn't seen any movement for almost a month.

lets send the RFC patch upstream since it got enough feedback that it fixes the 
issue.

Regards

Marcel



Re: [PATCH] Revert "Bluetooth: Align minimum encryption key size for LE and BR/EDR connections"

2019-06-11 Thread Vasily Khoruzhick
Greg,

Can we get this revert merged into stable branches? Bluetooth HID has
been broken for many devices for quite a while now and RFC patch that
fixes the breakage hasn't seen any movement for almost a month.

Regards,
Vasily

On Thu, May 23, 2019 at 7:52 AM Vasily Khoruzhick  wrote:
>
> On Wed, May 22, 2019 at 12:08 AM Marcel Holtmann  wrote:
> >
> > Hi Vasily,
> >
> > >> This reverts commit d5bb334a8e171b262e48f378bd2096c0ea458265.
> > >>
> > >> This commit breaks some HID devices, see [1] for details
> > >>
> > >> https://bugzilla.kernel.org/show_bug.cgi?id=203643
> > >>
> > >> Signed-off-by: Vasily Khoruzhick 
> > >> Cc: sta...@vger.kernel.org
> > >
> > > let me have a look at this. Maybe there is a missing initialization for 
> > > older HID devices that we need to handle. Do you happen to have the full 
> > > btmon binary trace from controller initialization to connection attempt 
> > > for me?
> > >
> > > Are both devices Bluetooth 2.1 or later device that are supporting Secure 
> > > Simple Pairing? Or is one of them a Bluetooth 2.0 or earlier device?
> >
> > I am almost certain that you have a Bluetooth 2.0 mouse. I made a really 
> > stupid mistake in the key size check logic and forgot to bind it to SSP 
> > support. Can you please check the patch that I just send you.
> >
> > https://lore.kernel.org/linux-bluetooth/20190522070540.48895-1-mar...@holtmann.org/T/#u
>
> This patch fixes the issue for me. Thanks!
>
> >
> > Regards
> >
> > Marcel
> >


Re: [PATCH] Revert "Bluetooth: Align minimum encryption key size for LE and BR/EDR connections"

2019-05-23 Thread Vasily Khoruzhick
On Wed, May 22, 2019 at 12:08 AM Marcel Holtmann  wrote:
>
> Hi Vasily,
>
> >> This reverts commit d5bb334a8e171b262e48f378bd2096c0ea458265.
> >>
> >> This commit breaks some HID devices, see [1] for details
> >>
> >> https://bugzilla.kernel.org/show_bug.cgi?id=203643
> >>
> >> Signed-off-by: Vasily Khoruzhick 
> >> Cc: sta...@vger.kernel.org
> >
> > let me have a look at this. Maybe there is a missing initialization for 
> > older HID devices that we need to handle. Do you happen to have the full 
> > btmon binary trace from controller initialization to connection attempt for 
> > me?
> >
> > Are both devices Bluetooth 2.1 or later device that are supporting Secure 
> > Simple Pairing? Or is one of them a Bluetooth 2.0 or earlier device?
>
> I am almost certain that you have a Bluetooth 2.0 mouse. I made a really 
> stupid mistake in the key size check logic and forgot to bind it to SSP 
> support. Can you please check the patch that I just send you.
>
> https://lore.kernel.org/linux-bluetooth/20190522070540.48895-1-mar...@holtmann.org/T/#u

This patch fixes the issue for me. Thanks!

>
> Regards
>
> Marcel
>


Re: [PATCH] Revert "Bluetooth: Align minimum encryption key size for LE and BR/EDR connections"

2019-05-22 Thread Marcel Holtmann
Hi Vasily,

>> This reverts commit d5bb334a8e171b262e48f378bd2096c0ea458265.
>> 
>> This commit breaks some HID devices, see [1] for details
>> 
>> https://bugzilla.kernel.org/show_bug.cgi?id=203643
>> 
>> Signed-off-by: Vasily Khoruzhick 
>> Cc: sta...@vger.kernel.org
> 
> let me have a look at this. Maybe there is a missing initialization for older 
> HID devices that we need to handle. Do you happen to have the full btmon 
> binary trace from controller initialization to connection attempt for me?
> 
> Are both devices Bluetooth 2.1 or later device that are supporting Secure 
> Simple Pairing? Or is one of them a Bluetooth 2.0 or earlier device?

I am almost certain that you have a Bluetooth 2.0 mouse. I made a really stupid 
mistake in the key size check logic and forgot to bind it to SSP support. Can 
you please check the patch that I just send you.

https://lore.kernel.org/linux-bluetooth/20190522070540.48895-1-mar...@holtmann.org/T/#u

Regards

Marcel



Re: [PATCH] Revert "Bluetooth: Align minimum encryption key size for LE and BR/EDR connections"

2019-05-22 Thread Marcel Holtmann
Hi Vasily,

> This reverts commit d5bb334a8e171b262e48f378bd2096c0ea458265.
> 
> This commit breaks some HID devices, see [1] for details
> 
> https://bugzilla.kernel.org/show_bug.cgi?id=203643
> 
> Signed-off-by: Vasily Khoruzhick 
> Cc: sta...@vger.kernel.org

let me have a look at this. Maybe there is a missing initialization for older 
HID devices that we need to handle. Do you happen to have the full btmon binary 
trace from controller initialization to connection attempt for me?

Are both devices Bluetooth 2.1 or later device that are supporting Secure 
Simple Pairing? Or is one of them a Bluetooth 2.0 or earlier device?

Regards

Marcel