Skip to content

Fix risk of accepting packets before firmware is loaded#948

Open
typenoob wants to merge 1 commit into
google:mainfrom
typenoob:HOST-READY-VULNER
Open

Fix risk of accepting packets before firmware is loaded#948
typenoob wants to merge 1 commit into
google:mainfrom
typenoob:HOST-READY-VULNER

Conversation

@typenoob

Copy link
Copy Markdown

This PR fixes an error that occurs when a remote device repeatedly sends HCI_CONNECTION_REQUEST_COMMAND early while the local device still needs to load its firmware driver:

[2026-06-29 09:01:39.812] WARNING in host: HCI_ACCEPT_CONNECTION_REQUEST_COMMAND failed (UNKNOWN_CONNECTION_IDENTIFIER_ERROR)
Task exception was never retrieved
future: <Task finished name='Task-5' coro=<Host.send_async_command() done, defined at C:\Users\user\nxbt\.venv\Lib\site-packages\bumble\host.py:805> exception=HCI_Error()>
Traceback (most recent call last):
  File "C:\Users\user\nxbt\.venv\Lib\site-packages\bumble\host.py", line 829, in send_async_command
    raise hci.HCI_Error(status)
bumble.hci.HCI_Error: HCI_Error(hci/UNKNOWN_CONNECTION_IDENTIFIER_ERROR [0x2])

The root cause is that Host.ready was incorrectly set to True before the firmware driver had finished loading successfully.

In addition, I believe letting Drivers control Host.ready is risky, so this behavior has been consolidated and moved into Host.reset instead.

@typenoob

typenoob commented Jun 29, 2026

Copy link
Copy Markdown
Author

I believe you can reproduce this issue on Windows by first putting the remote device into pairing mode, and then calling the Intel Bluetooth adapter's Device.power_on function.

@typenoob

Copy link
Copy Markdown
Author

Testing, linting, and formatting were not performed yet.

@typenoob typenoob force-pushed the HOST-READY-VULNER branch from 5d8beda to edcce82 Compare June 29, 2026 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant