Linux bluetooth development
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Cc: linux-bluetooth@vger.kernel.org, padovan@profusion.mobi
Subject: Re: [PATCH v2 6/6] Bluetooth: Respect local MITM req in io_cap reply
Date: Tue, 26 Apr 2011 16:59:23 -0700	[thread overview]
Message-ID: <20110426235923.GA4486@jh-x301> (raw)
In-Reply-To: <1303372461-11848-6-git-send-email-waldemar.rymarkiewicz@tieto.com>

Hi Waldek,

On Thu, Apr 21, 2011, Waldemar Rymarkiewicz wrote:
> If host requires MITM protection notify that to controller in
> io capabilities reply even if the remote device requires no bonding.
> 
> If it is not respected, host can get an unauthenticated link key while
> it expects authenticated one.
> 
> Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
> ---
>  net/bluetooth/hci_event.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
> index 087953e..3ee0060 100644
> --- a/net/bluetooth/hci_event.c
> +++ b/net/bluetooth/hci_event.c
> @@ -2369,7 +2369,7 @@ static inline u8 hci_get_auth_req(struct hci_conn *conn)
>  
>  	/* If remote requests no-bonding follow that lead */
>  	if (conn->remote_auth == 0x00 || conn->remote_auth == 0x01)
> -		return 0x00;
> +		return conn->auth_type & 0x01;

I had to change this to:

	return conn->remote_auth | (conn->auth_type & 0x01);

I.e. follow remote requirement and apply the MITM bit to it if the local
requirement has it. Otherwise TP/SEC/SEM/BV-04-C doesn't want to pass
(test vector used is 1.0.39.0). It seems to require us to mirror the
remote MITM requirement. Not sure why hciops is working and I haven't
had the chance to check the logs there. I'm still continuing testing so
we'll see if there are further issues with other test cases.

Johan

  parent reply	other threads:[~2011-04-26 23:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-21  7:54 [PATCH v2 1/6] Bluetooth: Add definitions for link key types Waldemar Rymarkiewicz
2011-04-21  7:54 ` [PATCH v2 2/6] Bluetooth: Don't modify sec_level if auth failed Waldemar Rymarkiewicz
2011-04-21  7:54 ` [PATCH v2 3/6] Bluetooth: Map sec_level to link key requirements Waldemar Rymarkiewicz
2011-04-21 10:02   ` Waldemar.Rymarkiewicz
2011-04-21  7:54 ` [PATCH v2 4/6] Bluetooth: Ignore key unauthenticated for high security Waldemar Rymarkiewicz
2011-04-21  7:54 ` [PATCH v2 5/6] Bluetooth: Double check sec req for pre 2.1 device Waldemar Rymarkiewicz
2011-04-21  9:53   ` Waldemar.Rymarkiewicz
2011-04-21  7:54 ` [PATCH v2 6/6] Bluetooth: Respect local MITM req in io_cap reply Waldemar Rymarkiewicz
2011-04-21  8:10   ` Johan Hedberg
2011-04-21  8:24     ` Waldemar.Rymarkiewicz
2011-04-25 17:09       ` Luiz Augusto von Dentz
2011-04-26 23:59   ` Johan Hedberg [this message]
2011-04-27 23:09   ` [PATCH] " johan.hedberg

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=20110426235923.GA4486@jh-x301 \
    --to=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=padovan@profusion.mobi \
    --cc=waldemar.rymarkiewicz@tieto.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