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

TCP fuzz fixes #538

Merged
merged 8 commits into from
Oct 5, 2021
Merged

TCP fuzz fixes #538

merged 8 commits into from
Oct 5, 2021

Conversation

Dirbaio
Copy link
Member

@Dirbaio Dirbaio commented Oct 4, 2021

Fixes panics and hangs found by whole-stack fuzzing. See individual commit messages.

Will post the whole-stack fuzz target when it's fully clean.

This causes an infinite loop of zero-length packets: when we have data
to send, it sends MSS-length packets until filling the window, which
is an infinte amount of packets because mss is zero.

Found with cargo-fuzz.
Previous code had an `if` to force sending a packet when retransmitting.
When the remote window is zero this would cause an infinite loop of
sending empty packets, because the "retransmit" flag would never get cleared.

Remove the force-retransmit, and add an explicit check on `seq_to_transmit` for
pending SYNs because SYN retransmission relied on it.

Found with cargo-fuzz.
THis would let FIN packets through, breaking the logic below.

Found with cargo-fuzz.
@Dirbaio
Copy link
Member Author

Dirbaio commented Oct 5, 2021

bors r+

@bors
Copy link
Contributor

bors bot commented Oct 5, 2021

Build succeeded:

@bors bors bot merged commit 29751ae into master Oct 5, 2021
@bors bors bot deleted the tcp-fuzz-fixes branch October 5, 2021 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant