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

Verify the TCP data offset to avoid uip_len overflows. #1366

Merged
merged 1 commit into from Sep 1, 2020

Conversation

nvt
Copy link
Member

@nvt nvt commented Aug 31, 2020

A TCP packet can contain a data offset that makes the statement uip_len = uip_len - c - UIP_IPH_LEN overflow, causing a crash later in tcp-socket.c when attempting to copy much more data than is possible.

This pull request adds a check to verify that the data offset is not too large in relation to the length of the input packet.

@g-oikonomou g-oikonomou merged commit 307385a into contiki-ng:develop Sep 1, 2020
1 check passed
@nvt nvt deleted the tcp-data-offset-check branch January 21, 2021 16:21
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