Skip to content

Conversation

@zhongzhijie1
Copy link
Contributor

bug: v/85714

The previous implementation did not handle zero-length AD items (len == 0) and lacked sufficient boundary checks. As a result, padding bytes could be misinterpreted as valid AD elements, leading to construction of invalid bt_data entries with oversized data_len values.

This could further cause out-of-bounds memory access during advertising data processing in the host stack.

This change adds proper handling for zero-length AD items, validates item length and buffer boundaries, and enforces segment count limits to prevent invalid bt_data construction.

gzh-terry
gzh-terry previously approved these changes Feb 6, 2026
Copy link
Contributor

@gzh-terry gzh-terry left a comment

Choose a reason for hiding this comment

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

Remove Change-Id

Copy link
Contributor

@chengkai15 chengkai15 left a comment

Choose a reason for hiding this comment

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

LGTM

bug: v/85714

The previous implementation did not handle zero-length AD items (len == 0)
and lacked sufficient boundary checks. As a result, padding bytes could be
misinterpreted as valid AD elements, leading to construction of invalid
bt_data entries with oversized data_len values.

This could further cause out-of-bounds memory access during advertising data
processing in the host stack.

This change adds proper handling for zero-length AD items, validates item
length and buffer boundaries, and enforces segment count limits to prevent
invalid bt_data construction.

Signed-off-by: zhongzhijie1 <zhongzhijie1@xiaomi.com>
@huangyulong3 huangyulong3 merged commit 3556792 into open-vela:dev Feb 11, 2026
9 checks passed
@zhongzhijie1 zhongzhijie1 deleted the _sal_adv_fix branch February 11, 2026 16:07
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.

4 participants