-
-
Notifications
You must be signed in to change notification settings - Fork 91
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
Tracer panic with large initial_sequence and delayed TCP probes #435
Comments
cc @zarkdav |
fujiapple852
added a commit
that referenced
this issue
Mar 15, 2023
fujiapple852
added a commit
that referenced
this issue
Mar 15, 2023
fujiapple852
added a commit
that referenced
this issue
Mar 15, 2023
fujiapple852
added a commit
that referenced
this issue
Mar 15, 2023
fujiapple852
added a commit
that referenced
this issue
Mar 18, 2023
fujiapple852
added a commit
that referenced
this issue
Mar 18, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When running with a large
initial_sequence
, such as 64000, for TCP tracing, the tracer can panic if a delayed TCP probe response from a prior round is received.This happens because the check to determine if a given sequence is in the current round check if difference between the
sequence
(the sequence number of the probe response) and theround_sequence
(the sequence number for the first probe in the round) is less than theBUFFER_SIZE
(currently 1024):For example, if
initial_sequence
is 64000 andround_sequence
is 64055, a delayed probe response from a prior round, such as sequence 64491, will incorrect pass the above check.This can manifest itself in various ways, typically a panic in the below code in
send_request
but it can, by luck, pass this code and manifest itself later on such as inTrace::update_from_probe
.The solution is to restrict the maximum allowed
initial_sequence
tou16::MAX - 2 * BUFFER_SIZE
to ensure sequence numbers from the immediate prior round will be correctly discarded by thein_round
check. This fix will not guard against the extreme case of a delayed from two rounds prior.The text was updated successfully, but these errors were encountered: