linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: linux-bluetooth@vger.kernel.org,
	Anderson Briglia <anderson.briglia@openbossa.org>
Subject: Re: [bluetooth-next v3 07/16] Bluetooth: Add SMP confirmation checks methods
Date: Wed, 8 Jun 2011 11:38:47 -0300	[thread overview]
Message-ID: <20110608143847.GA20343@piper> (raw)
In-Reply-To: <BANLkTikHJE-165=JOD+4UhxY7XQ6Lrx3KA@mail.gmail.com>

Hi Luiz,

On 13:16 Wed 08 Jun, Luiz Augusto von Dentz wrote:
> Hi Vinicius,
> 
> On Wed, Jun 8, 2011 at 11:26 AM, Johan Hedberg <johan.hedberg@gmail.com> wrote:
> > Hi Vinicius/Anderson,
> >
> > On Tue, Jun 07, 2011, Vinicius Costa Gomes wrote:
> >> +     ret = smp_c1(tfm, conn->tk, conn->prnd, conn->preq, conn->prsp, 0,
> >> +                     conn->src, 0, conn->dst, res);
> >
> > The third last parameter is the remote address type and you're
> > hard-coding it to 0 (public) here. This means that we cannot pair with a
> > device with a random address. I suppose you should be passing
> > conn->hcon->dst_type instead.
> 
> I notice that you guys have this fixed here:
> 
> http://git.infradead.org/users/vcgomes/linux-2.6.git/commitdiff/f345aa37d6d49104ef4b2b7e4466fb3186807199
> 
> So I wonder why this was not fix in place?

No reason at all. It happened because this patch was written when the dst_type field
wasn't introduced yet. Will fix.

> 
> >> +             ret = smp_c1(tfm, conn->tk, conn->prnd, conn->preq, conn->prsp,
> >> +                                     0, conn->dst, 0, conn->src, res);
> >
> > Same here.
> >
> >> +     if (conn->hcon->out)
> >> +             ret = smp_c1(tfm, conn->tk, random, conn->preq, conn->prsp, 0,
> >> +                             conn->src, 0, conn->dst, res);
> >> +     else
> >> +             ret = smp_c1(tfm, conn->tk, random, conn->preq, conn->prsp, 0,
> >> +                             conn->dst, 0, conn->src, res);
> >
> > And here.
> >
> > You're also hard-coding the local address type to public, but that's a
> > less severe issue (for now).
> >
> > Johan
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >
> 
> 
> 
> -- 
> Luiz Augusto von Dentz
> Computer Engineer


Cheers,
-- 
Vinicius

  reply	other threads:[~2011-06-08 14:38 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-07 21:46 [bluetooth-next v3 00/16] SMP Just Works implementation Vinicius Costa Gomes
2011-06-07 21:46 ` [bluetooth-next v3 01/16] Bluetooth: Implement the first SMP commands Vinicius Costa Gomes
2011-06-07 21:46 ` [bluetooth-next v3 02/16] Bluetooth: Start SMP procedure Vinicius Costa Gomes
2011-06-07 21:46 ` [bluetooth-next v3 03/16] Bluetooth: Add simple SMP pairing negotiation Vinicius Costa Gomes
2011-06-07 21:46 ` [bluetooth-next v3 04/16] Bluetooth: Add support for using the crypto subsystem Vinicius Costa Gomes
2011-06-07 21:46 ` [bluetooth-next v3 05/16] Bluetooth: Add LE SMP Cryptoolbox functions Vinicius Costa Gomes
2011-06-07 21:46 ` [bluetooth-next v3 06/16] Bluetooth: Add SMP confirmation structs Vinicius Costa Gomes
2011-06-08 18:46   ` Gustavo F. Padovan
2011-06-09 19:36     ` Gustavo F. Padovan
2011-06-07 21:46 ` [bluetooth-next v3 07/16] Bluetooth: Add SMP confirmation checks methods Vinicius Costa Gomes
2011-06-08  2:26   ` Johan Hedberg
2011-06-08  4:16     ` Luiz Augusto von Dentz
2011-06-08 14:38       ` Vinicius Costa Gomes [this message]
2011-06-07 21:46 ` [bluetooth-next v3 08/16] Bluetooth: Add support for LE Start Encryption Vinicius Costa Gomes
2011-06-07 21:46 ` [bluetooth-next v3 09/16] Bluetooth: Remove debug statements Vinicius Costa Gomes
2011-06-07 21:46 ` [bluetooth-next v3 10/16] Bluetooth: Add support for resuming socket when SMP is finished Vinicius Costa Gomes
2011-06-07 21:46 ` [bluetooth-next v3 11/16] Bluetooth: Fix initial security level of LE links Vinicius Costa Gomes
2011-06-07 21:46 ` [bluetooth-next v3 12/16] Bluetooth: Update the security level when link is encrypted Vinicius Costa Gomes
2011-06-07 21:46 ` [bluetooth-next v3 13/16] Bluetooth: Add support for building pairing commands Vinicius Costa Gomes
2011-06-07 21:46 ` [bluetooth-next v3 14/16] Bluetooth: Add support for Pairing features exchange Vinicius Costa Gomes
2011-06-07 21:46 ` [bluetooth-next v3 15/16] Bluetooth: Add support for SMP timeout Vinicius Costa Gomes
2011-06-07 21:46 ` [bluetooth-next v3 16/16] Bluetooth: Add key size checks for SMP Vinicius Costa Gomes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110608143847.GA20343@piper \
    --to=vinicius.gomes@openbossa.org \
    --cc=anderson.briglia@openbossa.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).