Skip to content

ATT_OP_FIND_INFO_RESP incorrect processing during ATTClass::discoverDescriptors causes crashing #245

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

Open
carterd opened this issue Jul 9, 2022 · 0 comments
Labels
type: imperfection Perceived defect in any part of project

Comments

@carterd
Copy link

carterd commented Jul 9, 2022

Symptoms:

Connecting as Central to 'other' BLE device which responds with ATT_OP_FIND_INFO_RESP using 128-bit UUIDs causes crash!

Location of Issue:

FILE = ArduinoBLE\src\utility\ATT.cpp
FUNC = bool ATTClass::discoverDescriptors(uint16_t connectionHandle, BLERemoteDevice* device)
LINE = 1728-1730 (ish)

Explanation:

responseBuf[1] of ATT_OP_FIND_INFO_RESP is the format of the response as follows:
0x01 = 2 octets of handle, 2 octets of UUID [total 4 octets/bytes]
0x02 = 2 octets of handle, 16 octets of UUID [total 18 octets/bytes]

Current:

uint16_t lengthPerDescriptor = responseBuffer[1] * 4;
uint8_t uuidLen = 2;

Possible Fix:

uint16_t lengthPerDescriptor = responseBuffer[1] * 14 - 10;
uint8_t uuidLen = lengthPerDescriptor - 2;

THANKS GUYS!!!!

@per1234 per1234 added the type: imperfection Perceived defect in any part of project label Jul 9, 2022
carterd added a commit to carterd/ArduinoBLE that referenced this issue Sep 25, 2022
… processing during ATTClass::discoverDescriptors causes crashing

I've highlighted this issue on 9th July ... this is an issue of causing __CRASHES__ if using ArduinoBLE to connect as central and the response to ATT_OP_FIND_INFO_RESP includes 128-bit UUIDs.
fpistm pushed a commit to stm32duino/STM32duinoBLE that referenced this issue Mar 21, 2025
… processing during ATTClass::discoverDescriptors causes crashing

I've highlighted this issue on 9th July ... this is an issue of causing __CRASHES__ if using ArduinoBLE to connect as central and the response to ATT_OP_FIND_INFO_RESP includes 128-bit UUIDs.
fpistm pushed a commit to stm32duino/STM32duinoBLE that referenced this issue Mar 21, 2025
… processing during ATTClass::discoverDescriptors causes crashing

I've highlighted this issue on 9th July ... this is an issue of causing __CRASHES__ if using ArduinoBLE to connect as central and the response to ATT_OP_FIND_INFO_RESP includes 128-bit UUIDs.
fpistm pushed a commit to stm32duino/STM32duinoBLE that referenced this issue Mar 27, 2025
… processing during ATTClass::discoverDescriptors causes crashing

I've highlighted this issue on 9th July ... this is an issue of causing __CRASHES__ if using ArduinoBLE to connect as central and the response to ATT_OP_FIND_INFO_RESP includes 128-bit UUIDs.
fpistm pushed a commit to stm32duino/STM32duinoBLE that referenced this issue Mar 28, 2025
… processing during ATTClass::discoverDescriptors causes crashing

I've highlighted this issue on 9th July ... this is an issue of causing __CRASHES__ if using ArduinoBLE to connect as central and the response to ATT_OP_FIND_INFO_RESP includes 128-bit UUIDs.
fpistm pushed a commit to fpistm/STM32duinoBLE that referenced this issue Apr 17, 2025
… processing during ATTClass::discoverDescriptors causes crashing

I've highlighted this issue on 9th July ... this is an issue of causing __CRASHES__ if using ArduinoBLE to connect as central and the response to ATT_OP_FIND_INFO_RESP includes 128-bit UUIDs.
fpistm pushed a commit to fpistm/STM32duinoBLE that referenced this issue Apr 17, 2025
… processing during ATTClass::discoverDescriptors causes crashing

I've highlighted this issue on 9th July ... this is an issue of causing __CRASHES__ if using ArduinoBLE to connect as central and the response to ATT_OP_FIND_INFO_RESP includes 128-bit UUIDs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

2 participants