Linux-Bluetooth Archive on lore.kernel.org
 help / color / Atom feed
* Limiting what devices can pair over Bluetooth?
@ 2020-01-08 11:46 James Pearson
  2020-01-08 18:42 ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 5+ messages in thread
From: James Pearson @ 2020-01-08 11:46 UTC (permalink / raw)
  To: linux-bluetooth

We don't normally enable Bluetooth on Linux (CentOS 7) installs for security reasons, but we have a case where we would like to use a Wacom tablet over Bluetooth

I would like to be able to configure things so Bluetooth can _only_ be used to pair with Wacom tablets (or just HID devices?)

As I never used Bluetooth in anger before, I'm struggling to find out where to start looking - does anyone know how to do this - or any pointers for where I should start looking?

Thanks

James Pearson

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Limiting what devices can pair over Bluetooth?
  2020-01-08 11:46 Limiting what devices can pair over Bluetooth? James Pearson
@ 2020-01-08 18:42 ` Luiz Augusto von Dentz
  2020-01-08 20:15   ` James Pearson
  0 siblings, 1 reply; 5+ messages in thread
From: Luiz Augusto von Dentz @ 2020-01-08 18:42 UTC (permalink / raw)
  To: James Pearson; +Cc: linux-bluetooth

Hi James,

On Wed, Jan 8, 2020 at 3:47 AM James Pearson <james-p@moving-picture.com> wrote:
>
> We don't normally enable Bluetooth on Linux (CentOS 7) installs for security reasons, but we have a case where we would like to use a Wacom tablet over Bluetooth
>
> I would like to be able to configure things so Bluetooth can _only_ be used to pair with Wacom tablets (or just HID devices?)
>
> As I never used Bluetooth in anger before, I'm struggling to find out where to start looking - does anyone know how to do this - or any pointers for where I should start looking?

Are you asking this from the system or user perspective, from the
system we don't have a configuration where you can restrict the types
of devices that the user can pair, on the other hand there is nothing
stopping the user interface (gnome, kde, etc) to implement such policy
on their bluetooth settings, though be aware targeting a subset of HID
devices may not be possible.

-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Limiting what devices can pair over Bluetooth?
  2020-01-08 18:42 ` Luiz Augusto von Dentz
@ 2020-01-08 20:15   ` James Pearson
  2020-01-08 20:53     ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 5+ messages in thread
From: James Pearson @ 2020-01-08 20:15 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

Luiz Augusto von Dentz wrote:
> Hi James,
> 
> On Wed, Jan 8, 2020 at 3:47 AM James Pearson
> <james-p@moving-picture.com> wrote:
>> 
>> We don't normally enable Bluetooth on Linux (CentOS 7) installs for
>> security reasons, but we have a case where we would like to use a
>> Wacom tablet over Bluetooth
>> 
>> I would like to be able to configure things so Bluetooth can _only_
>> be used to pair with Wacom tablets (or just HID devices?)
>> 
>> As I never used Bluetooth in anger before, I'm struggling to find
>> out where to start looking - does anyone know how to do this - or
>> any pointers for where I should start looking?
> 
> Are you asking this from the system or user perspective, from the 
> system we don't have a configuration where you can restrict the
> types of devices that the user can pair, on the other hand there is
> nothing stopping the user interface (gnome, kde, etc) to implement
> such policy on their bluetooth settings, though be aware targeting a
> subset of HID devices may not be possible.

Ideally I would want to limit this at the system level - although I can 
not find anything user interface-wise that mentions limiting access 
either (although I might be looking in the wrong places?)

My aim is to prevent Bluetooth being used (in any way) to transfer 
files/data on/off the workstation

I've found that if I blacklist the bnep, cmtp and rfcomm kernel modules 
(just leaving the bluetooth and hidp kernel modules enabled) then the 
Wacom tablet still works over Bluetooth

Would this be sufficient to prevent any kind of file transfer over 
Bluetooth ?

Thanks

James Pearson

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Limiting what devices can pair over Bluetooth?
  2020-01-08 20:15   ` James Pearson
@ 2020-01-08 20:53     ` Luiz Augusto von Dentz
  2020-01-09 14:53       ` James Pearson
  0 siblings, 1 reply; 5+ messages in thread
From: Luiz Augusto von Dentz @ 2020-01-08 20:53 UTC (permalink / raw)
  To: James Pearson; +Cc: linux-bluetooth

Hi James,

On Wed, Jan 8, 2020 at 12:15 PM James Pearson
<james-p@moving-picture.com> wrote:
>
> Luiz Augusto von Dentz wrote:
> > Hi James,
> >
> > On Wed, Jan 8, 2020 at 3:47 AM James Pearson
> > <james-p@moving-picture.com> wrote:
> >>
> >> We don't normally enable Bluetooth on Linux (CentOS 7) installs for
> >> security reasons, but we have a case where we would like to use a
> >> Wacom tablet over Bluetooth
> >>
> >> I would like to be able to configure things so Bluetooth can _only_
> >> be used to pair with Wacom tablets (or just HID devices?)
> >>
> >> As I never used Bluetooth in anger before, I'm struggling to find
> >> out where to start looking - does anyone know how to do this - or
> >> any pointers for where I should start looking?
> >
> > Are you asking this from the system or user perspective, from the
> > system we don't have a configuration where you can restrict the
> > types of devices that the user can pair, on the other hand there is
> > nothing stopping the user interface (gnome, kde, etc) to implement
> > such policy on their bluetooth settings, though be aware targeting a
> > subset of HID devices may not be possible.
>
> Ideally I would want to limit this at the system level - although I can
> not find anything user interface-wise that mentions limiting access
> either (although I might be looking in the wrong places?)
>
> My aim is to prevent Bluetooth being used (in any way) to transfer
> files/data on/off the workstation
>
> I've found that if I blacklist the bnep, cmtp and rfcomm kernel modules
> (just leaving the bluetooth and hidp kernel modules enabled) then the
> Wacom tablet still works over Bluetooth

bnep is for tethering, depending on the system that might be useful,
and if you block RFCOMM you no only block usage of file transfer but
also HFP, but perhaps you don't care about those so that would be fine
to disable. Btw, for getting file sharing you would just need to
disable obexd though it doesn't seems it is a user service which you
can disable with systemctl.

> Would this be sufficient to prevent any kind of file transfer over
> Bluetooth ?
>
> Thanks
>
> James Pearson



-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Limiting what devices can pair over Bluetooth?
  2020-01-08 20:53     ` Luiz Augusto von Dentz
@ 2020-01-09 14:53       ` James Pearson
  0 siblings, 0 replies; 5+ messages in thread
From: James Pearson @ 2020-01-09 14:53 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

Luiz Augusto von Dentz wrote:
> 
>> My aim is to prevent Bluetooth being used (in any way) to transfer
>> files/data on/off the workstation
>>
>> I've found that if I blacklist the bnep, cmtp and rfcomm kernel modules
>> (just leaving the bluetooth and hidp kernel modules enabled) then the
>> Wacom tablet still works over Bluetooth
> 
> bnep is for tethering, depending on the system that might be useful,
> and if you block RFCOMM you no only block usage of file transfer but
> also HFP, but perhaps you don't care about those so that would be fine
> to disable. Btw, for getting file sharing you would just need to
> disable obexd though it doesn't seems it is a user service which you
> can disable with systemctl.
> 
>> Would this be sufficient to prevent any kind of file transfer over
>> Bluetooth ?

Looks like with these kernel modules disabled, I can still use 
'bluetooth-send' to send a file to a paired (Android) phone ... removing 
the OS provided obexd binary prevents bluetooth-send from running, but 
it doesn't stop a user running their own copy of obexd

So it looks like, in our case, we won't be able to use a Wacom tablet 
over Bluetooth - without opening up a whole can of worms ... which is a 
shame

Thanks

James Pearson

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-08 11:46 Limiting what devices can pair over Bluetooth? James Pearson
2020-01-08 18:42 ` Luiz Augusto von Dentz
2020-01-08 20:15   ` James Pearson
2020-01-08 20:53     ` Luiz Augusto von Dentz
2020-01-09 14:53       ` James Pearson

Linux-Bluetooth Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-bluetooth/0 linux-bluetooth/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-bluetooth linux-bluetooth/ https://lore.kernel.org/linux-bluetooth \
		linux-bluetooth@vger.kernel.org
	public-inbox-index linux-bluetooth

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-bluetooth


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git