* Why doesn't plugins/sixaxis.c set devices as Trusted?
@ 2015-07-06 13:17 Bastien Nocera
2015-07-07 4:31 ` Alexander Holler
0 siblings, 1 reply; 8+ messages in thread
From: Bastien Nocera @ 2015-07-06 13:17 UTC (permalink / raw)
To: linux-bluetooth@vger.kernel.org; +Cc: Szymon Janc
Hey,
I don't understand the reason why plugins/sixaxis.c doesn't set the
device as trusted when plugged in.
I would expect the Sixaxis plugin to do that, because there's no way to
assert, in the UI, where the device information is coming from to trust
it automatically, and I don't really want to show a "Do you want to
allow device X to connect as a HID device" for devices which weren't
setup in the UI.
For example, I could create a program on another computer with similar
characteristics (same name, class and service UUIDs) which would make
it indistinguishable from the device that was plugged in.
If security was a problem, we probably shouldn't be setting the master
BD address on the pad unless there's a running agent.
So, do we stop setup_device() early if there's no agent running and set
as trusted, or simply always set as trusted?
Cheers
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Why doesn't plugins/sixaxis.c set devices as Trusted?
2015-07-06 13:17 Why doesn't plugins/sixaxis.c set devices as Trusted? Bastien Nocera
@ 2015-07-07 4:31 ` Alexander Holler
2015-07-07 5:11 ` Bastien Nocera
2015-07-07 14:16 ` Harald Schmitt
0 siblings, 2 replies; 8+ messages in thread
From: Alexander Holler @ 2015-07-07 4:31 UTC (permalink / raw)
To: Bastien Nocera, linux-bluetooth@vger.kernel.org; +Cc: Szymon Janc
Am 06.07.2015 um 15:17 schrieb Bastien Nocera:
> Hey,
>
> I don't understand the reason why plugins/sixaxis.c doesn't set the
> device as trusted when plugged in.
It's because of security. If you trust a bluetooth device on Linux,
you're trusting it for all services. In case of the sixaxis it means
you're not only trusting it (the BT-MAC) as an input device, but also as
a network device.
Now if you trust any plugged in device which says it's a sixaxis, I
would tell my arduino to say it's an sixaxis with a MAC from one of my
BT-dongles to get a magic device which gives me wireless remote access
on every linux box with BT when I plug it in once.
That means you want user interaction, besides just plugging in a device.
Alexander Holler
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Why doesn't plugins/sixaxis.c set devices as Trusted?
2015-07-07 4:31 ` Alexander Holler
@ 2015-07-07 5:11 ` Bastien Nocera
2015-07-07 5:34 ` Alexander Holler
2015-07-07 5:35 ` Bastien Nocera
2015-07-07 14:16 ` Harald Schmitt
1 sibling, 2 replies; 8+ messages in thread
From: Bastien Nocera @ 2015-07-07 5:11 UTC (permalink / raw)
To: Alexander Holler, linux-bluetooth@vger.kernel.org; +Cc: Szymon Janc
On Tue, 2015-07-07 at 06:31 +0200, Alexander Holler wrote:
> Am 06.07.2015 um 15:17 schrieb Bastien Nocera:
> > Hey,
> >
> > I don't understand the reason why plugins/sixaxis.c doesn't set the
> > device as trusted when plugged in.
>
> It's because of security. If you trust a bluetooth device on Linux,
> you're trusting it for all services. In case of the sixaxis it means
> you're not only trusting it (the BT-MAC) as an input device, but also
> as
> a network device.
>
> Now if you trust any plugged in device which says it's a sixaxis, I
> would tell my arduino to say it's an sixaxis with a MAC from one of
> my
> BT-dongles to get a magic device which gives me wireless remote
> access
> on every linux box with BT when I plug it in once.
>
> That means you want user interaction, besides just plugging in a
> device.
What should the pairing process look like then? Because the current
workflow is absolutely dreadful.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Why doesn't plugins/sixaxis.c set devices as Trusted?
2015-07-07 5:11 ` Bastien Nocera
@ 2015-07-07 5:34 ` Alexander Holler
2015-07-07 6:49 ` Alexander Holler
2015-07-07 5:35 ` Bastien Nocera
1 sibling, 1 reply; 8+ messages in thread
From: Alexander Holler @ 2015-07-07 5:34 UTC (permalink / raw)
To: Bastien Nocera, linux-bluetooth@vger.kernel.org; +Cc: Szymon Janc
Am 07.07.2015 um 07:11 schrieb Bastien Nocera:
> On Tue, 2015-07-07 at 06:31 +0200, Alexander Holler wrote:
>> Am 06.07.2015 um 15:17 schrieb Bastien Nocera:
>>> Hey,
>>>
>>> I don't understand the reason why plugins/sixaxis.c doesn't set the
>>> device as trusted when plugged in.
>>
>> It's because of security. If you trust a bluetooth device on Linux,
>> you're trusting it for all services. In case of the sixaxis it means
>> you're not only trusting it (the BT-MAC) as an input device, but also
>> as
>> a network device.
>>
>> Now if you trust any plugged in device which says it's a sixaxis, I
>> would tell my arduino to say it's an sixaxis with a MAC from one of
>> my
>> BT-dongles to get a magic device which gives me wireless remote
>> access
>> on every linux box with BT when I plug it in once.
>>
>> That means you want user interaction, besides just plugging in a
>> device.
>
> What should the pairing process look like then? Because the current
> workflow is absolutely dreadful.
Pairing is something different than trusting a bluetooth device.
No idea what's your problem. If you remove the necessary user
interaction to trust a device, you remove the security. Just plugging in
an (anonymous) usb-device isn't usable as trust.
If Sony decided that's ok for the PS3 (a game console), it's one thing.
But you don't want a wireless remote connected second keyboard or even a
network device if some just plugged in an anonymous usb-device which
might even look totally different than as what it presents itself to the
system.
Alexander Holler
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Why doesn't plugins/sixaxis.c set devices as Trusted?
2015-07-07 5:11 ` Bastien Nocera
2015-07-07 5:34 ` Alexander Holler
@ 2015-07-07 5:35 ` Bastien Nocera
1 sibling, 0 replies; 8+ messages in thread
From: Bastien Nocera @ 2015-07-07 5:35 UTC (permalink / raw)
To: Alexander Holler, linux-bluetooth@vger.kernel.org; +Cc: Szymon Janc
On Tue, 2015-07-07 at 07:11 +0200, Bastien Nocera wrote:
> On Tue, 2015-07-07 at 06:31 +0200, Alexander Holler wrote:
> > Am 06.07.2015 um 15:17 schrieb Bastien Nocera:
> > > Hey,
> > >
> > > I don't understand the reason why plugins/sixaxis.c doesn't set
> > > the
> > > device as trusted when plugged in.
> >
> > It's because of security. If you trust a bluetooth device on Linux,
> >
> > you're trusting it for all services. In case of the sixaxis it
> > means
> > you're not only trusting it (the BT-MAC) as an input device, but
> > also
> > as
> > a network device.
> >
> > Now if you trust any plugged in device which says it's a sixaxis, I
> >
> > would tell my arduino to say it's an sixaxis with a MAC from one of
> >
> > my
> > BT-dongles to get a magic device which gives me wireless remote
> > access
> > on every linux box with BT when I plug it in once.
> >
> > That means you want user interaction, besides just plugging in a
> > device.
>
> What should the pairing process look like then? Because the current
> workflow is absolutely dreadful.
To solve that problem, I would:
1) disable the pairing altogether if there's no agent running
2) request auth to connect to the computer when the device is getting
plugged in, not X minutes later when you want to start using the joypad
wirelessly
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Why doesn't plugins/sixaxis.c set devices as Trusted?
2015-07-07 5:34 ` Alexander Holler
@ 2015-07-07 6:49 ` Alexander Holler
0 siblings, 0 replies; 8+ messages in thread
From: Alexander Holler @ 2015-07-07 6:49 UTC (permalink / raw)
To: Bastien Nocera, linux-bluetooth@vger.kernel.org; +Cc: Szymon Janc
Am 07.07.2015 um 07:34 schrieb Alexander Holler:
> Am 07.07.2015 um 07:11 schrieb Bastien Nocera:
>> On Tue, 2015-07-07 at 06:31 +0200, Alexander Holler wrote:
>>> Am 06.07.2015 um 15:17 schrieb Bastien Nocera:
>>>> Hey,
>>>>
>>>> I don't understand the reason why plugins/sixaxis.c doesn't set the
>>>> device as trusted when plugged in.
>>>
>>> It's because of security. If you trust a bluetooth device on Linux,
>>> you're trusting it for all services. In case of the sixaxis it means
>>> you're not only trusting it (the BT-MAC) as an input device, but also
>>> as
>>> a network device.
>>>
>>> Now if you trust any plugged in device which says it's a sixaxis, I
>>> would tell my arduino to say it's an sixaxis with a MAC from one of
>>> my
>>> BT-dongles to get a magic device which gives me wireless remote
>>> access
>>> on every linux box with BT when I plug it in once.
>>>
>>> That means you want user interaction, besides just plugging in a
>>> device.
>>
>> What should the pairing process look like then? Because the current
>> workflow is absolutely dreadful.
>
> Pairing is something different than trusting a bluetooth device.
>
> No idea what's your problem. If you remove the necessary user
> interaction to trust a device, you remove the security. Just plugging in
> an (anonymous) usb-device isn't usable as trust.
>
> If Sony decided that's ok for the PS3 (a game console), it's one thing.
>
> But you don't want a wireless remote connected second keyboard or even a
> network device if some just plugged in an anonymous usb-device which
> might even look totally different than as what it presents itself to the
> system.
Just to say it in more clear words. The trust you wanted to give
automatically does not disappear when the the plugged in device will be
removed. And furthermore the trust is for a different, wireless
connected, device, you don't see if you examine the computer.
That's why there is absolutely a need to make the user aware that he is
going to trust a wireless device.
Alexander Holler
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Why doesn't plugins/sixaxis.c set devices as Trusted?
2015-07-07 4:31 ` Alexander Holler
2015-07-07 5:11 ` Bastien Nocera
@ 2015-07-07 14:16 ` Harald Schmitt
2015-07-09 20:26 ` Alexander Holler
1 sibling, 1 reply; 8+ messages in thread
From: Harald Schmitt @ 2015-07-07 14:16 UTC (permalink / raw)
To: linux-bluetooth@vger.kernel.org
Am 07.07.2015 um 06:31 schrieb Alexander Holler:
> Am 06.07.2015 um 15:17 schrieb Bastien Nocera:
>> Hey,
>>
>> I don't understand the reason why plugins/sixaxis.c doesn't set the
>> device as trusted when plugged in.
>
> It's because of security. If you trust a bluetooth device on Linux,
> you're trusting it for all services.
Just as a side note: This is not a good security rule. Why should I
trust a game controller on any other service then controlling my game moves?
Best regrads,
Harald
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Why doesn't plugins/sixaxis.c set devices as Trusted?
2015-07-07 14:16 ` Harald Schmitt
@ 2015-07-09 20:26 ` Alexander Holler
0 siblings, 0 replies; 8+ messages in thread
From: Alexander Holler @ 2015-07-09 20:26 UTC (permalink / raw)
To: Harald Schmitt, linux-bluetooth@vger.kernel.org
Am 07.07.2015 um 16:16 schrieb Harald Schmitt:
> Am 07.07.2015 um 06:31 schrieb Alexander Holler:
>> Am 06.07.2015 um 15:17 schrieb Bastien Nocera:
>>> Hey,
>>>
>>> I don't understand the reason why plugins/sixaxis.c doesn't set the
>>> device as trusted when plugged in.
>>
>> It's because of security. If you trust a bluetooth device on Linux,
>> you're trusting it for all services.
> Just as a side note: This is not a good security rule. Why should I
> trust a game controller on any other service then controlling my game
> moves?
Also differentiating a network service from an input service wouldn't be
that hard (at least at OS level), it won't help much in regard to the
topic because you can't really differentiate a gamepad from a keyboard
(both are HID input devices).
And you just don't want to automatically enable (trust) a (wireless)
remote input (especially a keyboard) if someone managed it to plug in
some USB device into your Linux box without any user interaction.
Regards,
Alexander Holler
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-07-09 20:26 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-06 13:17 Why doesn't plugins/sixaxis.c set devices as Trusted? Bastien Nocera
2015-07-07 4:31 ` Alexander Holler
2015-07-07 5:11 ` Bastien Nocera
2015-07-07 5:34 ` Alexander Holler
2015-07-07 6:49 ` Alexander Holler
2015-07-07 5:35 ` Bastien Nocera
2015-07-07 14:16 ` Harald Schmitt
2015-07-09 20:26 ` Alexander Holler
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).