[ 3.5.y.z extended stable ] Patch "Bluetooth: Fix encryption key size for peripheral role" has been added to staging queue

Luis Henriques luis.henriques at canonical.com
Fri Oct 11 10:24:34 UTC 2013


This is a note to let you know that I have just added a patch titled

    Bluetooth: Fix encryption key size for peripheral role

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

>From 2c570a52ea81721407da3bf12f67dbf191ddc05c Mon Sep 17 00:00:00 2001
From: Andre Guedes <andre.guedes at openbossa.org>
Date: Wed, 31 Jul 2013 16:25:29 -0300
Subject: [PATCH] Bluetooth: Fix encryption key size for peripheral role

commit 89cbb4da0abee2f39d75f67f9fd57f7410c8b65c upstream.

This patch fixes the connection encryption key size information when
the host is playing the peripheral role. We should set conn->enc_key_
size in hci_le_ltk_request_evt, otherwise it is left uninitialized.

Signed-off-by: Andre Guedes <andre.guedes at openbossa.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan at collabora.co.uk>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
 net/bluetooth/hci_event.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 9871e8b..7797c9d 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -3456,6 +3456,8 @@ static inline void hci_le_ltk_request_evt(struct hci_dev *hdev,
 	else
 		conn->pending_sec_level = BT_SECURITY_MEDIUM;

+	conn->enc_key_size = ltk->enc_size;
+
 	hci_send_cmd(hdev, HCI_OP_LE_LTK_REPLY, sizeof(cp), &cp);

 	if (ltk->type & HCI_SMP_STK) {
--
1.8.3.2





More information about the kernel-team mailing list