From: Marcel Holtmann <marcel@holtmann.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "Jörg Otte" <jrg.otte@gmail.com>,
"Gustavo F. Padovan" <gustavo@padovan.org>,
"Johan Hedberg" <johan.hedberg@gmail.com>,
"bluez mailin list (linux-bluetooth@vger.kernel.org)"
<linux-bluetooth@vger.kernel.org>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: [V4.1] Regression: Bluetooth mouse not working.
Date: Fri, 17 Apr 2015 14:26:04 -0700 [thread overview]
Message-ID: <BD15FF48-C4C3-4FE6-BF24-7BB6B461AE07@holtmann.org> (raw)
In-Reply-To: <CA+55aFz=9pmC5gBY11Lcwizro1KzSt1ms6iUkOLUNJovHu4k4A@mail.gmail.com>
Hi Linus,
>> accepting all flags regardless was an oversight on my part in the first place. What this patch tried to do is to limit it to what userspace is currently actually using. My mistake was to look only at BlueZ 5.x userspace and not at BlueZ 4.x userspace.
>
> So what about anybody else? Android doesn't use BlueZ, afaik. Any
> other direct accesses?
this interface is for bluetoothd (Bluetooth userspace daemon) since you need to do a lot of initial setup before you can hand this over to the kernel to drive HID. On Android this was never used. And even BlueZ for Android (replacement for Bluedroid) is not using it today either.
Google Fiber (their set-top boxes) actually moved this all over to /dev/uhid now since it gives them better re-connect experience for their remotes.
> If we already know that BlueZ 4.x did something else, what makes you
> so sure that this now covers all cases?
I am certain since nothing else than bluetoothd ever used this interface.
> The thing is, the bluetooth code has clearly never cared about these
> bits before. Is there any real reason to think that people haven't
> passed in garbage? Do we even know that those flags were *initialized*
> at all by user space in all use cases?
>
> So I'm ok with trying to fix things up, but I have to say that if the
> fixed-up case also causes problems (because there was some other case
> that you didn't think of), I'm going to be pissed off, and I'm going
> to expect you to *jump* on it, and revert the whole thing.
The reason why I starting cleaning this up is because there is an overlay with internal and external flags mixed together. This is clearly a bug, but sadly that also can open up security issues since we clearly do not want userspace allowing messing with internal flags. That is actually worse.
My viewpoint is the reverting the whole patch is actually not helping here either. So either we take the patch that I just send around to fix the breakage that I caused with BlueZ 4.x userspace. Or an as alternative we keep allowing userspace to provide whatever flags it wants, but clear all unknown ones before using them in the HIDP logic. My intent was to make this old code less vulnerable.
Is one of these options acceptable for you compared to reverting the whole patch?
Regards
Marcel
next prev parent reply other threads:[~2015-04-17 21:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-17 9:36 Jörg Otte
2015-04-17 11:55 ` Luiz Augusto von Dentz
2015-04-17 13:44 ` Linus Torvalds
2015-04-17 14:51 ` Jörg Otte
2015-04-17 16:43 ` Jörg Otte
2015-04-17 16:51 ` Marcel Holtmann
2015-04-17 16:55 ` Jörg Otte
2015-04-17 16:59 ` Jörg Otte
2015-04-17 17:02 ` Marcel Holtmann
2015-04-17 17:19 ` Marcel Holtmann
2015-04-17 20:18 ` Linus Torvalds
2015-04-17 20:35 ` Marcel Holtmann
2015-04-17 21:03 ` Linus Torvalds
2015-04-17 21:26 ` Marcel Holtmann [this message]
2015-04-18 10:18 ` Jörg Otte
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=BD15FF48-C4C3-4FE6-BF24-7BB6B461AE07@holtmann.org \
--to=marcel@holtmann.org \
--cc=gustavo@padovan.org \
--cc=johan.hedberg@gmail.com \
--cc=jrg.otte@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.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
all inboxes | Powered by JetHome®