* [PATCH v2] Bluetooth: Fix L2CAP security check
@ 2011-06-13 12:37 Luiz Augusto von Dentz
2011-06-13 17:29 ` Gustavo F. Padovan
0 siblings, 1 reply; 2+ messages in thread
From: Luiz Augusto von Dentz @ 2011-06-13 12:37 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
With older userspace versions (using hciops) it might not have the
key type to check if the key has sufficient security for any security
level so it is necessary to check the return of hci_conn_auth to make
sure the connection is authenticated
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Acked-by: Johan Hedberg <johan.hedberg@intel.com>
---
net/bluetooth/hci_conn.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 3163330..b9aa986 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -611,8 +611,8 @@ auth:
if (test_and_set_bit(HCI_CONN_ENCRYPT_PEND, &conn->pend))
return 0;
- hci_conn_auth(conn, sec_level, auth_type);
- return 0;
+ if (!hci_conn_auth(conn, sec_level, auth_type))
+ return 0;
encrypt:
if (conn->link_mode & HCI_LM_ENCRYPT)
--
1.7.5.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] Bluetooth: Fix L2CAP security check
2011-06-13 12:37 [PATCH v2] Bluetooth: Fix L2CAP security check Luiz Augusto von Dentz
@ 2011-06-13 17:29 ` Gustavo F. Padovan
0 siblings, 0 replies; 2+ messages in thread
From: Gustavo F. Padovan @ 2011-06-13 17:29 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
Hi Luiz,
* Luiz Augusto von Dentz <luiz.dentz@gmail.com> [2011-06-13 15:37:35 +0300]:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
> With older userspace versions (using hciops) it might not have the
> key type to check if the key has sufficient security for any security
> level so it is necessary to check the return of hci_conn_auth to make
> sure the connection is authenticated
>
> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> Acked-by: Johan Hedberg <johan.hedberg@intel.com>
Applied, thanks.
Gustavo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-06-13 17:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-13 12:37 [PATCH v2] Bluetooth: Fix L2CAP security check Luiz Augusto von Dentz
2011-06-13 17:29 ` Gustavo F. Padovan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox