]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.19.51/revert-bluetooth-align-minimum-encryption-key-size-for-le-and-br-edr-connections.patch
Linux 4.19.51
[thirdparty/kernel/stable-queue.git] / releases / 4.19.51 / revert-bluetooth-align-minimum-encryption-key-size-for-le-and-br-edr-connections.patch
CommitLineData
502d188d
GKH
1From cf24ec6fe7cbd3bd0722cb9e7d845b4b818f2275 Mon Sep 17 00:00:00 2001
2From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3Date: Thu, 13 Jun 2019 09:28:42 +0200
4Subject: Revert "Bluetooth: Align minimum encryption key size for LE and BR/EDR connections"
5
6From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7
8This reverts commit 38f092c41cebaff589e88cc22686b289a6840559 which is
9commit d5bb334a8e171b262e48f378bd2096c0ea458265 upstream.
10
11Lots of people have reported issues with this patch, and as there does
12not seem to be a fix going into Linus's kernel tree any time soon,
13revert the commit in the stable trees so as to get people's machines
14working properly again.
15
16Reported-by: Vasily Khoruzhick <anarsoul@gmail.com>
17Reported-by: Hans de Goede <hdegoede@redhat.com>
18Cc: Jeremy Cline <jeremy@jcline.org>
19Cc: Marcel Holtmann <marcel@holtmann.org>
20Cc: Johan Hedberg <johan.hedberg@intel.com>
21Signed-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