Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[backport v4.0-branch] bluetooth: host: hci_core: add missing NULL check #85723

Merged

Conversation

JordanYates
Copy link
Collaborator

Add check that the command buffer claimed in bt_le_create_conn_cancel is not NULL. Fixes a fault caused by providing the NULL buffer to bt_hci_cmd_state_set_init.

Primary fix from #85260.
Increasing the command buffer count as discussed in Bluetooth WG 2025/02/06
Duplicate content from #85299

Fixes #85301

Add check that the command buffer claimed in `bt_le_create_conn_cancel`
is not `NULL`. Fixes a fault caused by providing the `NULL` buffer to
`bt_hci_cmd_state_set_init`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
The extended advertising start procedure can consume both command
buffers in a single API call, resulting in `bt_le_create_conn_cancel`
being unable to claim a buffer to terminate the connection request.

Increase the command count if both extended advertising and Bluetooth
central are enabled in an application.

Signed-off-by: Jordan Yates <jordan@embeint.com>
@jhedberg jhedberg changed the title bluetooth: host: hci_core: add missing NULL check [backport v4.0-branch] bluetooth: host: hci_core: add missing NULL check Feb 13, 2025
@JordanYates JordanYates added this to the v4.0.1 milestone Feb 16, 2025
@dkalowsk dkalowsk merged commit f61d53d into zephyrproject-rtos:v4.0-branch Feb 20, 2025
34 checks passed
@JordanYates JordanYates deleted the 250213_40_conn_timeout branch February 20, 2025 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants