Skip to content

ble_hs_adv_find_field() may dereference invalid memory for malformed advertising data #2081

@kscheff

Description

@kscheff

ble_hs_adv_parse(const uint8_t *data, uint8_t length,

The function ble_hs_adv_find_field() directly casts a buffer offset to struct ble_hs_adv_field * before verifying that the pointer is within bounds. This can lead to a crash (e.g., Load access fault) if the advertising data is malformed or truncated.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions