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

Added buffer boundary checks for 6LoWPAN decompression #1482

Merged
merged 3 commits into from Jan 29, 2021

Conversation

nvt
Copy link
Member

@nvt nvt commented Dec 23, 2020

Unlike for the 6LoWPAN compression function, there are no boundary checks in the decompression function. Additionally, packets that are not decompressed correctly are passed on the to the upper layer because the IPHC decompression function does not return a value indicating whether the operation succeeded.

This PR addresses these two issues. Moreover, a packet that demonstrates the out-of-bounds read is added to the packet test, but the problem might be noticed only when compiled with an address sanitizer.

Copy link
Member

@nfi nfi left a comment

Choose a reason for hiding this comment

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

Looks good!

@nfi nfi merged commit aa6e26f into contiki-ng:develop Jan 29, 2021
@nvt nvt deleted the check-hc-buf branch May 20, 2022 16:19
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.

None yet

2 participants