Skip to content

Conversation

jhedberg
Copy link
Member

We should clear the bt_dev.sent_cmd pointer after using it to allocate a new HCI event buffer in the bt_buf_get_cmd_complete() function. Otherwise, there is a risk of reusing the same stored net_buf for multiple consecutive HCI events in case the controller sents duplicate or invalid event packets.

We should clear the bt_dev.sent_cmd pointer after using it to allocate a
new HCI event buffer in the bt_buf_get_cmd_complete() function.
Otherwise, there is a risk of reusing the same stored net_buf for
multiple consecutive HCI events in case the controller sents duplicate
or invalid event packets.

Signed-off-by: Johan Hedberg <[email protected]>
@carlescufi carlescufi merged commit a6e5755 into zephyrproject-rtos:main Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Bluetooth Host Bluetooth Host (excluding BR/EDR) area: Bluetooth
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants