public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ v5 0/6] Support Sixaxis gamepad with classic bonded only
@ 2025-04-24 16:29 Ludovico de Nittis
  2025-04-24 16:29 ` [PATCH BlueZ v5 1/6] src: Add new CablePairing property Ludovico de Nittis
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Ludovico de Nittis @ 2025-04-24 16:29 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Ludovico de Nittis

This series adds a new "CablePairing" property to allow us to
indentify devices that have been paired using a custom USB cable
cable method and that don't support the canonical bonding with
encryption. With that information, we can dynamically enforce
encryption to drastically reduce the attack surface, compared to just
disabling the "ClassicBondedOnly" property.

The "CablePairing" property is exposed via D-Bus to allow
clients to potentually show this information to end users.

As far as I can tell, starting the listening input server with
BT_IO_SEC_LOW and then bumping it in `hidp_add_connection()` should not
have any negative effect regarding the overall security. However,
please let me know if it turns out not being the case.

Addresses https://github.com/bluez/bluez/issues/1165

Changes in v2:
 - Start the listening input server with BT_IO_SEC_LOW only if we
   actually have a known sixaxis device

Changes in v3:
  - Change the property from being sixaxis specific to a generic
    "CablePairing"
  - Remove the manual validation of Sixaxis HID report descriptor
    because we already replace it with a pre-dermined SDP record
    in `sixaxis.c`

Changes in v4:
  - Instead of setting the server security level in adapter.c, we
    do it when registering the input devices, during probing

Changes in v5:
  - Fix `get_necessary_sec_level()` comment

Ludovico de Nittis (6):
  src: Add new CablePairing property
  client: Print CablePairing property
  sixaxis: Set CablePairing when pairing a Sixaxis with USB
  adapter: Add btd_adapter_has_cable_pairing_devices()
  input: Automatically use sec level low when using a cable paired
    device
  sixaxis: Set security level when adding a sixaxis device

 client/main.c            |  1 +
 doc/org.bluez.Device.rst |  7 +++++
 plugins/sixaxis.c        |  8 ++++-
 profiles/input/device.c  | 20 +++++++++++--
 profiles/input/manager.c |  3 +-
 profiles/input/server.c  | 63 ++++++++++++++++++++++++++++++++++++++--
 profiles/input/server.h  |  3 +-
 src/adapter.c            | 17 +++++++++++
 src/adapter.h            |  1 +
 src/device.c             | 40 +++++++++++++++++++++++++
 src/device.h             |  2 ++
 11 files changed, 157 insertions(+), 8 deletions(-)

-- 
2.49.0


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

end of thread, other threads:[~2025-04-24 17:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-24 16:29 [PATCH BlueZ v5 0/6] Support Sixaxis gamepad with classic bonded only Ludovico de Nittis
2025-04-24 16:29 ` [PATCH BlueZ v5 1/6] src: Add new CablePairing property Ludovico de Nittis
2025-04-24 17:58   ` Support Sixaxis gamepad with classic bonded only bluez.test.bot
2025-04-24 16:29 ` [PATCH BlueZ v5 2/6] client: Print CablePairing property Ludovico de Nittis
2025-04-24 16:29 ` [PATCH BlueZ v5 3/6] sixaxis: Set CablePairing when pairing a Sixaxis with USB Ludovico de Nittis
2025-04-24 16:29 ` [PATCH BlueZ v5 4/6] adapter: Add btd_adapter_has_cable_pairing_devices() Ludovico de Nittis
2025-04-24 16:29 ` [PATCH BlueZ v5 5/6] input: Automatically use sec level low when using a cable paired device Ludovico de Nittis
2025-04-24 16:29 ` [PATCH BlueZ v5 6/6] sixaxis: Set security level when adding a sixaxis device Ludovico de Nittis
2025-04-24 17:20 ` [PATCH BlueZ v5 0/6] Support Sixaxis gamepad with classic bonded only patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox