All of lore.kernel.org
 help / color / mirror / Atom feed
* [bluez/bluez] 502e34: mgmt: Add defines for the long term key types
@ 2026-09-18  0:52 Pauli Virtanen
  0 siblings, 0 replies; only message in thread
From: Pauli Virtanen @ 2026-09-18  0:52 UTC (permalink / raw)
  To: linux-bluetooth

  Branch: refs/heads/1168152
  Home:   https://github.com/bluez/bluez
  Commit: 502e34b01ab841c0a0d4389e1a03ae697d7d79aa
      https://github.com/bluez/bluez/commit/502e34b01ab841c0a0d4389e1a03ae697d7d79aa
  Author: Pauli Virtanen <pav@iki.fi>
  Date:   2026-09-18 (Fri, 18 Sep 2026)

  Changed paths:
    M lib/bluetooth/mgmt.h

  Log Message:
  -----------
  mgmt: Add defines for the long term key types

Add defines for MGMT_EV_NEW_LONG_TERM_KEY key types.

Assisted-by: opencode:qwen3.8-flash-next


  Commit: c6f309efe3d706c3118334b6cf73d397e720fc10
      https://github.com/bluez/bluez/commit/c6f309efe3d706c3118334b6cf73d397e720fc10
  Author: Pauli Virtanen <pav@iki.fi>
  Date:   2026-09-18 (Fri, 18 Sep 2026)

  Changed paths:
    M profiles/audio/csip.c
    M src/device.c
    M src/device.h

  Log Message:
  -----------
  device: Remove unused central field from struct ltk_info

struct ltk_info::central is only read in btd_device_get_ltk(), but its
only caller in csip.c does not use the output parameter.

Remove the unused field and adjust btd_device_get_ltk() accordingly.

Assisted-by: opencode:qwen3.8-flash-next


  Commit: 2c7b8543fde51a897814274959c3b2e960d6ac93
      https://github.com/bluez/bluez/commit/2c7b8543fde51a897814274959c3b2e960d6ac93
  Author: Pauli Virtanen <pav@iki.fi>
  Date:   2026-09-18 (Fri, 18 Sep 2026)

  Changed paths:
    M src/adapter.c
    M src/device.c
    M src/device.h

  Log Message:
  -----------
  device: Fix resolving a coordinated set over Secure Connections

Commit 9251e630efdd ("device: keep the long term key of both roles")
adds separate central/peripheral slots for LTKs.

Kernel only sets LTK event central flag for legacy pairing:
net/bluetooth/mgmt.c:mgmt_new_ltk() sets it if key->type == SMP_LTK.
For Secure Connections there's then no role difference, and BlueZ puts
those keys to peripheral slot.

CSIP coordinator is GAP Central (CSIP 4.2). To decrypt SIRK in
btd_device_add_set() / add_set() it reads device->ltk central key
which then never exists with Secure Connections.

test_bap.py:test_bap_unicast_set_* implicitly use legacy pairing since
pytest-bluezenv==0.1.9 powers controller on before bluetoothd, so these
tests miss this bug.

Fix by tracking the MGMT LTK type in struct ltk_info so the code knows
which kind of key it has.  For Secure Connections, store the same key in
both slots.  If key type changes, drop both slots, to avoid mixed
legacy/SC keys.

This fixes test_bap.py:test_bap_unicast_set_* with SC enabled, ie if
controller is powered off before bluetoothd start.

Assisted-by: qwen3.8-flash-next


  Commit: 8740847377f05860e9d94cc009f1d264817b6a82
      https://github.com/bluez/bluez/commit/8740847377f05860e9d94cc009f1d264817b6a82
  Author: Pauli Virtanen <pav@iki.fi>
  Date:   2026-09-18 (Fri, 18 Sep 2026)

  Changed paths:
    M test/functional/test_bap.py

  Log Message:
  -----------
  test: functional: run CSIP test for Secure Connections & Legacy Pairing

Parametrize test_bap_unicast_set_transport_created() to test CSIP with
and without Secure connections, toggling it with btmgmt before pairing.

test/functional/test_bap.py::test_bap_unicast_set_transport_created[hosts7-vm3-sc]
test/functional/test_bap.py::test_bap_unicast_set_transport_created[hosts7-vm3-legacy]


Compare: https://github.com/bluez/bluez/compare/502e34b01ab8%5E...8740847377f0

To unsubscribe from these emails, change your notification settings at https://github.com/bluez/bluez/settings/notifications

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-18  0:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-18  0:52 [bluez/bluez] 502e34: mgmt: Add defines for the long term key types Pauli Virtanen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.