-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
No checks of buffer size in l2cap_chan_le_recv #32497
Labels
Comments
@villytiger seems like a valid issue. I created #32588 to try to fix it. |
jhedberg
pushed a commit
to jhedberg/zephyr
that referenced
this issue
Feb 24, 2021
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>
jhedberg
pushed a commit
that referenced
this issue
Feb 24, 2021
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 #32497 Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
zephyrbot
pushed a commit
that referenced
this issue
Mar 19, 2021
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 #32497 Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
zephyrbot
pushed a commit
that referenced
this issue
Mar 19, 2021
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 #32497 Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
nashif
pushed a commit
that referenced
this issue
Mar 22, 2021
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 #32497 Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
nashif
pushed a commit
that referenced
this issue
Mar 23, 2021
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 #32497 Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
zephyr/subsys/bluetooth/host/l2cap.c
Line 2192 in 80ec938
May be I'm missing something. But it looks like net_buf_pull_le16 can read outside of the buffer if a frame has the length fewer than 2. I couldn't find any checks in the callers as well.
The text was updated successfully, but these errors were encountered: