Skip to contentSkip to conversation

Bluetooth: Reset the security level after an authentication failure

PATCH In review [email protected] 3 participants 3 messages Jun 18, 2010 – Jun 29, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Bluetooth: Reset the security level after an authentication failure

From: Johan Hedberg <[email protected]>

When authentication fails for a connection the assumed security level should be set back to BT_SECURITY_LOW so that subsequent connect attempts over the same link don't falsely assume that security is adequate enough.

---
 net/bluetooth/hci_event.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
net/bluetooth/hci_event.c +2 -0
index 6c57fc7..786b5de 100644
@@ -1049,6 +1049,8 @@ static inline void hci_auth_complete_evt(struct hci_dev *hdev, struct sk_buff *s
 	if (conn) {
 		if (!ev->status)
 			conn->link_mode |= HCI_LM_AUTH;
+		else
+			conn->sec_level = BT_SECURITY_LOW;
 
 		clear_bit(HCI_CONN_AUTH_PEND, &conn->pend);
 
Signature · 1 line
1.7.0.4
Acked-by on v1 1/1
#1 lore raw

Hi Johan,

Quoted 11 lines · * [email protected] <[email protected]> [2010-06-18 11:08:56 +0300]:

From: Johan Hedberg <[email protected]>

When authentication fails for a connection the assumed security level should be set back to BT_SECURITY_LOW so that subsequent connect attempts over the same link don't falsely assume that security is adequate enough.

---
 net/bluetooth/hci_event.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

It works fine to me.

Signature · 2 lines
Gustavo F. Padovan
http://padovan.org
Reviewed-by Emeltchenko Andrei
#2 lore raw
Quoted 11 lines · Gustavo F. Padovan

Hi Johan,

Quoted 7 lines · * [email protected] <[email protected]> [2010-06-18 11:08:56 +0300]:

From: Johan Hedberg <[email protected]>

When authentication fails for a connection the assumed security level should be set back to BT_SECURITY_LOW so that subsequent connect attempts over the same link don't falsely assume that security is adequate enough.

Quoted 6 lines
Quoted 4 lines

---
 net/bluetooth/hci_event.c |    2 ++

 1 files changed, 2 insertions(+), 0 deletions(-)

It works fine to me.

We have tested this patch.

Quoted 2 lines

Regards,
Andrei Emeltchenko