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

Validate the address pointer in the source routing header #1431

Merged
merged 2 commits into from Nov 13, 2020

Conversation

nvt
Copy link
Member

@nvt nvt commented Nov 4, 2020

It is possible that the line memcpy(addr_ptr, ((uint8_t *)&current_dest_addr) + cmpr, 16 - cmpr); causes a write outside the uip buffer because addr_ptr is not validated. This PR contains such a check and a test packet to demonstrate the behavior that can lead to a segmentation fault.

@g-oikonomou g-oikonomou merged commit 3f9a601 into contiki-ng:develop Nov 13, 2020
@nvt nvt deleted the check-srh-ptr branch January 21, 2021 16:16
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

3 participants