Message ID | 20250326193133.2718934-5-luiz.dentz@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 5df9521ce4d50ffa48153503bc5156c11e6ed26b |
Headers | show |
Series | [BlueZ,v2,1/5] device: Attempt to elevate security on Pair while connected | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
diff --git a/src/device.c b/src/device.c index 034491b59d30..057d116be6fc 100644 --- a/src/device.c +++ b/src/device.c @@ -5797,6 +5797,11 @@ static void gatt_client_init(struct btd_device *device) if (btd_opts.gatt_channels > 1) features |= BT_GATT_CHRC_CLI_FEAT_EATT; + if (device->bonding) { + DBG("Elevating security level since bonding is in progress"); + bt_att_set_security(device->att, BT_ATT_SECURITY_MEDIUM); + } + device->client = bt_gatt_client_new(device->db, device->att, device->att_mtu, features); if (!device->client) {
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> When bonding is in progress it means Device.Pair has been called thus the user indicated the intend to pair/bond from the start so the security of bt_att shall be set in order for it to wait until pairing process complete before attempting to proceed with GATT discovery and any other traffic. Fixes: https://github.com/bluez/bluez/issues/1125 --- src/device.c | 5 +++++ 1 file changed, 5 insertions(+)