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

Bluetooth: GATT: Fix segfault discover descriptors all UUIDs #17465

Conversation

joerchan
Copy link
Contributor

Handle optional argument UUID in bt_gatt_discover with type
DISCOVER_DESCRIPTOR, bt_uuid_cmp doesn't check for NULL pointer.
On system with MMU (nrf52_bsim) this can result in segfault.

Fixes: #16602

Signed-off-by: Joakim Andersson joakim.andersson@nordicsemi.no

Handle optional argument UUID in bt_gatt_discover with type
DISCOVER_DESCRIPTOR, bt_uuid_cmp doesn't check for NULL pointer.
On system with MMU (nrf52_bsim) this can result in segfault.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
@jhedberg
Copy link
Member

Is this something to be back ported to 1.14?

@jhedberg jhedberg added the bug The issue is a bug, or the PR is fixing a bug label Jul 10, 2019
@paulgavrikov
Copy link

Verified working on nrf52_bsim and nrf52840_pca10056

@joerchan
Copy link
Contributor Author

Is this something to be back ported to 1.14?

Yes, thank you.

Copy link
Contributor

@Vudentz Vudentz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jhedberg jhedberg merged commit 3bddc20 into zephyrproject-rtos:master Jul 10, 2019
@joerchan joerchan deleted the fix-gatt-discover-descriptor-segfault branch July 11, 2019 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Bluetooth bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bluetooth: GATT Discovery: Descriptor Discovery by range Seg Fault
5 participants