]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-4.19/revert-bluetooth-align-minimum-encryption-key-size-for-le-and-br-edr-connections.patch
Linux 5.1.10
[thirdparty/kernel/stable-queue.git] / queue-4.19 / revert-bluetooth-align-minimum-encryption-key-size-for-le-and-br-edr-connections.patch
1 From cf24ec6fe7cbd3bd0722cb9e7d845b4b818f2275 Mon Sep 17 00:00:00 2001
2 From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 Date: Thu, 13 Jun 2019 09:28:42 +0200
4 Subject: Revert "Bluetooth: Align minimum encryption key size for LE and BR/EDR connections"
5
6 From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7
8 This reverts commit 38f092c41cebaff589e88cc22686b289a6840559 which is
9 commit d5bb334a8e171b262e48f378bd2096c0ea458265 upstream.
10
11 Lots of people have reported issues with this patch, and as there does
12 not seem to be a fix going into Linus's kernel tree any time soon,
13 revert the commit in the stable trees so as to get people's machines
14 working properly again.
15
16 Reported-by: Vasily Khoruzhick <anarsoul@gmail.com>
17 Reported-by: Hans de Goede <hdegoede@redhat.com>
18 Cc: Jeremy Cline <jeremy@jcline.org>
19 Cc: Marcel Holtmann <marcel@holtmann.org>
20 Cc: Johan Hedberg <johan.hedberg@intel.com>
21 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22 ---
23 include/net/bluetooth/hci_core.h | 3 ---
24 net/bluetooth/hci_conn.c | 8 --------
25 2 files changed, 11 deletions(-)
26
27 --- a/include/net/bluetooth/hci_core.h
28 +++ b/include/net/bluetooth/hci_core.h
29 @@ -182,9 +182,6 @@ struct adv_info {
30
31 #define HCI_MAX_SHORT_NAME_LENGTH 10
32
33 -/* Min encryption key size to match with SMP */
34 -#define HCI_MIN_ENC_KEY_SIZE 7
35 -
36 /* Default LE RPA expiry time, 15 minutes */
37 #define HCI_DEFAULT_RPA_TIMEOUT (15 * 60)
38
39 --- a/net/bluetooth/hci_conn.c
40 +++ b/net/bluetooth/hci_conn.c
41 @@ -1276,14 +1276,6 @@ int hci_conn_check_link_mode(struct hci_
42 !test_bit(HCI_CONN_ENCRYPT, &conn->flags))
43 return 0;
44
45 - /* The minimum encryption key size needs to be enforced by the
46 - * host stack before establishing any L2CAP connections. The
47 - * specification in theory allows a minimum of 1, but to align
48 - * BR/EDR and LE transports, a minimum of 7 is chosen.
49 - */
50 - if (conn->enc_key_size < HCI_MIN_ENC_KEY_SIZE)
51 - return 0;
52 -
53 return 1;
54 }
55