linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>,
	linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] Fix starting security procedures when not needed
Date: Wed, 11 May 2011 07:54:12 +0300	[thread overview]
Message-ID: <20110511045412.GA4511@ideapad.Elisa> (raw)
In-Reply-To: <BANLkTimFhnHyyJvSE+9wQB+NAS=GppzaZg@mail.gmail.com>

Hi Luiz & Vinicius,

> > In any case, while writing this email, I realized that only checking
> > all bt_io_set() calls wasn't enough, so this patch may be incomplete.
> > All bt_io_listen() users should be safe, but there are some callers
> > of bt_io_connect() that may depend on BtIO setting the default
> > security level to MEDIUM.
> 
> Exactly, so if you really want to use kernel default you will have to
> change all of those, but I don't thing we use any other security level
> more than medium, then it would better not to change it.

The problem is that the same function is used within btio.c for parsing
options, no matter if they're from _set, _connect or _listen. Having an
default to MEDIUM within btio.c means that we don't know when a
bt_io_set caller *doesn't* want to modify the existing security level.
(something the commit message should explain more clearly, btw). So I do
think we need to remove this default from btio.c and have all users set
it explicitly when needed (I could find 2 or 3 places missing it under
audio/ but there could be more). A simple "git grep BT_IO_OPT_" gives a
pretty good overview. Just look for places that give a PSM or RFCOMM
channel but no SEC_LEVEL.

Johan

      reply	other threads:[~2011-05-11  4:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-09 23:49 [PATCH] Fix starting security procedures when not needed Vinicius Costa Gomes
2011-05-10 10:21 ` Luiz Augusto von Dentz
2011-05-10 14:56   ` Vinicius Costa Gomes
2011-05-10 16:29     ` Luiz Augusto von Dentz
2011-05-11  4:54       ` Johan Hedberg [this message]

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=20110511045412.GA4511@ideapad.Elisa \
    --to=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=vinicius.gomes@openbossa.org \
    /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).