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

Open
wants to merge 2 commits into
base: v4.0-branch
Choose a base branch
from

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 <[email protected]>
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 <[email protected]>
@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
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.

6 participants