linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH-v1 0/1] Bluetooth: Incorrect address while storing LTK
@ 2011-12-23  5:37 Hemant Gupta
  2011-12-23  5:37 ` [PATCH-v1 1/1] " Hemant Gupta
  0 siblings, 1 reply; 5+ messages in thread
From: Hemant Gupta @ 2011-12-23  5:37 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Naresh Gupta, Hemant Gupta, Hemant Gupta

This is bug in SMP (Security Manager Protocol) where the Address of
Local Adapter is used while storing the Long Term Key. This resulted
in a new create device call to remote device with Local Device Address.
Patch is same as before just rebased over latest Kernel, including SMP
patches from Brian Gix.

Hemant Gupta (1):
  Bluetooth: Incorrect address while storing LTK.

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH-v1 1/1] Bluetooth: Incorrect address while storing LTK.
  2011-12-23  5:37 [PATCH-v1 0/1] Bluetooth: Incorrect address while storing LTK Hemant Gupta
@ 2011-12-23  5:37 ` Hemant Gupta
  2011-12-23  6:28   ` Brian Gix
                     ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Hemant Gupta @ 2011-12-23  5:37 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Naresh Gupta, Hemant Gupta, Hemant Gupta

This patch fixes incorrect address storage while storing
Long Term Key for LE Devices using SMP (Security Manager Protocol).
The address stored should be of remote device and not of source device.

Signed-off-by: Hemant Gupta <hemant.gupta@stericsson.com>
---
 net/bluetooth/smp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index 9fea4bf..32c47de 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -820,7 +820,7 @@ static int smp_cmd_master_ident(struct l2cap_conn *conn, struct sk_buff *skb)
 
 	skb_pull(skb, sizeof(*rp));
 
-	hci_add_ltk(conn->hcon->hdev, 1, conn->src, smp->smp_key_size,
+	hci_add_ltk(conn->hcon->hdev, 1, conn->dst, smp->smp_key_size,
 						rp->ediv, rp->rand, smp->tk);
 
 	smp_distribute_keys(conn, 1);
-- 
1.6.6.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH-v1 1/1] Bluetooth: Incorrect address while storing LTK.
  2011-12-23  5:37 ` [PATCH-v1 1/1] " Hemant Gupta
@ 2011-12-23  6:28   ` Brian Gix
  2011-12-23  7:37   ` Marcel Holtmann
  2011-12-23 18:55   ` Gustavo Padovan
  2 siblings, 0 replies; 5+ messages in thread
From: Brian Gix @ 2011-12-23  6:28 UTC (permalink / raw)
  To: Hemant Gupta; +Cc: linux-bluetooth, Naresh Gupta, Hemant Gupta

Hi Hemant,

On 12/22/2011 9:37 PM, Hemant Gupta wrote:
> This patch fixes incorrect address storage while storing
> Long Term Key for LE Devices using SMP (Security Manager Protocol).
> The address stored should be of remote device and not of source device.
>
> Signed-off-by: Hemant Gupta<hemant.gupta@stericsson.com>
> ---
>   net/bluetooth/smp.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
> index 9fea4bf..32c47de 100644
> --- a/net/bluetooth/smp.c
> +++ b/net/bluetooth/smp.c
> @@ -820,7 +820,7 @@ static int smp_cmd_master_ident(struct l2cap_conn *conn, struct sk_buff *skb)
>
>   	skb_pull(skb, sizeof(*rp));
>
> -	hci_add_ltk(conn->hcon->hdev, 1, conn->src, smp->smp_key_size,
> +	hci_add_ltk(conn->hcon->hdev, 1, conn->dst, smp->smp_key_size,
>   						rp->ediv, rp->rand, smp->tk);
>
>   	smp_distribute_keys(conn, 1);

I agree that this is a bug, and that this is the correct fix.


-- 
Brian Gix
bgix@codeaurora.org
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH-v1 1/1] Bluetooth: Incorrect address while storing LTK.
  2011-12-23  5:37 ` [PATCH-v1 1/1] " Hemant Gupta
  2011-12-23  6:28   ` Brian Gix
@ 2011-12-23  7:37   ` Marcel Holtmann
  2011-12-23 18:55   ` Gustavo Padovan
  2 siblings, 0 replies; 5+ messages in thread
From: Marcel Holtmann @ 2011-12-23  7:37 UTC (permalink / raw)
  To: Hemant Gupta; +Cc: linux-bluetooth, Naresh Gupta, Hemant Gupta

Hi Hemant,

> This patch fixes incorrect address storage while storing
> Long Term Key for LE Devices using SMP (Security Manager Protocol).
> The address stored should be of remote device and not of source device.
> 
> Signed-off-by: Hemant Gupta <hemant.gupta@stericsson.com>
> ---
>  net/bluetooth/smp.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Acked-by: Marcel Holtmann <marcel@holtmann.org>

Regards

Marcel



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH-v1 1/1] Bluetooth: Incorrect address while storing LTK.
  2011-12-23  5:37 ` [PATCH-v1 1/1] " Hemant Gupta
  2011-12-23  6:28   ` Brian Gix
  2011-12-23  7:37   ` Marcel Holtmann
@ 2011-12-23 18:55   ` Gustavo Padovan
  2 siblings, 0 replies; 5+ messages in thread
From: Gustavo Padovan @ 2011-12-23 18:55 UTC (permalink / raw)
  To: Hemant Gupta; +Cc: linux-bluetooth, Naresh Gupta, Hemant Gupta

Hi Hemant,

* Hemant Gupta <hemant.gupta@stericsson.com> [2011-12-23 11:07:24 +0530]:

> This patch fixes incorrect address storage while storing
> Long Term Key for LE Devices using SMP (Security Manager Protocol).
> The address stored should be of remote device and not of source device.
> 
> Signed-off-by: Hemant Gupta <hemant.gupta@stericsson.com>
> ---
>  net/bluetooth/smp.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Patch has been applied, thanks.

	Gustavo

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-12-23 18:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-23  5:37 [PATCH-v1 0/1] Bluetooth: Incorrect address while storing LTK Hemant Gupta
2011-12-23  5:37 ` [PATCH-v1 1/1] " Hemant Gupta
2011-12-23  6:28   ` Brian Gix
2011-12-23  7:37   ` Marcel Holtmann
2011-12-23 18:55   ` Gustavo Padovan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).