Repository navigation
fix: authenticate TURN responses before transaction completion - #156
Merged
Merged
Conversation
ID-only completion let forged responses retire authenticated work before any method or integrity check. Bind each transaction to its request method and response key, validate challenges, and hide attributes outside the HMAC before publication. Sign authenticated fixture responses and cover forged Allocate, Refresh, CreatePermission, and ChannelBind responses. Validation: task verify; task race; focused security and transaction regressions repeated three times.
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.
TURN responses could retire a live transaction using only its ID, allowing a same-source injected response to alter allocation or peer readiness state. Bind each transaction to its request method and response key, verify MESSAGE-INTEGRITY before completion, and leave rejected packets live for a later genuine response.
The initial Allocate exchange accepts only a well-formed 401 challenge. Authenticated 438 responses require a signature, matching realm, and nonempty nonce; attributes after MESSAGE-INTEGRITY are hidden from consumers. Update turntest and scripted responses to sign authenticated exchanges. Servers that omit signatures on responses to authenticated requests will now time out. Wrong-password 401 responses can also exhaust retries and return ErrTransactionTimeout instead of a 401 TurnError, even when the server supports signing.
Validation: task preflight and focused security regressions passed on 967a4c7. RAS review 20261019T011410-09b300be8de82c81029cb01f identified two documentation corrections, which are included; no runtime fix was required by review. A successful post-ready ci-required check on the same head is required before merge.