Bluetooth API called before finished initialization. #21105
Labels
area: Bluetooth
bug
The issue is a bug, or the PR is fixing a bug
priority: low
Low impact/importance bug
Describe the bug
Some Bluetooth API function does not check for if the bluetooth device has finished initialized. This can lead to undefined behavior as the stack is operating on uninitialized kernel objects and memory.
To Reproduce
Steps to reproduce the behavior:
Call public API functions before calling bt_enable, or directly after bt_enable when supplied a ready callback.
Affected APIs:
OOB API
Gatt Notification and Indication
HCI commands
Expected behavior
APIs should return error code consistent with the rest of the API.
Impact
Undefined behavior. Minor annoyance, application should be able to not end up in this situation.
The text was updated successfully, but these errors were encountered: