diff options
author | Mike Pagano <mpagano@gentoo.org> | 2019-06-11 13:50:47 -0400 |
---|---|---|
committer | Mike Pagano <mpagano@gentoo.org> | 2019-06-11 13:50:47 -0400 |
commit | c94db249e7999804542b264a47f03cd36aadbad7 (patch) | |
tree | 255fb225ecc2c89b0fb6ff43555010a562b34e78 | |
parent | Linux patch 4.14.125 (diff) | |
download | linux-patches-c94db249e7999804542b264a47f03cd36aadbad7.tar.gz linux-patches-c94db249e7999804542b264a47f03cd36aadbad7.tar.bz2 linux-patches-c94db249e7999804542b264a47f03cd36aadbad7.zip |
Bluetooth: Check key sizes only when Secure Simple Pairing is enabled.
See bug #686758
Signed-off-by: Mike Pagano <mpagano@gentoo.org>
-rw-r--r-- | 0000_README | 4 | ||||
-rw-r--r-- | 2000_BT-Check-key-sizes-only-if-Secure-Simple-Pairing-enabled.patch | 37 |
2 files changed, 41 insertions, 0 deletions
diff --git a/0000_README b/0000_README index 7f5a97c0..bc18bb19 100644 --- a/0000_README +++ b/0000_README @@ -555,6 +555,10 @@ Patch: 1700_ia64_fix_ptrace.patch From: https://patchwork.kernel.org/patch/10198159/ Desc: ia64: fix ptrace(PTRACE_GETREGS) (unbreaks strace, gdb). +Patch: 2000_BT-Check-key-sizes-only-if-Secure-Simple-Pairing-enabled.patch +From: https://lore.kernel.org/linux-bluetooth/20190522070540.48895-1-marcel@holtmann.org/raw +Desc: Bluetooth: Check key sizes only when Secure Simple Pairing is enabled. See bug #686758 + Patch: 2100_bcache-data-corruption-fix-for-bi-partno.patch From: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=62530ed8b1d07a45dec94d46e521c0c6c2d476e6 Desc: bio: ensure __bio_clone_fast copies bi_partno. diff --git a/2000_BT-Check-key-sizes-only-if-Secure-Simple-Pairing-enabled.patch b/2000_BT-Check-key-sizes-only-if-Secure-Simple-Pairing-enabled.patch new file mode 100644 index 00000000..394ad48f --- /dev/null +++ b/2000_BT-Check-key-sizes-only-if-Secure-Simple-Pairing-enabled.patch @@ -0,0 +1,37 @@ +The encryption is only mandatory to be enforced when both sides are using +Secure Simple Pairing and this means the key size check makes only sense +in that case. + +On legacy Bluetooth 2.0 and earlier devices like mice the encryption was +optional and thus causing an issue if the key size check is not bound to +using Secure Simple Pairing. + +Fixes: d5bb334a8e17 ("Bluetooth: Align minimum encryption key size for LE and BR/EDR connections") +Signed-off-by: Marcel Holtmann <marcel@holtmann.org> +Cc: stable@vger.kernel.org +--- + net/bluetooth/hci_conn.c | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c +index 3cf0764d5793..7516cdde3373 100644 +--- a/net/bluetooth/hci_conn.c ++++ b/net/bluetooth/hci_conn.c +@@ -1272,8 +1272,13 @@ int hci_conn_check_link_mode(struct hci_conn *conn) + return 0; + } + +- if (hci_conn_ssp_enabled(conn) && +- !test_bit(HCI_CONN_ENCRYPT, &conn->flags)) ++ /* If Secure Simple Pairing is not enabled, then legacy connection ++ * setup is used and no encryption or key sizes can be enforced. ++ */ ++ if (!hci_conn_ssp_enabled(conn)) ++ return 1; ++ ++ if (!test_bit(HCI_CONN_ENCRYPT, &conn->flags)) + return 0; + + /* The minimum encryption key size needs to be enforced by the +-- +2.20.1 |