aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2014-06-09 06:58:14 -0400
committerMarcel Holtmann <marcel@holtmann.org>2014-06-13 07:30:42 -0400
commitba15a58b179ed76a7e887177f2b06de12c58ec8f (patch)
treea068dd339dc86cfb402737c26853626bb8742ccc /net
parente694788d73efe139b24f78b036deb97fe57fa8cb (diff)
Bluetooth: Fix SSP acceptor just-works confirmation without MITM
From the Bluetooth Core Specification 4.1 page 1958: "if both devices have set the Authentication_Requirements parameter to one of the MITM Protection Not Required options, authentication stage 1 shall function as if both devices set their IO capabilities to DisplayOnly (e.g., Numeric comparison with automatic confirmation on both devices)" So far our implementation has done user confirmation for all just-works cases regardless of the MITM requirements, however following the specification to the word means that we should not be doing confirmation when neither side has the MITM flag set. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Tested-by: Szymon Janc <szymon.janc@tieto.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Cc: stable@vger.kernel.org
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/hci_event.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 21e5913d12e0..ff11f4a1ada3 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -3628,8 +3628,11 @@ static void hci_user_confirm_request_evt(struct hci_dev *hdev,
3628 3628
3629 /* If we're not the initiators request authorization to 3629 /* If we're not the initiators request authorization to
3630 * proceed from user space (mgmt_user_confirm with 3630 * proceed from user space (mgmt_user_confirm with
3631 * confirm_hint set to 1). */ 3631 * confirm_hint set to 1). The exception is if neither
3632 if (!test_bit(HCI_CONN_AUTH_PEND, &conn->flags)) { 3632 * side had MITM in which case we do auto-accept.
3633 */
3634 if (!test_bit(HCI_CONN_AUTH_PEND, &conn->flags) &&
3635 (loc_mitm || rem_mitm)) {
3633 BT_DBG("Confirming auto-accept as acceptor"); 3636 BT_DBG("Confirming auto-accept as acceptor");
3634 confirm_hint = 1; 3637 confirm_hint = 1;
3635 goto confirm; 3638 goto confirm;