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: L2CAP: Fix missing buffer length check for sdu_len #32588

Merged
merged 1 commit into from
Feb 24, 2021

Conversation

jhedberg
Copy link
Member

We should verify that the buffer has sufficient data before attempting
to parse the SDU length field.

Fixes #32497

Signed-off-by: Johan Hedberg johan.hedberg@intel.com

@jhedberg
Copy link
Member Author

Only compile tested, but seemed trivial enough..

We should verify that the buffer has sufficient data before attempting
to parse the SDU length field. If we get a too short packet just
disconnect the channel.

Fixes zephyrproject-rtos#32497

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No checks of buffer size in l2cap_chan_le_recv
4 participants