From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx> commit b25e11f978b63cb7857890edb3a698599cddb10e upstream. This aligned BR/EDR JUST_WORKS method with LE which since 92516cd97fd4 ("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: stable@xxxxxxxxxxxxxxx Fixes: ba15a58b179e ("Bluetooth: Fix SSP acceptor just-works confirmation without MITM") Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx> Tested-by: Kiran K <kiran.k@xxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- net/bluetooth/hci_event.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -5422,19 +5422,16 @@ static void hci_user_confirm_request_evt goto unlock; } - /* If no side requires MITM protection; auto-accept */ + /* If no side requires MITM protection; use JUST_CFM method */ if ((!loc_mitm || conn->remote_cap == HCI_IO_NO_INPUT_OUTPUT) && (!rem_mitm || conn->io_capability == HCI_IO_NO_INPUT_OUTPUT)) { - /* If we're not the initiators request authorization to - * proceed from user space (mgmt_user_confirm with - * confirm_hint set to 1). The exception is if neither - * side had MITM or if the local IO capability is - * NoInputNoOutput, in which case we do auto-accept + /* If we're not the initiator of request authorization and the + * local IO capability is not NoInputNoOutput, use JUST_WORKS + * method (mgmt_user_confirm with confirm_hint set to 1). */ if (!test_bit(HCI_CONN_AUTH_PEND, &conn->flags) && - conn->io_capability != HCI_IO_NO_INPUT_OUTPUT && - (loc_mitm || rem_mitm)) { + conn->io_capability != HCI_IO_NO_INPUT_OUTPUT) { bt_dev_dbg(hdev, "Confirming auto-accept as acceptor"); confirm_hint = 1; goto confirm; Patches currently in stable-queue which might be from luiz.von.dentz@xxxxxxxxx are queue-6.1/bluetooth-btusb-add-realtek-rtl8852c-support-id-0x04.patch queue-6.1/bluetooth-btusb-fix-not-handling-zpl-short-transfer.patch queue-6.1/bluetooth-hci_sock-fix-not-validating-setsockopt-use.patch queue-6.1/bluetooth-hci_event-align-br-edr-just_works-paring-with-le.patch queue-6.1/bluetooth-btmrvl-use-irqf_no_autoen-flag-in-request_.patch queue-6.1/bluetooth-hci_sync-ignore-errors-from-hci_op_remote_.patch queue-6.1/bluetooth-hci_core-fix-sending-mgmt_ev_connect_faile.patch