mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-18 23:29:57 +02:00
Bluetooth: hci_event: Align BR/EDR JUST_WORKS paring with LE
commitb25e11f978
upstream. This aligned BR/EDR JUST_WORKS method with LE which since92516cd97f
("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@vger.kernel.org Fixes:ba15a58b17
("Bluetooth: Fix SSP acceptor just-works confirmation without MITM") Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Tested-by: Kiran K <kiran.k@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
2f4e3926bc
commit
830c03e58b
|
@ -5324,19 +5324,16 @@ static void hci_user_confirm_request_evt(struct hci_dev *hdev, void *data,
|
||||||
goto unlock;
|
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) &&
|
if ((!loc_mitm || conn->remote_cap == HCI_IO_NO_INPUT_OUTPUT) &&
|
||||||
(!rem_mitm || conn->io_capability == HCI_IO_NO_INPUT_OUTPUT)) {
|
(!rem_mitm || conn->io_capability == HCI_IO_NO_INPUT_OUTPUT)) {
|
||||||
|
|
||||||
/* If we're not the initiators request authorization to
|
/* If we're not the initiator of request authorization and the
|
||||||
* proceed from user space (mgmt_user_confirm with
|
* local IO capability is not NoInputNoOutput, use JUST_WORKS
|
||||||
* confirm_hint set to 1). The exception is if neither
|
* method (mgmt_user_confirm with confirm_hint set to 1).
|
||||||
* side had MITM or if the local IO capability is
|
|
||||||
* NoInputNoOutput, in which case we do auto-accept
|
|
||||||
*/
|
*/
|
||||||
if (!test_bit(HCI_CONN_AUTH_PEND, &conn->flags) &&
|
if (!test_bit(HCI_CONN_AUTH_PEND, &conn->flags) &&
|
||||||
conn->io_capability != HCI_IO_NO_INPUT_OUTPUT &&
|
conn->io_capability != HCI_IO_NO_INPUT_OUTPUT) {
|
||||||
(loc_mitm || rem_mitm)) {
|
|
||||||
bt_dev_dbg(hdev, "Confirming auto-accept as acceptor");
|
bt_dev_dbg(hdev, "Confirming auto-accept as acceptor");
|
||||||
confirm_hint = 1;
|
confirm_hint = 1;
|
||||||
goto confirm;
|
goto confirm;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user