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

Prevent Path Removal Underflow #3624

Merged
merged 3 commits into from
May 12, 2023
Merged

Prevent Path Removal Underflow #3624

merged 3 commits into from
May 12, 2023

Conversation

nibanks
Copy link
Member

@nibanks nibanks commented May 12, 2023

Description

Add check for invalid path removal case. It shouldn't ever happen, but from some crashes I've seen, I suspect it might be happening.

Testing

Existing automation

Documentation

N/A

@nibanks nibanks requested a review from a team as a code owner May 12, 2023 18:56
@nibanks nibanks added the Area: Core Related to the shared, core protocol logic label May 12, 2023
@@ -53,8 +54,15 @@ QuicPathRemove(
_In_ uint8_t Index
)
{
CXPLAT_DBG_ASSERT(Index < Connection->PathsCount);
CXPLAT_DBG_ASSERT(Connection->PathsCount > 0);
CXPLAT_DBG_ASSERT(Connection->PathsCount <= QUIC_MAX_PATH_COUNT);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why don't we make this a teleassert too?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could but I really don't expect this assert to be invalid. I am not so sure about the next one, that's why I've made it a tel assert.

@nibanks nibanks merged commit 51d24c6 into main May 12, 2023
351 of 361 checks passed
@nibanks nibanks deleted the path-removal-check branch May 12, 2023 20:19
nibanks added a commit that referenced this pull request May 19, 2023
nibanks added a commit that referenced this pull request May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Core Related to the shared, core protocol logic
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants