Skip to content

Commit b25e11f

Browse files
committed
Bluetooth: hci_event: Align BR/EDR JUST_WORKS paring with LE
This aligned BR/EDR JUST_WORKS method with LE which since 92516cd ("Bluetooth: Always request for user confirmation for Just Works") always request user confirmation with confirm_hint set since the likes of bluetoothd have dedicated policy around JUST_WORKS method (e.g. main.conf:JustWorksRepairing). CVE: CVE-2024-8805 Cc: [email protected] Fixes: ba15a58 ("Bluetooth: Fix SSP acceptor just-works confirmation without MITM") Signed-off-by: Luiz Augusto von Dentz <[email protected]> Tested-by: Kiran K <[email protected]>
1 parent 7b1ab46 commit b25e11f

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

net/bluetooth/hci_event.c

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5324,19 +5324,16 @@ static void hci_user_confirm_request_evt(struct hci_dev *hdev, void *data,
53245324
goto unlock;
53255325
}
53265326

5327-
/* If no side requires MITM protection; auto-accept */
5327+
/* If no side requires MITM protection; use JUST_CFM method */
53285328
if ((!loc_mitm || conn->remote_cap == HCI_IO_NO_INPUT_OUTPUT) &&
53295329
(!rem_mitm || conn->io_capability == HCI_IO_NO_INPUT_OUTPUT)) {
53305330

5331-
/* If we're not the initiators request authorization to
5332-
* proceed from user space (mgmt_user_confirm with
5333-
* confirm_hint set to 1). The exception is if neither
5334-
* side had MITM or if the local IO capability is
5335-
* NoInputNoOutput, in which case we do auto-accept
5331+
/* If we're not the initiator of request authorization and the
5332+
* local IO capability is not NoInputNoOutput, use JUST_WORKS
5333+
* method (mgmt_user_confirm with confirm_hint set to 1).
53365334
*/
53375335
if (!test_bit(HCI_CONN_AUTH_PEND, &conn->flags) &&
5338-
conn->io_capability != HCI_IO_NO_INPUT_OUTPUT &&
5339-
(loc_mitm || rem_mitm)) {
5336+
conn->io_capability != HCI_IO_NO_INPUT_OUTPUT) {
53405337
bt_dev_dbg(hdev, "Confirming auto-accept as acceptor");
53415338
confirm_hint = 1;
53425339
goto confirm;

0 commit comments

Comments
 (0)