]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
bluetooth patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 May 2021 09:23:36 +0000 (11:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 May 2021 09:23:36 +0000 (11:23 +0200)
14 files changed:
queue-4.14/bluetooth-smp-fail-if-remote-and-local-public-keys-are-identical.patch [new file with mode: 0644]
queue-4.14/series
queue-4.19/bluetooth-smp-fail-if-remote-and-local-public-keys-are-identical.patch [new file with mode: 0644]
queue-4.19/series
queue-4.4/bluetooth-smp-fail-if-remote-and-local-public-keys-are-identical.patch [new file with mode: 0644]
queue-4.4/series
queue-4.9/bluetooth-smp-fail-if-remote-and-local-public-keys-are-identical.patch [new file with mode: 0644]
queue-4.9/series
queue-5.10/bluetooth-smp-fail-if-remote-and-local-public-keys-are-identical.patch [new file with mode: 0644]
queue-5.10/series
queue-5.12/bluetooth-smp-fail-if-remote-and-local-public-keys-are-identical.patch [new file with mode: 0644]
queue-5.12/series
queue-5.4/bluetooth-smp-fail-if-remote-and-local-public-keys-are-identical.patch [new file with mode: 0644]
queue-5.4/series

diff --git a/queue-4.14/bluetooth-smp-fail-if-remote-and-local-public-keys-are-identical.patch b/queue-4.14/bluetooth-smp-fail-if-remote-and-local-public-keys-are-identical.patch
new file mode 100644 (file)
index 0000000..20fc8c9
--- /dev/null
@@ -0,0 +1,37 @@
+From 6d19628f539fccf899298ff02ee4c73e4bf6df3f Mon Sep 17 00:00:00 2001
+From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Date: Wed, 10 Mar 2021 14:13:08 -0800
+Subject: Bluetooth: SMP: Fail if remote and local public keys are identical
+
+From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+
+commit 6d19628f539fccf899298ff02ee4c73e4bf6df3f upstream.
+
+This fails the pairing procedure when both remote and local non-debug
+public keys are identical.
+
+Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/bluetooth/smp.c |    9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/net/bluetooth/smp.c
++++ b/net/bluetooth/smp.c
+@@ -2693,6 +2693,15 @@ static int smp_cmd_public_key(struct l2c
+       if (skb->len < sizeof(*key))
+               return SMP_INVALID_PARAMS;
++      /* Check if remote and local public keys are the same and debug key is
++       * not in use.
++       */
++      if (!test_bit(SMP_FLAG_DEBUG_KEY, &smp->flags) &&
++          !crypto_memneq(key, smp->local_pk, 64)) {
++              bt_dev_err(hdev, "Remote and local public keys are identical");
++              return SMP_UNSPECIFIED;
++      }
++
+       memcpy(smp->remote_pk, key, 64);
+       if (test_bit(SMP_FLAG_REMOTE_OOB, &smp->flags)) {
index 46572b7c7946c663188a5500ff5d60097fb7c7e6..757a4b46da45c7fa0ac2488a66a54d9e6762e84c 100644 (file)
@@ -35,3 +35,4 @@ vgacon-record-video-mode-changes-with-vt_resizex.patch
 vt-fix-character-height-handling-with-vt_resizex.patch
 tty-vt-always-invoke-vc-vc_sw-con_resize-callback.patch
 video-hgafb-correctly-handle-card-detect-failure-during-probe.patch
+bluetooth-smp-fail-if-remote-and-local-public-keys-are-identical.patch
diff --git a/queue-4.19/bluetooth-smp-fail-if-remote-and-local-public-keys-are-identical.patch b/queue-4.19/bluetooth-smp-fail-if-remote-and-local-public-keys-are-identical.patch
new file mode 100644 (file)
index 0000000..6d2da03
--- /dev/null
@@ -0,0 +1,37 @@
+From 6d19628f539fccf899298ff02ee4c73e4bf6df3f Mon Sep 17 00:00:00 2001
+From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Date: Wed, 10 Mar 2021 14:13:08 -0800
+Subject: Bluetooth: SMP: Fail if remote and local public keys are identical
+
+From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+
+commit 6d19628f539fccf899298ff02ee4c73e4bf6df3f upstream.
+
+This fails the pairing procedure when both remote and local non-debug
+public keys are identical.
+
+Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/bluetooth/smp.c |    9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/net/bluetooth/smp.c
++++ b/net/bluetooth/smp.c
+@@ -2703,6 +2703,15 @@ static int smp_cmd_public_key(struct l2c
+       if (skb->len < sizeof(*key))
+               return SMP_INVALID_PARAMS;
++      /* Check if remote and local public keys are the same and debug key is
++       * not in use.
++       */
++      if (!test_bit(SMP_FLAG_DEBUG_KEY, &smp->flags) &&
++          !crypto_memneq(key, smp->local_pk, 64)) {
++              bt_dev_err(hdev, "Remote and local public keys are identical");
++              return SMP_UNSPECIFIED;
++      }
++
+       memcpy(smp->remote_pk, key, 64);
+       if (test_bit(SMP_FLAG_REMOTE_OOB, &smp->flags)) {
index a0afb4b3c0066e5996e0bda29e51278acbdc16a0..03ca4de6db30da635565bfa479f5d6cf32b1af30 100644 (file)
@@ -46,3 +46,4 @@ vgacon-record-video-mode-changes-with-vt_resizex.patch
 vt-fix-character-height-handling-with-vt_resizex.patch
 tty-vt-always-invoke-vc-vc_sw-con_resize-callback.patch
 video-hgafb-correctly-handle-card-detect-failure-during-probe.patch
+bluetooth-smp-fail-if-remote-and-local-public-keys-are-identical.patch
diff --git a/queue-4.4/bluetooth-smp-fail-if-remote-and-local-public-keys-are-identical.patch b/queue-4.4/bluetooth-smp-fail-if-remote-and-local-public-keys-are-identical.patch
new file mode 100644 (file)
index 0000000..f63254e
--- /dev/null
@@ -0,0 +1,37 @@
+From 6d19628f539fccf899298ff02ee4c73e4bf6df3f Mon Sep 17 00:00:00 2001
+From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Date: Wed, 10 Mar 2021 14:13:08 -0800
+Subject: Bluetooth: SMP: Fail if remote and local public keys are identical
+
+From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+
+commit 6d19628f539fccf899298ff02ee4c73e4bf6df3f upstream.
+
+This fails the pairing procedure when both remote and local non-debug
+public keys are identical.
+
+Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/bluetooth/smp.c |    9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/net/bluetooth/smp.c
++++ b/net/bluetooth/smp.c
+@@ -2654,6 +2654,15 @@ static int smp_cmd_public_key(struct l2c
+       if (skb->len < sizeof(*key))
+               return SMP_INVALID_PARAMS;
++      /* Check if remote and local public keys are the same and debug key is
++       * not in use.
++       */
++      if (!test_bit(SMP_FLAG_DEBUG_KEY, &smp->flags) &&
++          !crypto_memneq(key, smp->local_pk, 64)) {
++              bt_dev_err(hdev, "Remote and local public keys are identical");
++              return SMP_UNSPECIFIED;
++      }
++
+       memcpy(smp->remote_pk, key, 64);
+       if (test_bit(SMP_FLAG_REMOTE_OOB, &smp->flags)) {
index 98af026e52d9427ac593a47aa00b13d26ec9f8b6..01680572b718d5c58fcfc9513ad8db0f1134e146 100644 (file)
@@ -29,3 +29,4 @@ vgacon-record-video-mode-changes-with-vt_resizex.patch
 vt-fix-character-height-handling-with-vt_resizex.patch
 tty-vt-always-invoke-vc-vc_sw-con_resize-callback.patch
 video-hgafb-correctly-handle-card-detect-failure-during-probe.patch
+bluetooth-smp-fail-if-remote-and-local-public-keys-are-identical.patch
diff --git a/queue-4.9/bluetooth-smp-fail-if-remote-and-local-public-keys-are-identical.patch b/queue-4.9/bluetooth-smp-fail-if-remote-and-local-public-keys-are-identical.patch
new file mode 100644 (file)
index 0000000..a57bfda
--- /dev/null
@@ -0,0 +1,37 @@
+From 6d19628f539fccf899298ff02ee4c73e4bf6df3f Mon Sep 17 00:00:00 2001
+From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Date: Wed, 10 Mar 2021 14:13:08 -0800
+Subject: Bluetooth: SMP: Fail if remote and local public keys are identical
+
+From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+
+commit 6d19628f539fccf899298ff02ee4c73e4bf6df3f upstream.
+
+This fails the pairing procedure when both remote and local non-debug
+public keys are identical.
+
+Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/bluetooth/smp.c |    9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/net/bluetooth/smp.c
++++ b/net/bluetooth/smp.c
+@@ -2636,6 +2636,15 @@ static int smp_cmd_public_key(struct l2c
+       if (skb->len < sizeof(*key))
+               return SMP_INVALID_PARAMS;
++      /* Check if remote and local public keys are the same and debug key is
++       * not in use.
++       */
++      if (!test_bit(SMP_FLAG_DEBUG_KEY, &smp->flags) &&
++          !crypto_memneq(key, smp->local_pk, 64)) {
++              bt_dev_err(hdev, "Remote and local public keys are identical");
++              return SMP_UNSPECIFIED;
++      }
++
+       memcpy(smp->remote_pk, key, 64);
+       if (test_bit(SMP_FLAG_REMOTE_OOB, &smp->flags)) {
index d8a447f87904f1363165b12c99a8d6985070ac7d..68133b7395265e07c3f24df62412e80b1577d45e 100644 (file)
@@ -34,3 +34,4 @@ vt-fix-character-height-handling-with-vt_resizex.patch
 tty-vt-always-invoke-vc-vc_sw-con_resize-callback.patch
 iio-tsl2583-fix-division-by-a-zero-lux_val.patch
 video-hgafb-correctly-handle-card-detect-failure-during-probe.patch
+bluetooth-smp-fail-if-remote-and-local-public-keys-are-identical.patch
diff --git a/queue-5.10/bluetooth-smp-fail-if-remote-and-local-public-keys-are-identical.patch b/queue-5.10/bluetooth-smp-fail-if-remote-and-local-public-keys-are-identical.patch
new file mode 100644 (file)
index 0000000..c38d1bd
--- /dev/null
@@ -0,0 +1,37 @@
+From 6d19628f539fccf899298ff02ee4c73e4bf6df3f Mon Sep 17 00:00:00 2001
+From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Date: Wed, 10 Mar 2021 14:13:08 -0800
+Subject: Bluetooth: SMP: Fail if remote and local public keys are identical
+
+From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+
+commit 6d19628f539fccf899298ff02ee4c73e4bf6df3f upstream.
+
+This fails the pairing procedure when both remote and local non-debug
+public keys are identical.
+
+Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/bluetooth/smp.c |    9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/net/bluetooth/smp.c
++++ b/net/bluetooth/smp.c
+@@ -2733,6 +2733,15 @@ static int smp_cmd_public_key(struct l2c
+       if (skb->len < sizeof(*key))
+               return SMP_INVALID_PARAMS;
++      /* Check if remote and local public keys are the same and debug key is
++       * not in use.
++       */
++      if (!test_bit(SMP_FLAG_DEBUG_KEY, &smp->flags) &&
++          !crypto_memneq(key, smp->local_pk, 64)) {
++              bt_dev_err(hdev, "Remote and local public keys are identical");
++              return SMP_UNSPECIFIED;
++      }
++
+       memcpy(smp->remote_pk, key, 64);
+       if (test_bit(SMP_FLAG_REMOTE_OOB, &smp->flags)) {
index b233e49390309ab311c5397e9f959afe830c2ca9..b1586d348ae8eacc6b5ce7ada936d2b33c15dbdd 100644 (file)
@@ -103,3 +103,4 @@ rtc-pcf85063-fallback-to-parent-of_node.patch
 x86-boot-compressed-64-check-sev-encryption-in-the-32-bit-boot-path.patch
 nvmet-use-new-ana_log_size-instead-the-old-one.patch
 video-hgafb-correctly-handle-card-detect-failure-during-probe.patch
+bluetooth-smp-fail-if-remote-and-local-public-keys-are-identical.patch
diff --git a/queue-5.12/bluetooth-smp-fail-if-remote-and-local-public-keys-are-identical.patch b/queue-5.12/bluetooth-smp-fail-if-remote-and-local-public-keys-are-identical.patch
new file mode 100644 (file)
index 0000000..ecc760b
--- /dev/null
@@ -0,0 +1,37 @@
+From 6d19628f539fccf899298ff02ee4c73e4bf6df3f Mon Sep 17 00:00:00 2001
+From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Date: Wed, 10 Mar 2021 14:13:08 -0800
+Subject: Bluetooth: SMP: Fail if remote and local public keys are identical
+
+From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+
+commit 6d19628f539fccf899298ff02ee4c73e4bf6df3f upstream.
+
+This fails the pairing procedure when both remote and local non-debug
+public keys are identical.
+
+Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/bluetooth/smp.c |    9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/net/bluetooth/smp.c
++++ b/net/bluetooth/smp.c
+@@ -2732,6 +2732,15 @@ static int smp_cmd_public_key(struct l2c
+       if (skb->len < sizeof(*key))
+               return SMP_INVALID_PARAMS;
++      /* Check if remote and local public keys are the same and debug key is
++       * not in use.
++       */
++      if (!test_bit(SMP_FLAG_DEBUG_KEY, &smp->flags) &&
++          !crypto_memneq(key, smp->local_pk, 64)) {
++              bt_dev_err(hdev, "Remote and local public keys are identical");
++              return SMP_UNSPECIFIED;
++      }
++
+       memcpy(smp->remote_pk, key, 64);
+       if (test_bit(SMP_FLAG_REMOTE_OOB, &smp->flags)) {
index 910a5fe7f21b96a3c7c04695b6c878074084a38f..a6ee471413b9b0e651b0bbfba5fe3cb125916fd4 100644 (file)
@@ -124,3 +124,4 @@ rtc-pcf85063-fallback-to-parent-of_node.patch
 x86-boot-compressed-64-check-sev-encryption-in-the-32-bit-boot-path.patch
 nvmet-use-new-ana_log_size-instead-the-old-one.patch
 video-hgafb-correctly-handle-card-detect-failure-during-probe.patch
+bluetooth-smp-fail-if-remote-and-local-public-keys-are-identical.patch
diff --git a/queue-5.4/bluetooth-smp-fail-if-remote-and-local-public-keys-are-identical.patch b/queue-5.4/bluetooth-smp-fail-if-remote-and-local-public-keys-are-identical.patch
new file mode 100644 (file)
index 0000000..99a8176
--- /dev/null
@@ -0,0 +1,37 @@
+From 6d19628f539fccf899298ff02ee4c73e4bf6df3f Mon Sep 17 00:00:00 2001
+From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Date: Wed, 10 Mar 2021 14:13:08 -0800
+Subject: Bluetooth: SMP: Fail if remote and local public keys are identical
+
+From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+
+commit 6d19628f539fccf899298ff02ee4c73e4bf6df3f upstream.
+
+This fails the pairing procedure when both remote and local non-debug
+public keys are identical.
+
+Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/bluetooth/smp.c |    9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/net/bluetooth/smp.c
++++ b/net/bluetooth/smp.c
+@@ -2685,6 +2685,15 @@ static int smp_cmd_public_key(struct l2c
+       if (skb->len < sizeof(*key))
+               return SMP_INVALID_PARAMS;
++      /* Check if remote and local public keys are the same and debug key is
++       * not in use.
++       */
++      if (!test_bit(SMP_FLAG_DEBUG_KEY, &smp->flags) &&
++          !crypto_memneq(key, smp->local_pk, 64)) {
++              bt_dev_err(hdev, "Remote and local public keys are identical");
++              return SMP_UNSPECIFIED;
++      }
++
+       memcpy(smp->remote_pk, key, 64);
+       if (test_bit(SMP_FLAG_REMOTE_OOB, &smp->flags)) {
index 33c682778ea11fdc88c1bbe0bc961254bebe098d..6f6df2c1ba8af2683db8367bf38dd2a01297435a 100644 (file)
@@ -70,3 +70,4 @@ ext4-fix-error-handling-in-ext4_end_enable_verity.patch
 bluetooth-l2cap-fix-handling-le-modes-by-l2cap_options.patch
 nvmet-use-new-ana_log_size-instead-the-old-one.patch
 video-hgafb-correctly-handle-card-detect-failure-during-probe.patch
+bluetooth-smp-fail-if-remote-and-local-public-keys-are-identical.patch