Skip to content

Bluetooth: HCI: Handle truncated packets in hci_le_big_complete and hci_le_big_sync_established #80597

@ekleezg

Description

@ekleezg

In the function hci_le_big_complete and hci_le_big_sync_established,

	SYS_SLIST_FOR_EACH_CONTAINER(&big->bis_channels, bis, node) {
		const uint16_t handle = evt->handle[i++];
		struct bt_conn *iso_conn = bis->iso;

		iso_conn->handle = sys_le16_to_cpu(handle);
		store_bis_broadcaster_info(evt, &iso_conn->iso.info);
		bt_conn_set_state(iso_conn, BT_CONN_CONNECTED);
	}

It appears that there’s no handling for cases where the evt message might be truncated.

I believe that check should be added to verify that the number of evt->handle entries matches the number of bis_channels.

It doesn't seem to be a security issue, but improving it would help prevent bugs.

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions