* [PATCH v2] Bluetooth: hci_event: Align BR/EDR JUST_WORKS paring with LE
@ 2024-09-12 16:17 Luiz Augusto von Dentz
2024-09-25 16:42 ` K, Kiran
2024-09-25 21:30 ` patchwork-bot+bluetooth
0 siblings, 2 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2024-09-12 16:17 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
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).
Cc: stable@vger.kernel.org
Fixes: ba15a58b179e ("Bluetooth: Fix SSP acceptor just-works confirmation without MITM")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
net/bluetooth/hci_event.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 1c82dcdf6e8f..c93c76d455f7 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -5324,19 +5324,16 @@ static void hci_user_confirm_request_evt(struct hci_dev *hdev, void *data,
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;
--
2.46.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* RE: [PATCH v2] Bluetooth: hci_event: Align BR/EDR JUST_WORKS paring with LE
2024-09-12 16:17 [PATCH v2] Bluetooth: hci_event: Align BR/EDR JUST_WORKS paring with LE Luiz Augusto von Dentz
@ 2024-09-25 16:42 ` K, Kiran
2024-09-25 21:30 ` patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: K, Kiran @ 2024-09-25 16:42 UTC (permalink / raw)
To: Luiz Augusto von Dentz, linux-bluetooth@vger.kernel.org
Hi Luiz,
>-----Original Message-----
>From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
>Sent: Thursday, September 12, 2024 9:47 PM
>To: linux-bluetooth@vger.kernel.org
>Subject: [PATCH v2] Bluetooth: hci_event: Align BR/EDR JUST_WORKS paring
>with LE
>
>From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
>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).
>
>Cc: stable@vger.kernel.org
>Fixes: ba15a58b179e ("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>
>---
> net/bluetooth/hci_event.c | 13 +++++--------
> 1 file changed, 5 insertions(+), 8 deletions(-)
>
>diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index
>1c82dcdf6e8f..c93c76d455f7 100644
>--- a/net/bluetooth/hci_event.c
>+++ b/net/bluetooth/hci_event.c
>@@ -5324,19 +5324,16 @@ static void hci_user_confirm_request_evt(struct
>hci_dev *hdev, void *data,
> 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;
>--
>2.46.0
>
Thanks,
Kiran
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v2] Bluetooth: hci_event: Align BR/EDR JUST_WORKS paring with LE
2024-09-12 16:17 [PATCH v2] Bluetooth: hci_event: Align BR/EDR JUST_WORKS paring with LE Luiz Augusto von Dentz
2024-09-25 16:42 ` K, Kiran
@ 2024-09-25 21:30 ` patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2024-09-25 21:30 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
Hello:
This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Thu, 12 Sep 2024 12:17:00 -0400 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
> 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).
>
> [...]
Here is the summary with links:
- [v2] Bluetooth: hci_event: Align BR/EDR JUST_WORKS paring with LE
https://git.kernel.org/bluetooth/bluetooth-next/c/257d7307d348
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-09-25 21:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-12 16:17 [PATCH v2] Bluetooth: hci_event: Align BR/EDR JUST_WORKS paring with LE Luiz Augusto von Dentz
2024-09-25 16:42 ` K, Kiran
2024-09-25 21:30 ` patchwork-bot+bluetooth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox