Revert "Bluetooth: Align minimum encryption key size for LE and BR/EDR connections"
Subsystems (5)
PATCH 1/1 Revert "Bluetooth: Align minimum encryption key size for LE and BR/EDR connections"
This reverts commit d5bb334a8e171b262e48f378bd2096c0ea458265.
This commit breaks some HID devices, see [1] for details
https://bugzilla.kernel.org/show_bug.cgi?id=203643
--- include/net/bluetooth/hci_core.h | 3 --- net/bluetooth/hci_conn.c | 8 -------- 2 files changed, 11 deletions(-)
include/net/bluetooth/hci_core.h +0 -3
@@ -190,9 +190,6 @@ struct adv_info {#define HCI_MAX_SHORT_NAME_LENGTH 10 -/* Min encryption key size to match with SMP */ -#define HCI_MIN_ENC_KEY_SIZE 7 -/* Default LE RPA expiry time, 15 minutes */ #define HCI_DEFAULT_RPA_TIMEOUT (15 * 60)
net/bluetooth/hci_conn.c +0 -8
@@ -1276,14 +1276,6 @@ int hci_conn_check_link_mode(struct hci_conn *conn) !test_bit(HCI_CONN_ENCRYPT, &conn->flags))return 0 ; -/* The minimum encryption key size needs to be enforced by the -* host stack before establishing any L2CAP connections. The -* specification in theory allows a minimum of 1, but to align -* BR/EDR and LE transports, a minimum of 7 is chosen. -*/ -if (conn->enc_key_size <HCI_MIN_ENC_KEY_SIZE ) -return 0 ; -return 1 ; }
Signature · 1 line
2.21.0
Marcel Holtmann
maintainerHi Vasily,
Quoted 8 lines
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 <[email protected]>
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
Marcel Holtmann
maintainerHi Vasily,
Quoted 4 lines
Quoted 4 lines
This reverts commit
d5bb334a8e171b262e48f378bd2096c0ea458265.This commit breaks some HID devices, see [1] for details
Quoted 8 lines
Quoted 4 lines
https://bugzilla.kernel.org/show_bug.cgi?id=203643
Signed-off-by Vasily Khoruzhick <[email protected]>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/[email protected]/T/#u
Regards
Marcel
Quoted 12 lines · Marcel Holtmann
Hi Vasily,
Quoted 9 lines
Quoted 8 lines
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 <[email protected]>
Quoted 7 lines
Quoted 3 lines
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/[email protected]/T/#u
This patch fixes the issue for me. Thanks!
Quoted 5 lines
Regards
Marcel
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
Quoted 29 lines · Vasily Khoruzhick
Quoted 12 lines · Marcel Holtmann
Hi Vasily,
Quoted 9 lines
Quoted 8 lines
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 <[email protected]>Quoted 7 lines
Quoted 3 lines
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/[email protected]/T/#u
This patch fixes the issue for me. Thanks!
Quoted 5 lines
Regards
Marcel
Marcel Holtmann
maintainerHi Vasily,
Quoted 3 lines
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
Greg Kroah-Hartman
maintainerQuoted 7 lines · Marcel Holtmann
Hi Vasily,
Quoted 3 lines
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
Quoted 9 lines · Greg Kroah-Hartman
Quoted 8 lines · Marcel Holtmann
Hi Vasily,
Quoted 5 lines
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.
Quoted 4 lines
Quoted 2 lines
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
Quoted 6 lines
So can we just get this reverted so that people's machines go back to working?
thanks,
greg k-h
Hi,
Quoted 14 lines · Bastien Nocera
Quoted 12 lines · Greg Kroah-Hartman
Quoted 10 lines · Marcel Holtmann
Hi Vasily,
Quoted 5 lines
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.
Quoted 8 lines
Quoted 1 line
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
Greg Kroah-Hartman
maintainerQuoted 5 lines · 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.
Now reverted as the bluetooth developers seem to be moving pretty slowly on this :(
greg k-h