* [PATCH BlueZ v2 0/5] shared: Use util_iov helpers in gatt-db, hog, asha and micp
@ 2026-11-11 20:39 Luiz Augusto von Dentz
2026-11-11 20:39 ` [PATCH BlueZ v2 1/5] shared/gatt-db: Use util_iov helpers to build and parse values Luiz Augusto von Dentz
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: Luiz Augusto von Dentz @ 2026-11-11 20:39 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This continues the conversion of the GATT code in src/shared to the
util_iov_pull_* and util_iov_push_* helpers, so that the bounds check is
part of the access, now for gatt-db and the HoG, ASHA and MICP profiles.
The conversions are meant to be behavior preserving and are covered by
the existing unit tests (test-gatt, test-hog, test-micp). The existing
code already checked the lengths in the HoG and ASHA readers, so no new
tests were added for them.
The one bug found is in micp: a Mute State notification with no value
made micp_mute_state_notify read a byte past the value. It is fixed, but
there is no test for it since the scripted test-micp client flow does
not deliver a notification to that handler, so it could not be
reproduced.
bap, rap and the remaining profiles will follow in separate series.
v2:
- gatt-db: don't update the database hash from incomplete input when
allocating a hash entry fails, keep the current hash and retry the
update later (review feedback on v1).
Luiz Augusto von Dentz (5):
shared/gatt-db: Use util_iov helpers to build and parse values
shared/hog: Use util_iov helpers to parse characteristic values
shared/asha: Use util_iov helpers to parse characteristic values
shared/micp: Fix reading Mute State from an empty notification
shared/micp: Use util_iov_pull_mem instead of a local helper
src/shared/asha.c | 52 +++++++----
src/shared/gatt-db.c | 215 ++++++++++++++++++++++++++-----------------
src/shared/hog.c | 62 +++++++------
src/shared/micp.c | 28 +++---
4 files changed, 211 insertions(+), 146 deletions(-)
--
2.56.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH BlueZ v2 1/5] shared/gatt-db: Use util_iov helpers to build and parse values
2026-11-11 20:39 [PATCH BlueZ v2 0/5] shared: Use util_iov helpers in gatt-db, hog, asha and micp Luiz Augusto von Dentz
@ 2026-11-11 20:39 ` Luiz Augusto von Dentz
2026-11-12 2:09 ` shared: Use util_iov helpers in gatt-db, hog, asha and micp bluez.test.bot
2026-11-11 20:39 ` [PATCH BlueZ v2 2/5] shared/hog: Use util_iov helpers to parse characteristic values Luiz Augusto von Dentz
` (3 subsequent siblings)
4 siblings, 1 reply; 7+ messages in thread
From: Luiz Augusto von Dentz @ 2026-11-11 20:39 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Build the hash input, characteristic, include and service declarations
with util_iov_push_*, and parse declaration values in the
gatt_db_attribute_get_*_data functions with util_iov_pull_* so they are
checked against the stored value length.
The hash input allocation is now also checked. If it fails the hash is
not updated from the incomplete input and the update is retried later.
Assisted-by: OpenCode:claude-sonnet-5.5
---
src/shared/gatt-db.c | 215 ++++++++++++++++++++++++++-----------------
1 file changed, 129 insertions(+), 86 deletions(-)
diff --git a/src/shared/gatt-db.c b/src/shared/gatt-db.c
index 23c705bd9d16..76f06899f6aa 100644
--- a/src/shared/gatt-db.c
+++ b/src/shared/gatt-db.c
@@ -372,13 +372,14 @@ static void handle_notify(void *data, void *user_data)
struct hash_data {
struct iovec *iov;
uint16_t i;
+ bool failed;
};
static void gen_hash_m(struct gatt_db_attribute *attr, void *user_data)
{
struct hash_data *hash = user_data;
- uint8_t *data;
- size_t len;
+ struct iovec iov = {};
+ bool with_value;
if (!attr || !attr->value)
return;
@@ -391,30 +392,33 @@ static void gen_hash_m(struct gatt_db_attribute *attr, void *user_data)
case GATT_SND_SVC_UUID:
case GATT_INCLUDE_UUID:
case GATT_CHARAC_UUID:
- /* Allocate space for handle + type + value */
- len = 2 + 2 + attr->value_len;
- data = malloc(2 + 2 + attr->value_len);
- put_le16(attr->handle, data);
- bt_uuid_to_le(&attr->uuid, data + 2);
- memcpy(data + 4, attr->value, attr->value_len);
+ with_value = true;
break;
case GATT_CHARAC_USER_DESC_UUID:
case GATT_CLIENT_CHARAC_CFG_UUID:
case GATT_SERVER_CHARAC_CFG_UUID:
case GATT_CHARAC_FMT_UUID:
case GATT_CHARAC_AGREG_FMT_UUID:
- /* Allocate space for handle + type */
- len = 2 + 2;
- data = malloc(2 + 2 + attr->value_len);
- put_le16(attr->handle, data);
- bt_uuid_to_le(&attr->uuid, data + 2);
+ with_value = false;
break;
default:
return;
}
- hash->iov[hash->i].iov_base = data;
- hash->iov[hash->i].iov_len = len;
+ /* Allocate space for handle + type + value */
+ iov.iov_base = malloc(2 + 2 + attr->value_len);
+ if (!iov.iov_base) {
+ hash->failed = true;
+ return;
+ }
+
+ util_iov_push_le16(&iov, attr->handle);
+ util_iov_push_le16(&iov, attr->uuid.value.u16);
+
+ if (with_value)
+ util_iov_push_mem(&iov, attr->value_len, attr->value);
+
+ hash->iov[hash->i] = iov;
hash->i++;
@@ -439,10 +443,17 @@ static bool db_hash_update(void *user_data)
hash.iov = new0(struct iovec, db->last_handle + 1);
hash.i = 0;
+ hash.failed = false;
gatt_db_foreach_service(db, NULL, service_gen_hash_m, &hash);
- bt_crypto_gatt_hash(db->crypto, hash.iov, db->last_handle + 1,
- db->hash);
+
+ /* Don't hash incomplete input, keep the hash and try again later */
+ if (hash.failed)
+ db->hash_id = timeout_add(HASH_UPDATE_TIMEOUT, db_hash_update,
+ db, NULL);
+ else
+ bt_crypto_gatt_hash(db->crypto, hash.iov,
+ db->last_handle + 1, db->hash);
for (i = 0; i < hash.i; i++)
free(hash.iov[i].iov_base);
@@ -563,41 +574,57 @@ bool gatt_db_isempty(struct gatt_db *db)
return queue_isempty(db->services);
}
-static int uuid_to_le(const bt_uuid_t *uuid, uint8_t *dst)
+static bool push_uuid_le(struct iovec *iov, const bt_uuid_t *uuid)
{
bt_uuid_t uuid128;
+ void *data;
- if (uuid->type == BT_UUID16) {
- put_le16(uuid->value.u16, dst);
- return bt_uuid_len(uuid);
- }
+ if (uuid->type == BT_UUID16)
+ return util_iov_push_le16(iov, uuid->value.u16) != NULL;
bt_uuid_to_uuid128(uuid, &uuid128);
- bswap_128(&uuid128.value.u128, dst);
- return bt_uuid_len(&uuid128);
+
+ data = util_iov_push(iov, sizeof(uuid128.value.u128));
+ if (!data)
+ return false;
+
+ bswap_128(&uuid128.value.u128, data);
+
+ return true;
}
-static bool le_to_uuid(const uint8_t *src, size_t len, bt_uuid_t *uuid)
+/* Pull a 16, 32 or 128 bits UUID taking all the remaining data in iov */
+static bool pull_uuid_le(struct iovec *iov, bt_uuid_t *uuid)
{
uint128_t u128;
+ uint16_t u16;
+ uint32_t u32;
+ void *data;
- if (len == 2) {
- bt_uuid16_create(uuid, get_le16(src));
+ switch (iov->iov_len) {
+ case 2:
+ if (!util_iov_pull_le16(iov, &u16))
+ return false;
+
+ bt_uuid16_create(uuid, u16);
return true;
- }
+ case 4:
+ if (!util_iov_pull_le32(iov, &u32))
+ return false;
- if (len == 4) {
- bt_uuid32_create(uuid, get_le32(src));
+ bt_uuid32_create(uuid, u32);
return true;
- }
+ case 16:
+ data = util_iov_pull_mem(iov, sizeof(u128));
+ if (!data)
+ return false;
- if (len != 16)
+ bswap_128(data, &u128);
+ bt_uuid128_create(uuid, u128);
+ return true;
+ default:
return false;
-
- bswap_128(src, &u128);
- bt_uuid128_create(uuid, u128);
-
- return true;
+ }
}
static struct gatt_db_service *gatt_db_service_create(const bt_uuid_t *uuid,
@@ -608,7 +635,7 @@ static struct gatt_db_service *gatt_db_service_create(const bt_uuid_t *uuid,
struct gatt_db_service *service;
const bt_uuid_t *type;
uint8_t value[16];
- uint16_t len;
+ struct iovec iov = { value, 0 };
if (num_handles < 1)
return NULL;
@@ -621,10 +648,10 @@ static struct gatt_db_service *gatt_db_service_create(const bt_uuid_t *uuid,
else
type = &secondary_service_uuid;
- len = uuid_to_le(uuid, value);
+ push_uuid_le(&iov, uuid);
service->attributes[0] = new_attribute(service, handle, type, value,
- len);
+ iov.iov_len);
if (!service->attributes[0]) {
gatt_db_service_destroy(service);
return NULL;
@@ -943,6 +970,14 @@ static uint16_t service_get_attribute_index(struct gatt_db_service *service,
return i;
}
+static void push_chrc_decl(struct iovec *iov, uint8_t properties,
+ uint16_t value_handle, const bt_uuid_t *uuid)
+{
+ util_iov_push_u8(iov, properties);
+ util_iov_push_le16(iov, value_handle);
+ push_uuid_le(iov, uuid);
+}
+
static struct gatt_db_attribute *
service_insert_characteristic(struct gatt_db_service *service,
uint16_t handle,
@@ -956,7 +991,7 @@ service_insert_characteristic(struct gatt_db_service *service,
{
struct gatt_db_attribute **chrc;
uint8_t value[MAX_CHAR_DECL_VALUE_LEN];
- uint16_t len = 0;
+ struct iovec iov = { value, 0 };
int i;
/* Check if handle is in within service range */
@@ -980,17 +1015,12 @@ service_insert_characteristic(struct gatt_db_service *service,
if (!i)
return NULL;
- value[0] = properties;
- len += sizeof(properties);
-
/* We set handle of characteristic value, which will be added next */
- put_le16(value_handle, &value[1]);
- len += sizeof(uint16_t);
- len += uuid_to_le(uuid, &value[3]);
+ push_chrc_decl(&iov, properties, value_handle, uuid);
service->attributes[i] = new_attribute(service, handle,
&characteristic_uuid,
- value, len);
+ value, iov.iov_len);
if (!service->attributes[i])
return NULL;
@@ -1014,7 +1044,8 @@ service_insert_characteristic(struct gatt_db_service *service,
}
/* Update handle of characteristic value_handle if it has changed */
- put_le16(value_handle, &value[1]);
+ iov.iov_len = 0;
+ push_chrc_decl(&iov, properties, value_handle, uuid);
if (!(*chrc)->value) {
free(*chrc);
@@ -1022,8 +1053,8 @@ service_insert_characteristic(struct gatt_db_service *service,
return NULL;
}
- if (memcmp((*chrc)->value, value, len))
- memcpy((*chrc)->value, value, len);
+ if (memcmp((*chrc)->value, iov.iov_base, iov.iov_len))
+ memcpy((*chrc)->value, iov.iov_base, iov.iov_len);
set_attribute_data(service->attributes[i], read_func, write_func,
permissions, user_data);
@@ -1349,7 +1380,8 @@ service_insert_included(struct gatt_db_service *service, uint16_t handle,
{
struct gatt_db_service *included;
uint8_t value[MAX_INCLUDED_VALUE_LEN];
- uint16_t included_handle, len = 0;
+ struct iovec iov = { value, 0 };
+ uint16_t included_handle;
int index;
if (!include || !include->value || !include->service || !service)
@@ -1363,19 +1395,14 @@ service_insert_included(struct gatt_db_service *service, uint16_t handle,
included_handle = include->handle;
- put_le16(included_handle, &value[len]);
- len += sizeof(uint16_t);
-
- put_le16(included_handle + included->num_handles - 1, &value[len]);
- len += sizeof(uint16_t);
+ util_iov_push_le16(&iov, included_handle);
+ util_iov_push_le16(&iov, included_handle + included->num_handles - 1);
/* The Service UUID shall only be present when the UUID is a 16-bit
* Bluetooth UUID. Vol 2. Part G. 3.2
*/
- if (include->value_len == sizeof(uint16_t)) {
- memcpy(&value[len], include->value, include->value_len);
- len += include->value_len;
- }
+ if (include->value_len == sizeof(uint16_t))
+ util_iov_push_mem(&iov, include->value_len, include->value);
index = service_get_attribute_index(service, &handle, 0);
if (!index)
@@ -1383,7 +1410,7 @@ service_insert_included(struct gatt_db_service *service, uint16_t handle,
service->attributes[index] = new_attribute(service, handle,
&included_service_uuid,
- value, len);
+ value, iov.iov_len);
if (!service->attributes[index])
return NULL;
@@ -1953,28 +1980,19 @@ bool gatt_db_attribute_get_service_uuid(const struct gatt_db_attribute *attrib,
bt_uuid_t *uuid)
{
struct gatt_db_service *service;
+ struct gatt_db_attribute *decl;
if (!attrib || !uuid)
return false;
service = attrib->service;
+ decl = service->attributes[0];
- if (service->attributes[0]->value_len == sizeof(uint16_t)) {
- uint16_t value;
-
- value = get_le16(service->attributes[0]->value);
- bt_uuid16_create(uuid, value);
-
- return true;
- }
-
- if (service->attributes[0]->value_len == sizeof(uint128_t)) {
- uint128_t value;
-
- bswap_128(service->attributes[0]->value, &value);
- bt_uuid128_create(uuid, value);
+ if (decl->value_len == sizeof(uint16_t) ||
+ decl->value_len == sizeof(uint128_t)) {
+ struct iovec iov = { decl->value, decl->value_len };
- return true;
+ return pull_uuid_le(&iov, uuid);
}
return false;
@@ -2005,6 +2023,7 @@ bool gatt_db_attribute_get_service_data(const struct gatt_db_attribute *attrib,
{
struct gatt_db_service *service;
struct gatt_db_attribute *decl;
+ struct iovec iov;
if (!attrib)
return false;
@@ -2024,7 +2043,10 @@ bool gatt_db_attribute_get_service_data(const struct gatt_db_attribute *attrib,
* The service declaration attribute value is the 16 or 128 bit service
* UUID.
*/
- return le_to_uuid(decl->value, decl->value_len, uuid);
+ iov.iov_base = decl->value;
+ iov.iov_len = decl->value_len;
+
+ return pull_uuid_le(&iov, uuid);
}
static void read_ext_prop_value(struct gatt_db_attribute *attrib,
@@ -2091,6 +2113,10 @@ bool gatt_db_attribute_get_char_data(const struct gatt_db_attribute *attrib,
uint16_t *ext_prop,
bt_uuid_t *uuid)
{
+ struct iovec iov;
+ uint8_t props;
+ uint16_t vhandle;
+
if (!attrib)
return false;
@@ -2117,22 +2143,29 @@ bool gatt_db_attribute_get_char_data(const struct gatt_db_attribute *attrib,
attrib->value_len != 19))
return false;
+ iov.iov_base = attrib->value;
+ iov.iov_len = attrib->value_len;
+
+ if (!util_iov_pull_u8(&iov, &props) ||
+ !util_iov_pull_le16(&iov, &vhandle))
+ return false;
+
+ if (uuid && !pull_uuid_le(&iov, uuid))
+ return false;
+
if (handle)
*handle = attrib->handle;
if (properties)
- *properties = attrib->value[0];
+ *properties = props;
if (ext_prop)
*ext_prop = get_char_extended_prop(attrib);
if (value_handle)
- *value_handle = get_le16(attrib->value + 1);
-
- if (!uuid)
- return true;
+ *value_handle = vhandle;
- return le_to_uuid(attrib->value + 3, attrib->value_len - 3, uuid);
+ return true;
}
bool gatt_db_attribute_get_incl_data(const struct gatt_db_attribute *attrib,
@@ -2140,6 +2173,9 @@ bool gatt_db_attribute_get_incl_data(const struct gatt_db_attribute *attrib,
uint16_t *start_handle,
uint16_t *end_handle)
{
+ struct iovec iov;
+ uint16_t start, end;
+
if (!attrib)
return false;
@@ -2155,6 +2191,13 @@ bool gatt_db_attribute_get_incl_data(const struct gatt_db_attribute *attrib,
if (!attrib->value || attrib->value_len < 4 || attrib->value_len > 6)
return false;
+ iov.iov_base = attrib->value;
+ iov.iov_len = attrib->value_len;
+
+ if (!util_iov_pull_le16(&iov, &start) ||
+ !util_iov_pull_le16(&iov, &end))
+ return false;
+
/*
* We only return the handles since the UUID can be easily obtained
* from the corresponding attribute.
@@ -2163,10 +2206,10 @@ bool gatt_db_attribute_get_incl_data(const struct gatt_db_attribute *attrib,
*handle = attrib->handle;
if (start_handle)
- *start_handle = get_le16(attrib->value);
+ *start_handle = start;
if (end_handle)
- *end_handle = get_le16(attrib->value + 2);
+ *end_handle = end;
return true;
}
--
2.56.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH BlueZ v2 2/5] shared/hog: Use util_iov helpers to parse characteristic values
2026-11-11 20:39 [PATCH BlueZ v2 0/5] shared: Use util_iov helpers in gatt-db, hog, asha and micp Luiz Augusto von Dentz
2026-11-11 20:39 ` [PATCH BlueZ v2 1/5] shared/gatt-db: Use util_iov helpers to build and parse values Luiz Augusto von Dentz
@ 2026-11-11 20:39 ` Luiz Augusto von Dentz
2026-11-11 20:39 ` [PATCH BlueZ v2 3/5] shared/asha: " Luiz Augusto von Dentz
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Luiz Augusto von Dentz @ 2026-11-11 20:39 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Parse Report Reference, External Report Reference, HID Information, SCI
Mode, SCI Information and Protocol Mode values with util_iov_pull_*
instead of indexing the value, so every field is checked against the
length of the value that was read.
Assisted-by: OpenCode:claude-sonnet-5.5
---
src/shared/hog.c | 62 +++++++++++++++++++++++++++---------------------
1 file changed, 35 insertions(+), 27 deletions(-)
diff --git a/src/shared/hog.c b/src/shared/hog.c
index ca560831bb14..e62423fa4c33 100644
--- a/src/shared/hog.c
+++ b/src/shared/hog.c
@@ -267,12 +267,14 @@ static void ccc_read_cb(bool success, uint8_t att_ecode,
{
struct report *report = user_data;
struct bt_hog *hog = report->hog;
+ struct iovec iov = { (void *)value, length };
+ uint16_t ccc;
if (!success)
DBG(hog, "Error reading CCC value: 0x%02x", att_ecode);
- else if (length == 2)
+ else if (length == 2 && util_iov_pull_le16(&iov, &ccc))
DBG(hog, "Report 0x%04x: CCC 0x%04x",
- report->value_handle, get_le16(value));
+ report->value_handle, ccc);
/* Enable notifications regardless, as the HID Device may not
* persist them.
@@ -286,6 +288,7 @@ static void report_reference_cb(bool success, uint8_t att_ecode,
{
struct report *report = user_data;
struct bt_hog *hog = report->hog;
+ struct iovec iov = { (void *)value, length };
if (!success) {
DBG(hog, "Read Report Reference descriptor failed: 0x%02x",
@@ -300,8 +303,9 @@ static void report_reference_cb(bool success, uint8_t att_ecode,
cache_value(hog, report->ref_handle, value, length);
- report->id = value[0];
- report->type = value[1];
+ if (!util_iov_pull_u8(&iov, &report->id) ||
+ !util_iov_pull_u8(&iov, &report->type))
+ return;
DBG(hog, "Report 0x%04x: id 0x%02x type %s", report->value_handle,
report->id, type_to_string(report->type));
@@ -438,6 +442,7 @@ static void external_report_reference_cb(bool success, uint8_t att_ecode,
{
struct ext_ref *ref = user_data;
struct bt_hog *hog = ref->hog;
+ struct iovec iov = { (void *)value, length };
uint16_t uuid16;
if (!success) {
@@ -454,7 +459,9 @@ static void external_report_reference_cb(bool success, uint8_t att_ecode,
cache_value(hog, ref->handle, value, length);
- uuid16 = get_le16(value);
+ if (!util_iov_pull_le16(&iov, &uuid16))
+ goto done;
+
DBG(hog, "External report reference read, external report "
"characteristic UUID: 0x%04x", uuid16);
@@ -901,20 +908,19 @@ static void sci_mode_read_cb(bool success, uint8_t att_ecode,
void *user_data)
{
struct bt_hog *hog = user_data;
+ struct iovec iov = { (void *)value, length };
if (!success) {
DBG(hog, "HID SCI Mode read failed: 0x%02x", att_ecode);
return;
}
- if (length != 1) {
+ if (length != 1 || !util_iov_pull_u8(&iov, &hog->sci_mode)) {
DBG(hog, "Malformed HID SCI Mode: length %u", length);
return;
}
- hog->sci_mode = value[0];
-
- DBG(hog, "SCI Mode: 0x%02X", value[0]);
+ DBG(hog, "SCI Mode: 0x%02X", hog->sci_mode);
}
@@ -923,6 +929,7 @@ static void sci_info_read_cb(bool success, uint8_t att_ecode,
void *user_data)
{
struct bt_hog *hog = user_data;
+ struct iovec iov = { (void *)value, length };
uint8_t min_conn_interval;
uint8_t num_grps;
uint8_t i;
@@ -932,25 +939,23 @@ static void sci_info_read_cb(bool success, uint8_t att_ecode,
return;
}
- if (length < 2) {
+ if (!util_iov_pull_u8(&iov, &min_conn_interval) ||
+ !util_iov_pull_u8(&iov, &num_grps)) {
DBG(hog, "Malformed HID SCI Information: length %u", length);
return;
}
- min_conn_interval = value[0];
- num_grps = value[1];
-
DBG(hog, "SCI Info: Minimum Supported Connection Interval: %.3f ms "
"(0x%02x) Number of Supported Subgroups: %d",
min_conn_interval * 0.125, min_conn_interval, num_grps);
- for (i = 0; i < num_grps && (2 + i * 6 + 5) < length; i++) {
+ for (i = 0; i < num_grps; i++) {
uint16_t min, max, stride;
- size_t off = 2 + i * 6;
- min = get_le16(&value[off]);
- max = get_le16(&value[off + 2]);
- stride = get_le16(&value[off + 4]);
+ if (!util_iov_pull_le16(&iov, &min) ||
+ !util_iov_pull_le16(&iov, &max) ||
+ !util_iov_pull_le16(&iov, &stride))
+ break;
DBG(hog, " Subgroup[%u]: Min %.3f ms Max %.3f ms "
"Stride %.3f ms", i, min * 0.125, max * 0.125,
@@ -963,15 +968,14 @@ static void sci_mode_notify_cb(uint16_t value_handle, const uint8_t *value,
uint16_t length, void *user_data)
{
struct bt_hog *hog = user_data;
+ struct iovec iov = { (void *)value, length };
- if (length != 1) {
+ if (length != 1 || !util_iov_pull_u8(&iov, &hog->sci_mode)) {
DBG(hog, "Malformed HID SCI Mode notification: length %u",
length);
return;
}
- hog->sci_mode = value[0];
-
DBG(hog, "SCI Mode changed: 0x%02X", hog->sci_mode);
if (hog->sci_mode_func)
@@ -1007,6 +1011,7 @@ static void info_read_cb(bool success, uint8_t att_ecode,
void *user_data)
{
struct bt_hog *hog = user_data;
+ struct iovec iov = { (void *)value, length };
if (!success) {
DBG(hog, "HID Information read failed: 0x%02x", att_ecode);
@@ -1020,9 +1025,10 @@ static void info_read_cb(bool success, uint8_t att_ecode,
cache_value(hog, hog->info_handle, value, length);
- hog->bcdhid = get_le16(&value[0]);
- hog->bcountrycode = value[2];
- hog->flags = value[3];
+ if (!util_iov_pull_le16(&iov, &hog->bcdhid) ||
+ !util_iov_pull_u8(&iov, &hog->bcountrycode) ||
+ !util_iov_pull_u8(&iov, &hog->flags))
+ return;
DBG(hog, "bcdHID: 0x%04X bCountryCode: 0x%02X Flags: 0x%02X",
hog->bcdhid, hog->bcountrycode, hog->flags);
@@ -1047,6 +1053,8 @@ static void proto_mode_read_cb(bool success, uint8_t att_ecode,
void *user_data)
{
struct bt_hog *hog = user_data;
+ struct iovec iov = { (void *)value, length };
+ uint8_t mode;
if (!success) {
DBG(hog, "Protocol Mode characteristic read failed: 0x%02x",
@@ -1054,12 +1062,12 @@ static void proto_mode_read_cb(bool success, uint8_t att_ecode,
return;
}
- if (length < 1) {
+ if (!util_iov_pull_u8(&iov, &mode)) {
DBG(hog, "Malformed Protocol Mode: length %u", length);
return;
}
- if (value[0] == HOG_PROTO_MODE_BOOT) {
+ if (mode == HOG_PROTO_MODE_BOOT) {
uint8_t nval = HOG_PROTO_MODE_REPORT;
DBG(hog, "HoG is operating in Boot Protocol Mode");
@@ -1067,7 +1075,7 @@ static void proto_mode_read_cb(bool success, uint8_t att_ecode,
bt_gatt_client_write_without_response(hog->client,
hog->proto_mode_handle, false,
&nval, sizeof(nval));
- } else if (value[0] == HOG_PROTO_MODE_REPORT)
+ } else if (mode == HOG_PROTO_MODE_REPORT)
DBG(hog, "HoG is operating in Report Protocol Mode");
}
--
2.56.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH BlueZ v2 3/5] shared/asha: Use util_iov helpers to parse characteristic values
2026-11-11 20:39 [PATCH BlueZ v2 0/5] shared: Use util_iov helpers in gatt-db, hog, asha and micp Luiz Augusto von Dentz
2026-11-11 20:39 ` [PATCH BlueZ v2 1/5] shared/gatt-db: Use util_iov helpers to build and parse values Luiz Augusto von Dentz
2026-11-11 20:39 ` [PATCH BlueZ v2 2/5] shared/hog: Use util_iov helpers to parse characteristic values Luiz Augusto von Dentz
@ 2026-11-11 20:39 ` Luiz Augusto von Dentz
2026-11-11 20:39 ` [PATCH BlueZ v2 4/5] shared/micp: Fix reading Mute State from an empty notification Luiz Augusto von Dentz
2026-11-11 20:39 ` [PATCH BlueZ v2 5/5] shared/micp: Use util_iov_pull_mem instead of a local helper Luiz Augusto von Dentz
4 siblings, 0 replies; 7+ messages in thread
From: Luiz Augusto von Dentz @ 2026-11-11 20:39 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Parse the Read Only Properties and PSM values with util_iov_pull_*
instead of indexing the value at fixed offsets.
Assisted-by: OpenCode:claude-sonnet-5.5
---
src/shared/asha.c | 52 ++++++++++++++++++++++++++++++++---------------
1 file changed, 36 insertions(+), 16 deletions(-)
diff --git a/src/shared/asha.c b/src/shared/asha.c
index 07327cd4b8f1..2ce61fd13e96 100644
--- a/src/shared/asha.c
+++ b/src/shared/asha.c
@@ -368,19 +368,18 @@ static void read_psm(bool success,
void *user_data)
{
struct bt_asha *asha = user_data;
+ struct iovec iov = { (void *)value, length };
if (!success) {
DBG("Reading PSM failed with ATT error: %u", att_ecode);
return;
}
- if (length != 2) {
+ if (length != 2 || !util_iov_pull_le16(&iov, &asha->psm)) {
DBG("Reading PSM failed: unexpected length %u", length);
return;
}
- asha->psm = get_le16(value);
-
DBG("Got PSM: %u", asha->psm);
check_probe_done(asha);
@@ -393,41 +392,62 @@ static void read_rops(bool success,
void *user_data)
{
struct bt_asha *asha = user_data;
+ struct iovec iov = { (void *)value, length };
+ uint8_t version, caps, features;
+ uint16_t render_delay, codec_ids;
+ uint8_t *hisyncid;
if (!success) {
DBG("Reading ROPs failed with ATT error: %u", att_ecode);
return;
}
- if (length != 17) {
- DBG("Reading ROPs failed: unexpected length %u", length);
- return;
- }
+ if (length != 17)
+ goto invalid;
+
+ if (!util_iov_pull_u8(&iov, &version) ||
+ !util_iov_pull_u8(&iov, &caps))
+ goto invalid;
- if (value[0] != 0x01) {
- DBG("Unexpected ASHA version: %u", value[0]);
+ hisyncid = util_iov_pull_mem(&iov, 8);
+ if (!hisyncid)
+ goto invalid;
+
+ if (!util_iov_pull_u8(&iov, &features) ||
+ !util_iov_pull_le16(&iov, &render_delay) ||
+ !util_iov_pull(&iov, 2) ||
+ !util_iov_pull_le16(&iov, &codec_ids))
+ goto invalid;
+
+ if (version != 0x01) {
+ DBG("Unexpected ASHA version: %u", version);
return;
}
/* Device Capabilities */
- asha->right_side = (value[1] & 0x1) != 0;
- asha->binaural = (value[1] & 0x2) != 0;
- asha->csis_supported = (value[1] & 0x4) != 0;
+ asha->right_side = (caps & 0x1) != 0;
+ asha->binaural = (caps & 0x2) != 0;
+ asha->csis_supported = (caps & 0x4) != 0;
/* HiSyncId: 2 byte company id, 6 byte ID shared by left and right */
- memcpy(asha->hisyncid, &value[2], 8);
+ memcpy(asha->hisyncid, hisyncid, 8);
/* FeatureMap */
- asha->coc_streaming_supported = (value[10] & 0x1) != 0;
+ asha->coc_streaming_supported = (features & 0x1) != 0;
/* RenderDelay */
- asha->render_delay = get_le16(&value[11]);
+ asha->render_delay = render_delay;
/* byte 13 & 14 are reserved */
/* Codec IDs */
- asha->codec_ids = get_le16(&value[15]);
+ asha->codec_ids = codec_ids;
DBG("Got ROPS: side %u, binaural %u, csis: %u, delay %u, codecs: %u",
asha->right_side, asha->binaural, asha->csis_supported,
asha->render_delay, asha->codec_ids);
check_probe_done(asha);
+
+ return;
+
+invalid:
+ DBG("Reading ROPs failed: unexpected length %u", length);
}
static void audio_status_register(uint16_t att_ecode, void *user_data)
--
2.56.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH BlueZ v2 4/5] shared/micp: Fix reading Mute State from an empty notification
2026-11-11 20:39 [PATCH BlueZ v2 0/5] shared: Use util_iov helpers in gatt-db, hog, asha and micp Luiz Augusto von Dentz
` (2 preceding siblings ...)
2026-11-11 20:39 ` [PATCH BlueZ v2 3/5] shared/asha: " Luiz Augusto von Dentz
@ 2026-11-11 20:39 ` Luiz Augusto von Dentz
2026-11-11 20:39 ` [PATCH BlueZ v2 5/5] shared/micp: Use util_iov_pull_mem instead of a local helper Luiz Augusto von Dentz
4 siblings, 0 replies; 7+ messages in thread
From: Luiz Augusto von Dentz @ 2026-11-11 20:39 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
micp_mute_state_notify copied one byte from the notification value
without checking its length, so a notification with no value made it
read past the value.
Pull the byte from the value instead and ignore the notification if it
is missing.
Fixes: 5c788b73 ("src/shared/micp.c: To implement MICP profile MICS service")
Assisted-by: OpenCode:claude-sonnet-5.5
---
src/shared/micp.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/shared/micp.c b/src/shared/micp.c
index 98baff689fcc..7df8f8346f55 100644
--- a/src/shared/micp.c
+++ b/src/shared/micp.c
@@ -717,9 +717,16 @@ static void micp_mute_state_notify(struct bt_micp *micp, uint16_t value_handle,
const uint8_t *value, uint16_t length,
void *user_data)
{
+ struct iovec iov = {
+ .iov_base = (void *)value,
+ .iov_len = length,
+ };
uint8_t mute_state;
- memcpy(&mute_state, value, sizeof(mute_state));
+ if (!util_iov_pull_u8(&iov, &mute_state)) {
+ DBG(micp, "Unable to get Mute state");
+ return;
+ }
DBG(micp, "Mute state: 0x%x", mute_state);
}
--
2.56.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH BlueZ v2 5/5] shared/micp: Use util_iov_pull_mem instead of a local helper
2026-11-11 20:39 [PATCH BlueZ v2 0/5] shared: Use util_iov helpers in gatt-db, hog, asha and micp Luiz Augusto von Dentz
` (3 preceding siblings ...)
2026-11-11 20:39 ` [PATCH BlueZ v2 4/5] shared/micp: Fix reading Mute State from an empty notification Luiz Augusto von Dentz
@ 2026-11-11 20:39 ` Luiz Augusto von Dentz
4 siblings, 0 replies; 7+ messages in thread
From: Luiz Augusto von Dentz @ 2026-11-11 20:39 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Drop the local iov_pull_mem, which duplicates util_iov_pull_mem.
Assisted-by: OpenCode:claude-sonnet-5.5
---
src/shared/micp.c | 19 +++----------------
1 file changed, 3 insertions(+), 16 deletions(-)
diff --git a/src/shared/micp.c b/src/shared/micp.c
index 7df8f8346f55..ebc21eb3c8b0 100644
--- a/src/shared/micp.c
+++ b/src/shared/micp.c
@@ -79,19 +79,6 @@ struct bt_micp_notify {
void *user_data;
};
-static void *iov_pull_mem(struct iovec *iov, size_t len)
-{
- void *data = iov->iov_base;
-
- if (iov->iov_len < len)
- return NULL;
-
- iov->iov_base += len;
- iov->iov_len -= len;
-
- return data;
-}
-
static struct bt_micp_db *micp_get_mdb(struct bt_micp *micp)
{
if (!micp)
@@ -397,9 +384,9 @@ static void mics_mute_write(struct gatt_db_attribute *attrib,
goto respond;
}
- micp_op = iov_pull_mem(&iov, sizeof(*micp_op));
+ micp_op = util_iov_pull_mem(&iov, sizeof(*micp_op));
if (!micp_op) {
- DBG(micp, "iov_pull_mem() returned NULL");
+ DBG(micp, "util_iov_pull_mem() returned NULL");
goto respond;
}
@@ -746,7 +733,7 @@ static void read_mute_state(struct bt_micp *micp, bool success,
return;
}
- mute_state = iov_pull_mem(&iov, sizeof(uint8_t));
+ mute_state = util_iov_pull_mem(&iov, sizeof(uint8_t));
if (mute_state == NULL) {
DBG(micp, "Unable to get Mute state");
return;
--
2.56.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* RE: shared: Use util_iov helpers in gatt-db, hog, asha and micp
2026-11-11 20:39 ` [PATCH BlueZ v2 1/5] shared/gatt-db: Use util_iov helpers to build and parse values Luiz Augusto von Dentz
@ 2026-11-12 2:09 ` bluez.test.bot
0 siblings, 0 replies; 7+ messages in thread
From: bluez.test.bot @ 2026-11-12 2:09 UTC (permalink / raw)
To: linux-bluetooth, luiz.dentz
[-- Attachment #1: Type: text/plain, Size: 32735 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/series/1208739/
---Test result---
Test Summary:
CheckPatch FAIL 2.32 seconds
GitLint PASS 1.53 seconds
BuildEll PASS 18.69 seconds
BluezMake PASS 271.15 seconds
MakeCheck PASS 0.94 seconds
MakeDistcheck PASS 137.07 seconds
CheckValgrind PASS 147.70 seconds
CheckSmatch PASS 240.11 seconds
bluezmakeextell PASS 90.71 seconds
TestFunctional FAIL 3170.98 seconds
IncrementalBuild PASS 304.68 seconds
ScanBuild PASS 927.64 seconds
Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[BlueZ,v2,4/5] shared/micp: Fix reading Mute State from an empty notification
WARNING:BAD_FIXES_TAG: Please use correct Fixes: style 'Fixes: <12+ chars of sha1> ("<title line>")' - ie: 'Fixes: 5c788b73b8a5 ("src/shared/micp.c: To implement MICP profile MICS service")'
#129:
Fixes: 5c788b73 ("src/shared/micp.c: To implement MICP profile MICS service")
/home/runner/work/bluez/bluez/src/patch/14973718.patch total: 0 errors, 1 warnings, 17 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
/home/runner/work/bluez/bluez/src/patch/14973718.patch has style problems, please review.
NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
##############################
Test: TestFunctional - FAIL
Desc: Run test-functional
Output:
FAIL functional.test_adv_monitor::test_adv_monitor_GHSA_hhgc_hfgf_8m4x[hosts1-vm1]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_bluetoothctl::test_bluetoothctl_show[hosts16-vm1]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_bluetoothctl::test_bluetoothctl_list[hosts16-vm1]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_bluetoothctl::test_bluetoothctl_script_show[hosts16-vm1]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_bluetoothctl::test_bluetoothctl_script_list[hosts16-vm1]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_btmgmt::test_btmgmt_info[hosts19-vm1]: AssertionError: assert 'addr 00:00:00:00:00:00' in '\x1b[0;91mReading hci0 info failed with status 0x11 (Invalid Index)\n\x1b[0m'
+ where '\x1b[0;91mReading hci0 info failed with status 0x11 (Invalid Index)\n\x1b[0m' = CompletedProcess(args=['/home/runner/work/bluez/bluez/src/src/tools/btmgmt', '--index', '0', 'info'], returncode=0, stdout='\x1b[0;91mReading hci0 info failed with status 0x11 (Invalid Index)\n\x1b[0m').stdout
FAIL functional.test_a2dp::test_a2dp_transport_created[hosts0-vm2]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_a2dp::test_a2dp_transport_acquire[hosts0-vm2]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_a2dp::test_a2dp_disconnect_during_setconf[hosts0-vm2-accept]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_a2dp::test_a2dp_disconnect_during_setconf[hosts0-vm2-reject]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_a2dp::test_a2dp_reconnect_pending_disconnect[hosts0-vm2]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_bearer::test_bearer_le_connect[hosts12-vm2]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_bearer::test_bearer_le_conn_params[hosts12-vm2]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_bearer::test_bearer_le_connectable[hosts12-vm2]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_bearer::test_bearer_le_pair[hosts12-vm2]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_bearer::test_bearer_bredr_pair[hosts13-vm2]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_bearer::test_bearer_le_conn_update[hosts14-vm2]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_bearer::test_bearer_le_not_connectable[hosts15-vm2]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_bluetoothctl::test_bluetoothctl_pair_bredr[hosts17-vm2]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_bluetoothctl::test_bluetoothctl_pair_le[hosts18-vm2]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_agent::test_agent_pair_bredr[accept-hosts2-vm2]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_agent::test_agent_pair_bredr[reject-hosts2-vm2]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_hog::test_hog[no-sci-hosts20-vm2]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_hog::test_hog[sci-hosts20-vm2]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_mpris_proxy::test_mpris_proxy_playback_control[bredr-vm2]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_mpris_proxy::test_mpris_proxy_track_control[bredr-vm2]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_obex::test_obex_ftp_list[hosts24-vm2]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_obex::test_obex_ftp_get[hosts24-vm2]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_obex::test_obexctl_list[hosts24-vm2]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_avrcp::test_avrcp_GHSA_m2vx_pw5f_rc8v[hosts3-vm2]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_bap::test_bap_unicast_transport_created[hosts4-vm2]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_bap::test_bap_unicast_transport_acquire[hosts4-vm2]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_bap::test_bap_unicast_transport_resume[0-hosts4-vm2]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_bap::test_bap_unicast_transport_resume[0.1-hosts4-vm2]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_bap::test_bap_unicast_transport_resume[1.0-hosts4-vm2]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_bap::test_bap_unicast_reconfigure_metadata[empty-hosts5-vm2]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_bap::test_bap_unicast_reconfigure_metadata[media-hosts5-vm2]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_bap::test_bap_unicast_desync[hosts6-vm2]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_bap::test_bap_unicast_duplex_enable_one[hosts6-vm2]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_bap::test_bap_broadcast_transport_created[lc3-hosts7-vm2]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_bap::test_bap_broadcast_transport_created[pbp-hosts7-vm2]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_bap::test_bap_broadcast_transport_acquire[lc3-hosts7-vm2]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_bap::test_bap_broadcast_transport_acquire[pbp-hosts7-vm2]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_bap::test_bass_past_transport_acquire[hosts9-vm2]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_bap::test_bap_unicast_set_transport_created[hosts10-vm3-sc]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_bap::test_bap_unicast_set_transport_created[hosts10-vm3-legacy]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_bap::test_bap_unicast_set_transport_acquire[hosts10-vm3]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_bap::test_bass_past_earbuds_transport_acquire[hosts11-vm3]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_bap::test_bap_broadcast_earbuds_transport_created[hosts8-vm3]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_bap::test_bap_broadcast_earbuds_transport_acquire[hosts8-vm3]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_mpris_proxy::test_mpris_proxy_playback_control[le-vm2]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
FAIL functional.test_mpris_proxy::test_mpris_proxy_track_control[le-vm2]: failed on setup with "pytest_bluezenv.rpc.RemoteError: load failed
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 238, in wait_load
raise RuntimeError("load failed")
RuntimeError: load failed"
https://github.com/bluez/bluez/pull/2809
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-11-12 2:09 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-11 20:39 [PATCH BlueZ v2 0/5] shared: Use util_iov helpers in gatt-db, hog, asha and micp Luiz Augusto von Dentz
2026-11-11 20:39 ` [PATCH BlueZ v2 1/5] shared/gatt-db: Use util_iov helpers to build and parse values Luiz Augusto von Dentz
2026-11-12 2:09 ` shared: Use util_iov helpers in gatt-db, hog, asha and micp bluez.test.bot
2026-11-11 20:39 ` [PATCH BlueZ v2 2/5] shared/hog: Use util_iov helpers to parse characteristic values Luiz Augusto von Dentz
2026-11-11 20:39 ` [PATCH BlueZ v2 3/5] shared/asha: " Luiz Augusto von Dentz
2026-11-11 20:39 ` [PATCH BlueZ v2 4/5] shared/micp: Fix reading Mute State from an empty notification Luiz Augusto von Dentz
2026-11-11 20:39 ` [PATCH BlueZ v2 5/5] shared/micp: Use util_iov_pull_mem instead of a local helper Luiz Augusto von Dentz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox