Closed
Conversation
The splay tree is a tree where each easy handle can be added *once*. The expire time for that node is the closes expire time for that easy handle. Easy handles can however have more expire times queued up, so when the node is removed from the splay tree because it is the next in line to take care of, we must check if there is another expire time in the queue and then add the node back into the splay. Failing to do the later part, the calling of add_next_timeout after Curl_splaygetbest, would leave the state.expiretime on the previous time stamp, which when could make the next call to Curl_splaygetbest use the wrong time stamp and get a wrong node out, causing trouble. Reported-by: letshack9707 on hackerone
icing
approved these changes
Aug 6, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The splay tree is a tree where each easy handle can be added once. The expire time for that node is the closes expire time for that easy handle.
Easy handles can however have more expire times queued up, so when the node is removed from the splay tree because it is the next in line to take care of, we must check if there is another expire time in the queue and then add the node back into the splay.
Failing to do the later part, the calling of add_next_timeout after Curl_splaygetbest, would leave the state.expiretime on the previous time stamp, which when could make the next call to Curl_splaygetbest use the wrong time stamp and get a wrong node out, causing trouble.
Reported-by: letshack9707 on hackerone